forked from github-such-software/hash-wallet
Windows CI: source MinGW runtime DLLs from Git Bash, not monero_c bundle #32
25
.github/workflows/build-windows.yml
vendored
25
.github/workflows/build-windows.yml
vendored
@@ -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/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"
|
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
|
# MinGW runtime DLLs (libssp-0, libwinpthread-1) — the wallet libs
|
||||||
# references both under release/monero/, so single-source under
|
# are dynamically linked against these. MrCyjaneK's prebuilt
|
||||||
# monero/ is enough. Source file may or may not have a `lib` prefix.
|
# 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
|
for runtime in libssp-0.dll libwinpthread-1.dll; do
|
||||||
src=""
|
src=""
|
||||||
for candidate in "$SRC/$runtime" "$SRC/${runtime#lib}"; do
|
for d in "${RUNTIME_PATHS[@]}"; do
|
||||||
if [[ -f "$candidate" ]]; then src="$candidate"; break; fi
|
if [[ -f "$d/$runtime" ]]; then
|
||||||
|
src="$d/$runtime"
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
if [[ -z "$src" ]]; then
|
if [[ -z "$src" ]]; then
|
||||||
echo "FATAL: $runtime not in bundle (looked at $SRC)"
|
echo "FATAL: $runtime not found in any of:"
|
||||||
ls "$SRC"
|
printf ' %s\n' "${RUNTIME_PATHS[@]}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cp -v "$src" "$MONERO_DST/x86_64-w64-mingw32_${runtime}"
|
cp -v "$src" "$MONERO_DST/x86_64-w64-mingw32_${runtime}"
|
||||||
|
|||||||
Reference in New Issue
Block a user