From e3cbdf38ac1409d74377ee46edac5e32fbfb48f0 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 21:02:01 -0700 Subject: [PATCH 01/10] Fix hardcoded C: drive assumption in mwebd Windows build script --- tool/build_standalone_mwebd_windows.dart | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tool/build_standalone_mwebd_windows.dart b/tool/build_standalone_mwebd_windows.dart index b956e4f5e..03bc2a207 100644 --- a/tool/build_standalone_mwebd_windows.dart +++ b/tool/build_standalone_mwebd_windows.dart @@ -1,15 +1,7 @@ import 'dart:io'; Future main() async { - final projectToolDir = File(() { - String path = Platform.script.path; - if (Platform.isWindows) { - while (!path.startsWith("C:")) { - path = path.substring(1); - } - } - return path; - }()).parent; + final projectToolDir = File(Platform.script.toFilePath()).parent; // setup temp build dir final tempBuildDir = Directory( From 50f22c7954938f2e56d89d83959ecbd319d2ba13 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 21:23:38 -0700 Subject: [PATCH 02/10] For Windows the use native go build when CI=true (GitHub Actions sets this automatically), and falls back to the existing WSL cross-compile path for local Windows devs. Non-Windows hosts are unchanged. --- tool/build_standalone_mwebd_windows.dart | 51 ++++++++++++++---------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/tool/build_standalone_mwebd_windows.dart b/tool/build_standalone_mwebd_windows.dart index 03bc2a207..76ccf12db 100644 --- a/tool/build_standalone_mwebd_windows.dart +++ b/tool/build_standalone_mwebd_windows.dart @@ -28,26 +28,37 @@ Future main() async { "${tempBuildDir.path}" "${Platform.pathSeparator}mwebd", ); - final wslBuild = Platform.isWindows - ? await Process.start("wsl", [ - "bash", - "-l", - "-c", - "GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc " - "go build -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd", - ], runInShell: true) - : await Process.start( - "go", - ["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], - environment: { - "GOOS": "windows", - "GOARCH": "amd64", - "CGO_ENABLED": "1", - "CC": "x86_64-w64-mingw32-gcc", - }, - runInShell: true, - ); - await _waitForProcess(wslBuild); + final isCI = Platform.environment['CI'] == 'true'; + final Process build; + if (Platform.isWindows && isCI) { + build = await Process.start( + "go", + ["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], + environment: {"CGO_ENABLED": "1"}, + runInShell: true, + ); + } else if (Platform.isWindows) { + build = await Process.start("wsl", [ + "bash", + "-l", + "-c", + "GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc " + "go build -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd", + ], runInShell: true); + } else { + build = await Process.start( + "go", + ["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], + environment: { + "GOOS": "windows", + "GOARCH": "amd64", + "CGO_ENABLED": "1", + "CC": "x86_64-w64-mingw32-gcc", + }, + runInShell: true, + ); + } + await _waitForProcess(build); // create assets/windows dir if needed final winAssetsDir = Directory( From cb8face89566640a5ca78ac95cb27d1f168f025f Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 21:41:34 -0700 Subject: [PATCH 03/10] Remove build_runner step from build job --- .github/workflows/build.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b0dd56f2e..274ab9d3d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -73,9 +73,6 @@ jobs: CHANGE_NOW: ${{ secrets.CHANGE_NOW }} run: echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart - - name: Generate app config - run: dart run build_runner build --delete-conflicting-outputs - - name: Build run: flutter build linux --release @@ -145,9 +142,6 @@ jobs: CHANGE_NOW: ${{ secrets.CHANGE_NOW }} run: echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart - - name: Generate app config - run: dart run build_runner build --delete-conflicting-outputs - - name: Set up Android local.properties run: | cat > android/local.properties < lib/external_api_keys.dart - - name: Generate app config - run: dart run build_runner build --delete-conflicting-outputs - - name: Build run: flutter build windows --release @@ -321,9 +312,6 @@ jobs: CHANGE_NOW: ${{ secrets.CHANGE_NOW }} run: echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart - - name: Generate app config - run: dart run build_runner build --delete-conflicting-outputs - - name: Build run: flutter build macos --release @@ -399,9 +387,6 @@ jobs: CHANGE_NOW: ${{ secrets.CHANGE_NOW }} run: echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart - - name: Generate app config - run: dart run build_runner build --delete-conflicting-outputs - - name: Build run: flutter build ios --release --no-codesign From 80107e9c3e5b3a5ad8586ba57aeb62d3f800d000 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 22:02:18 -0700 Subject: [PATCH 04/10] Stream subprocess output in mwebd Windows build script --- tool/build_standalone_mwebd_windows.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tool/build_standalone_mwebd_windows.dart b/tool/build_standalone_mwebd_windows.dart index 76ccf12db..012c82f22 100644 --- a/tool/build_standalone_mwebd_windows.dart +++ b/tool/build_standalone_mwebd_windows.dart @@ -20,7 +20,7 @@ Future main() async { "https://www.github.com/ltcmweb/mwebd.git", "--branch", "v0.1.8", - ], runInShell: true); + ], runInShell: true, mode: ProcessStartMode.inheritStdio); await _waitForProcess(clone); // change working dir and build mwebd.exe @@ -33,9 +33,10 @@ Future main() async { if (Platform.isWindows && isCI) { build = await Process.start( "go", - ["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], + ["build", "-v", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], environment: {"CGO_ENABLED": "1"}, runInShell: true, + mode: ProcessStartMode.inheritStdio, ); } else if (Platform.isWindows) { build = await Process.start("wsl", [ @@ -43,12 +44,12 @@ Future main() async { "-l", "-c", "GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc " - "go build -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd", - ], runInShell: true); + "go build -v -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd", + ], runInShell: true, mode: ProcessStartMode.inheritStdio); } else { build = await Process.start( "go", - ["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], + ["build", "-v", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], environment: { "GOOS": "windows", "GOARCH": "amd64", @@ -56,6 +57,7 @@ Future main() async { "CC": "x86_64-w64-mingw32-gcc", }, runInShell: true, + mode: ProcessStartMode.inheritStdio, ); } await _waitForProcess(build); @@ -79,13 +81,13 @@ Future main() async { "${Platform.pathSeparator}mwebd.exe", "${winAssetsDir.path}" "${Platform.pathSeparator}mwebd.exe", - ]) + ], mode: ProcessStartMode.inheritStdio) : await Process.start("cp", [ "${Directory.current.parent.path}" "${Platform.pathSeparator}mwebd.exe", "${winAssetsDir.path}" "${Platform.pathSeparator}mwebd.exe", - ]); + ], mode: ProcessStartMode.inheritStdio); await _waitForProcess(copy); // cleanup From cc9438dd719aef42a28cdbf5fb2d448397922106 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 22:15:14 -0700 Subject: [PATCH 05/10] Add opt-in --fetch path for mwebd.exe Windows build --- scripts/app_config/configure_stack_wallet.sh | 6 +- tool/build_standalone_mwebd_windows.dart | 114 ++++++++++++++++--- 2 files changed, 103 insertions(+), 17 deletions(-) diff --git a/scripts/app_config/configure_stack_wallet.sh b/scripts/app_config/configure_stack_wallet.sh index 3de44a6aa..c68de3f3e 100755 --- a/scripts/app_config/configure_stack_wallet.sh +++ b/scripts/app_config/configure_stack_wallet.sh @@ -53,7 +53,11 @@ dart "${APP_PROJECT_ROOT_DIR}/tool/gen_interfaces.dart" \ MWEBD_EXE_SHA256="" if [[ "$1" == "windows" ]]; then - dart "${APP_PROJECT_ROOT_DIR}/tool/build_standalone_mwebd_windows.dart" + if [[ "${MWEBD_FETCH:-0}" == "1" ]]; then + dart "${APP_PROJECT_ROOT_DIR}/tool/build_standalone_mwebd_windows.dart" --fetch + else + dart "${APP_PROJECT_ROOT_DIR}/tool/build_standalone_mwebd_windows.dart" + fi MWEBD_EXE_SHA256="$(sha256sum "${APP_PROJECT_ROOT_DIR}/assets/windows/mwebd.exe" | awk '{print $1}')" dart "${APP_PROJECT_ROOT_DIR}/tool/process_pubspec_deps.dart" \ "${PUBSPEC_FILE}" MWEBDEXE diff --git a/tool/build_standalone_mwebd_windows.dart b/tool/build_standalone_mwebd_windows.dart index 012c82f22..3f8c1785f 100644 --- a/tool/build_standalone_mwebd_windows.dart +++ b/tool/build_standalone_mwebd_windows.dart @@ -1,8 +1,68 @@ import 'dart:io'; -Future main() async { +const _mwebdVersion = "v0.1.8"; +const _defaultFetchBaseUrl = + "https://github.com/cypherstack/stack_wallet/releases/download"; + +Future main(List args) async { final projectToolDir = File(Platform.script.toFilePath()).parent; + if (args.contains("--fetch")) { + await _fetchPrebuilt(projectToolDir); + } else { + await _buildFromSource(projectToolDir); + } +} + +Future _fetchPrebuilt(Directory projectToolDir) async { + final baseUrl = + Platform.environment["MWEBD_FETCH_BASE_URL"] ?? _defaultFetchBaseUrl; + final tag = "mwebd-$_mwebdVersion"; + + final winAssetsDir = Directory( + "${projectToolDir.parent.path}" + "${Platform.pathSeparator}assets" + "${Platform.pathSeparator}windows", + ); + if (!(await winAssetsDir.exists())) { + await winAssetsDir.create(recursive: true); + } + final exePath = "${winAssetsDir.path}${Platform.pathSeparator}mwebd.exe"; + final shaPath = "$exePath.sha256"; + + await _waitForProcess( + await Process.start( + "curl", + ["-fL", "-o", exePath, "$baseUrl/$tag/mwebd.exe"], + runInShell: true, + mode: ProcessStartMode.inheritStdio, + ), + ); + await _waitForProcess( + await Process.start( + "curl", + ["-fL", "-o", shaPath, "$baseUrl/$tag/mwebd.exe.sha256"], + runInShell: true, + mode: ProcessStartMode.inheritStdio, + ), + ); + + final expected = (await File( + shaPath, + ).readAsString()).trim().split(RegExp(r"\s+")).first; + final actual = (await Process.run("sha256sum", [ + exePath, + ], runInShell: true)).stdout.toString().trim().split(RegExp(r"\s+")).first; + if (expected.toLowerCase() != actual.toLowerCase()) { + stderr.writeln( + "mwebd.exe sha256 mismatch: expected $expected, got $actual", + ); + exit(1); + } + await File(shaPath).delete(); +} + +Future _buildFromSource(Directory projectToolDir) async { // setup temp build dir final tempBuildDir = Directory( "${projectToolDir.path}" @@ -15,12 +75,17 @@ Future main() async { // change working dir and clone mwebd Directory.current = tempBuildDir; - final clone = await Process.start("git", [ - "clone", - "https://www.github.com/ltcmweb/mwebd.git", - "--branch", - "v0.1.8", - ], runInShell: true, mode: ProcessStartMode.inheritStdio); + final clone = await Process.start( + "git", + [ + "clone", + "https://www.github.com/ltcmweb/mwebd.git", + "--branch", + _mwebdVersion, + ], + runInShell: true, + mode: ProcessStartMode.inheritStdio, + ); await _waitForProcess(clone); // change working dir and build mwebd.exe @@ -33,23 +98,40 @@ Future main() async { if (Platform.isWindows && isCI) { build = await Process.start( "go", - ["build", "-v", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], + [ + "build", + "-v", + "-o", + "../mwebd.exe", + "github.com/ltcmweb/mwebd/cmd/mwebd", + ], environment: {"CGO_ENABLED": "1"}, runInShell: true, mode: ProcessStartMode.inheritStdio, ); } else if (Platform.isWindows) { - build = await Process.start("wsl", [ - "bash", - "-l", - "-c", - "GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc " - "go build -v -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd", - ], runInShell: true, mode: ProcessStartMode.inheritStdio); + build = await Process.start( + "wsl", + [ + "bash", + "-l", + "-c", + "GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc " + "go build -v -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd", + ], + runInShell: true, + mode: ProcessStartMode.inheritStdio, + ); } else { build = await Process.start( "go", - ["build", "-v", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"], + [ + "build", + "-v", + "-o", + "../mwebd.exe", + "github.com/ltcmweb/mwebd/cmd/mwebd", + ], environment: { "GOOS": "windows", "GOARCH": "amd64", From c5005a0baf74681b2d08b562037c9d8cc37c81d4 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 22:17:52 -0700 Subject: [PATCH 06/10] Add workflow to publish prebuilt mwebd.exe as a release asset --- .github/workflows/release-mwebd-windows.yaml | 50 ++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release-mwebd-windows.yaml diff --git a/.github/workflows/release-mwebd-windows.yaml b/.github/workflows/release-mwebd-windows.yaml new file mode 100644 index 000000000..c826ac878 --- /dev/null +++ b/.github/workflows/release-mwebd-windows.yaml @@ -0,0 +1,50 @@ +name: Release mwebd Windows binary + +on: + workflow_dispatch: + inputs: + mwebd_version: + description: 'mwebd tag to build (must match _mwebdVersion in tool/build_standalone_mwebd_windows.dart)' + required: true + default: 'v0.1.8' + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Clone mwebd + run: git clone https://github.com/ltcmweb/mwebd.git --branch "${{ inputs.mwebd_version }}" mwebd + + - name: Build mwebd.exe + working-directory: mwebd + env: + CGO_ENABLED: '1' + run: go build -v -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd + + - name: Compute sha256 + run: sha256sum mwebd.exe | awk '{print $1}' > mwebd.exe.sha256 + + - name: Publish release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + TAG="mwebd-${{ inputs.mwebd_version }}" + if gh release view "$TAG" >/dev/null 2>&1; then + gh release upload "$TAG" mwebd.exe mwebd.exe.sha256 --clobber + else + gh release create "$TAG" \ + --title "mwebd ${{ inputs.mwebd_version }} (windows-amd64)" \ + --notes "Pre-built Windows binary for ltcmweb/mwebd ${{ inputs.mwebd_version }}, built with native Go on windows-latest. Used by the Stack Wallet Windows build via tool/build_standalone_mwebd_windows.dart --fetch." \ + mwebd.exe mwebd.exe.sha256 + fi From 86139a1371a2688c543ced172855cc5208a361a7 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 23:33:20 -0700 Subject: [PATCH 07/10] Update frostdart submodule --- crypto_plugins/frostdart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/frostdart b/crypto_plugins/frostdart index 7a19f7dff..8f96d009f 160000 --- a/crypto_plugins/frostdart +++ b/crypto_plugins/frostdart @@ -1 +1 @@ -Subproject commit 7a19f7dff54d222b191bdbe10d1e3e873bf6ed82 +Subproject commit 8f96d009f89ec28bb55bfb68c1f5ea685e153f9c From 69e4e68e9172e539205f4d91e49ee75bffb0f3d1 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 4 May 2026 23:58:04 -0700 Subject: [PATCH 08/10] ci(linux): use system jsoncpp/libsecret to unblock flutter build linux The Linux CI step ran flutter build linux --release without first building the local jsoncpp/libsecret artifacts that linux/CMakeLists.txt hardcoded, so ninja failed looking for scripts/linux/build/jsoncpp/.../libjsoncpp.so. Add a USE_SYSTEM_SECURE_STORAGE_DEPS switch to the Linux CMakeLists template: when set (or the same-named env var is "1"), link against the pkg-config-resolved system jsoncpp and libsecret-1 and bundle the .so files from their reported libdir; otherwise keep the existing local-build path used by scripts/linux/build_all.sh. Set USE_SYSTEM_SECURE_STORAGE_DEPS=1 on the build-linux job, where the stackwallet-ci image already provides libjsoncpp-dev and libsecret-1-dev. --- .github/workflows/build.yaml | 2 + .../app_config/templates/linux/CMakeLists.txt | 82 ++++++++++++------- 2 files changed, 56 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 274ab9d3d..06381ede2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -74,6 +74,8 @@ jobs: run: echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart - name: Build + env: + USE_SYSTEM_SECURE_STORAGE_DEPS: "1" run: flutter build linux --release - name: Package diff --git a/scripts/app_config/templates/linux/CMakeLists.txt b/scripts/app_config/templates/linux/CMakeLists.txt index cd44acde4..675a23f25 100644 --- a/scripts/app_config/templates/linux/CMakeLists.txt +++ b/scripts/app_config/templates/linux/CMakeLists.txt @@ -53,24 +53,37 @@ endfunction() set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") add_subdirectory(${FLUTTER_MANAGED_DIR}) -# build libjsoncpp and libsecret for flutter_secure_storage -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/pkg-config") -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/pc") - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/include) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build) - -add_library(jsoncpp SHARED IMPORTED) -set_target_properties(jsoncpp PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so") -add_library(secret-1 SHARED IMPORTED) -set_target_properties(secret-1 PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so") - # System-level dependencies. find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +# jsoncpp and libsecret for flutter_secure_storage. When +# USE_SYSTEM_SECURE_STORAGE_DEPS is set, link and bundle the system-installed +# copies; otherwise use the artifacts built by scripts/linux/build_secure_storage_deps.sh. +option(USE_SYSTEM_SECURE_STORAGE_DEPS "Link against system-installed jsoncpp and libsecret" OFF) +if(DEFINED ENV{USE_SYSTEM_SECURE_STORAGE_DEPS} AND "$ENV{USE_SYSTEM_SECURE_STORAGE_DEPS}" STREQUAL "1") + set(USE_SYSTEM_SECURE_STORAGE_DEPS ON) +endif() + +if(USE_SYSTEM_SECURE_STORAGE_DEPS) + pkg_check_modules(JSONCPP REQUIRED IMPORTED_TARGET jsoncpp) + pkg_check_modules(LIBSECRET REQUIRED IMPORTED_TARGET libsecret-1) + pkg_get_variable(JSONCPP_LIBDIR jsoncpp libdir) + pkg_get_variable(LIBSECRET_LIBDIR libsecret-1 libdir) +else() + set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/pkg-config") + set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/pc") + + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/include) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build) + + add_library(jsoncpp SHARED IMPORTED) + set_target_properties(jsoncpp PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so") + add_library(secret-1 SHARED IMPORTED) + set_target_properties(secret-1 PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so") +endif() + add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") # Define the application target. To change its name, change BINARY_NAME above, @@ -91,8 +104,12 @@ apply_standard_settings(${BINARY_NAME}) target_link_libraries(${BINARY_NAME} PRIVATE -static-libgcc -static-libstdc++) target_link_libraries(${BINARY_NAME} PRIVATE flutter) target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) -target_link_libraries(${BINARY_NAME} PRIVATE jsoncpp) -target_link_libraries(${BINARY_NAME} PRIVATE secret-1) +if(USE_SYSTEM_SECURE_STORAGE_DEPS) + target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::JSONCPP PkgConfig::LIBSECRET) +else() + target_link_libraries(${BINARY_NAME} PRIVATE jsoncpp) + target_link_libraries(${BINARY_NAME} PRIVATE secret-1) +endif() # Run the Flutter tool portions of the build. This must not be removed. @@ -147,19 +164,28 @@ if(INCLUDE_MWC_SO) COMPONENT Runtime) endif() -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so.1.7.4" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so.1" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) +if(USE_SYSTEM_SECURE_STORAGE_DEPS) + file(GLOB JSONCPP_SO_FILES "${JSONCPP_LIBDIR}/libjsoncpp.so*") + install(FILES ${JSONCPP_SO_FILES} DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + file(GLOB LIBSECRET_SO_FILES "${LIBSECRET_LIBDIR}/libsecret-1.so*") + install(FILES ${LIBSECRET_SO_FILES} DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +else() + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so.1.7.4" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so.1" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so.0.0.0" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so.0" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so.0.0.0" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so.0" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/libsecret/_build/libsecret/libsecret-1.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" From faf3f30b73f7ecdf16311083850dc87d824bc07f Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 5 May 2026 00:06:54 -0700 Subject: [PATCH 09/10] ci(android): drop ndk.abiFilters to allow --split-per-abi AGP rejects ndk.abiFilters alongside the abi splits config that `flutter build apk --split-per-abi` enables. Drop the explicit filter in the Android build.gradle template; Flutter's default android-arm, android-arm64, android-x64 set is what we want anyway, and the CI's APK-renaming step already references those ABI names. --- scripts/app_config/templates/android/app/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/app_config/templates/android/app/build.gradle b/scripts/app_config/templates/android/app/build.gradle index 6a98be40f..8fee78399 100644 --- a/scripts/app_config/templates/android/app/build.gradle +++ b/scripts/app_config/templates/android/app/build.gradle @@ -45,9 +45,9 @@ android { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") } - ndk { - abiFilters "x86_64","armeabi-v7a", "arm64-v8a" - } + // No ndk.abiFilters here: AGP rejects it alongside the abi splits set + // up by `flutter build apk --split-per-abi`. Flutter defaults to + // android-arm,android-arm64,android-x64 which is the same set we want. // externalNativeBuild { // cmake { From 2361370135f096cb66c0401b73b3af16c4686b75 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 5 May 2026 00:11:47 -0700 Subject: [PATCH 10/10] Bump frostdart submodule to v0.1.3 Brings in the openssl + openssl-sys MSRV pins for rustc 1.71. --- crypto_plugins/frostdart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/frostdart b/crypto_plugins/frostdart index 8f96d009f..38fd03cb5 160000 --- a/crypto_plugins/frostdart +++ b/crypto_plugins/frostdart @@ -1 +1 @@ -Subproject commit 8f96d009f89ec28bb55bfb68c1f5ea685e153f9c +Subproject commit 38fd03cb57e16baf2b3d2ce1743f7a745a6416c3