diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 7d0b8ecf..d38be558 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -175,17 +175,28 @@ jobs: cp -v "$SRC/libmonero_wallet2_api_c.dll" "$MONERO_DST/x86_64-w64-mingw32_libwallet2_api_c.dll" cp -v "$SRC/libwownero_wallet2_api_c.dll" "$WOWNERO_DST/x86_64-w64-mingw32_libwallet2_api_c.dll" - # MinGW runtime DLLs the wallet libs depend on. CMakeLists.txt - # references both under release/monero/, so single-source under - # monero/ is enough. Source file may or may not have a `lib` prefix. + # MinGW runtime DLLs (libssp-0, libwinpthread-1) — the wallet libs + # are dynamically linked against these. MrCyjaneK's prebuilt + # release-bundle.zip does NOT ship them (only the wallet *.dll + + # *.dll.a import libs), so we source them from Git Bash's bundled + # MinGW-w64 distribution, which ships the same x86_64-w64-mingw32 + # ABI used to build the wallet libs. + RUNTIME_PATHS=( + "$SRC" # monero_c bundle (preferred if present) + "/c/Program Files/Git/mingw64/bin" # Git for Windows / Git Bash + "/mingw64/bin" # MSYS2 mingw64 fallback + ) for runtime in libssp-0.dll libwinpthread-1.dll; do src="" - for candidate in "$SRC/$runtime" "$SRC/${runtime#lib}"; do - if [[ -f "$candidate" ]]; then src="$candidate"; break; fi + for d in "${RUNTIME_PATHS[@]}"; do + if [[ -f "$d/$runtime" ]]; then + src="$d/$runtime" + break + fi done if [[ -z "$src" ]]; then - echo "FATAL: $runtime not in bundle (looked at $SRC)" - ls "$SRC" + echo "FATAL: $runtime not found in any of:" + printf ' %s\n' "${RUNTIME_PATHS[@]}" exit 1 fi cp -v "$src" "$MONERO_DST/x86_64-w64-mingw32_${runtime}"