From cfc619cbc86a4cb677178fae6a0e49dc6825bacf Mon Sep 17 00:00:00 2001 From: jwinterm Date: Wed, 20 May 2026 20:10:05 -0400 Subject: [PATCH] Windows CI: mirror monero/wownero DLLs under lib-prefixed names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cw_monero + cw_wownero use package:monero's Dart FFI loader (mrcyjanek's package), which expects DLLs named: libmonero_wallet2_api_c.dll libwownero_wallet2_api_c.dll But windows/CMakeLists.txt's install rules RENAME to a different layout: monero_libwallet2_api_c.dll wownero_libwallet2_api_c.dll This naming-convention mismatch causes hash_wallet.exe to crash at wallet-create time: Failed to load dynamic library 'libwownero_wallet2_api_c.dll': The specified module could not be found. Post-build step that creates the lib-prefixed copies. Defensive — keeps both names so any upstream code that expects either layout still works. --- .github/workflows/build-windows.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 9f3f1169..bd83a26e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -267,10 +267,26 @@ 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. + # ---- Reconcile monero/wownero DLL naming for Dart FFI ---------------- + # windows/CMakeLists.txt's install(FILES ... RENAME ...) rules produce + # _libwallet2_api_c.dll, but package:monero's Dart FFI loader + # (mrcyjanek's package) opens lib_wallet2_api_c.dll — different + # filename layout, runtime error "Failed to load dynamic library". + # Create the lib-prefixed copies so both name conventions resolve. + - name: Mirror monero/wownero DLLs under lib-prefixed names + run: | + set -x -e + DST="build/windows/x64/runner/Release" + for coin in monero wownero; do + src="$DST/${coin}_libwallet2_api_c.dll" + dst="$DST/lib${coin}_wallet2_api_c.dll" + if [[ -f "$src" ]]; then + cp -v "$src" "$dst" + else + echo "WARN: $src not in Release dir — CMake install may have skipped it" + ls "$DST" | head -20 + fi + done # ---- Bundle MSVC runtime DLLs with the .exe -------------------------- # Standalone Windows builds need msvcp140.dll + vcruntime140.dll + -- 2.50.1 (Apple Git-155)