From a2d4f4766d5d6b23560f859a1250154105465ef4 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Sun, 11 Sep 2022 23:15:10 -0400 Subject: [PATCH] Fixes crash handler for jenkins builds. (#1445) * Fixes crash handler for jenkins builds. We must include the pdb in redistributables. * Properly selects PDB file path for inclusion Co-authored-by: Christopher Leggett --- libultraship/libultraship/CrashHandler.cpp | 4 +++- soh/CMakeLists.txt | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/CrashHandler.cpp b/libultraship/libultraship/CrashHandler.cpp index 13c746027..35e0761ae 100644 --- a/libultraship/libultraship/CrashHandler.cpp +++ b/libultraship/libultraship/CrashHandler.cpp @@ -293,7 +293,9 @@ static void printStack(CONTEXT* ctx) { process = GetCurrentProcess(); thread = GetCurrentThread(); - SymInitialize(process, nullptr, true); + + SymSetOptions(SYMOPT_NO_IMAGE_SEARCH | SYMOPT_IGNORE_IMAGEDIR); + SymInitialize(process, "debug", true); constexpr DWORD machineType = diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 819c1e5bb..6dbc70bbb 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1992,6 +1992,10 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS") INSTALL(TARGETS soh DESTINATION . COMPONENT ship) endif() +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +INSTALL(FILES $ DESTINATION ./debug COMPONENT ship) +endif() + find_program(CURL NAMES curl DOC "Path to the curl program. Used to download files.") execute_process(COMMAND ${CURL} -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) @@ -2015,7 +2019,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch") nx_generate_nacp(Ship.nacp NAME "Ship of Harkinian" AUTHOR "Harbour Masters" - VERSION "3.1.0" + VERSION "4.0.0" ) nx_create_nro(soh