dev #31

Merged
such-gitea merged 2 commits from github-such-software/hash-wallet:dev into dev 2026-05-20 18:46:06 -04:00

View File

@@ -146,10 +146,53 @@ jobs:
set -x
MONERO_C_TAG=$(cd scripts/monero_c && git describe --tags)
BUNDLE_DIR="scripts/monero_c/release/$MONERO_C_TAG"
echo "=== windows-ish subdirs ==="
find "$BUNDLE_DIR" -maxdepth 1 -type d \( -name '*mingw*' -o -name '*windows*' -o -name '*-win-*' -o -name '*-pc-windows*' \) 2>/dev/null
echo "=== any DLL anywhere? ==="
find "$BUNDLE_DIR" -name '*.dll' 2>/dev/null | head -20 || true
echo "=== full mingw32 dir contents ==="
ls -la "$BUNDLE_DIR/x86_64-w64-mingw32" 2>/dev/null || true
# ---- Stage monero_c DLLs into the layout windows/CMakeLists.txt expects
# Upstream Cake's Windows build cross-compiles monero_c on Linux via
# scripts/windows/build_all.sh, which lays files out as:
# scripts/monero_c/release/<coin>/<triple>_<basename>.dll
# The CMakeLists.txt at windows/CMakeLists.txt:84-94 hardcodes those
# paths in install(FILES ...) rules — it copies + RENAMEs them to the
# final names (monero_libwallet2_api_c.dll etc.) in the Release dir.
#
# We're using the prebuilt bundle from MrCyjaneK's release, which has
# a different layout:
# scripts/monero_c/release/<TAG>/<triple>/lib<coin>_wallet2_api_c.dll
# So we restage the bundle's files into the upstream-build-all-style
# layout before flutter build windows runs.
- name: Stage monero_c bundle into upstream cross-compile layout
run: |
set -x -e
MONERO_C_TAG=$(cd scripts/monero_c && git describe --tags)
SRC="scripts/monero_c/release/$MONERO_C_TAG/x86_64-w64-mingw32"
MONERO_DST="scripts/monero_c/release/monero"
WOWNERO_DST="scripts/monero_c/release/wownero"
mkdir -p "$MONERO_DST" "$WOWNERO_DST"
# The wallet C-API DLLs, one per coin
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.
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
done
if [[ -z "$src" ]]; then
echo "FATAL: $runtime not in bundle (looked at $SRC)"
ls "$SRC"
exit 1
fi
cp -v "$src" "$MONERO_DST/x86_64-w64-mingw32_${runtime}"
done
echo "=== final staged layout ==="
ls -la "$MONERO_DST/" "$WOWNERO_DST/"
# ---- Configure: pubspec.yaml + per-coin enablement -------------------
# Mirror of hashwallet.bat — drives tool/configure.dart with the same
@@ -207,6 +250,11 @@ jobs:
flutter config --enable-windows-desktop
flutter build windows --dart-define-from-file=env.json --release --verbose
# NOTE: monero/wownero DLLs land in Release dir automatically via
# CMake's install(FILES ... RENAME ...) rules in windows/CMakeLists.txt
# — the staging step above puts them at the source paths CMake reads.
# No post-build copy needed.
# ---- Bundle MSVC runtime DLLs with the .exe --------------------------
# Standalone Windows builds need msvcp140.dll + vcruntime140.dll +
# vcruntime140_1.dll next to the .exe (or installed via vc_redist on