Revert "Revert "monero: update dependencies"" (#3115)
What changed, and why it matters
This commit is a routine dependency update for the Monero-related libraries used by Cake Wallet. It reverts an earlier revert, bumps the 'monero_c' code to a newer commit, changes how prebuilt native library files are named and organized, and fixes macOS build scripts. There is no direct evidence in the commit message or diff that this fixes a known security vulnerability; it appears to be a build/dependency maintenance change.
Treat as a normal dependency bump. Review the monero_c release notes between the old and new refs for any security fixes, verify reproducible builds or checksums for the downloaded prebuilt binaries, and run the existing wallet/restore integration tests before release. No immediate security response is indicated by the diff alone.
Security signals we found
Dependency update for core wallet cryptography library (monero_c / libwallet2_api_c)
No explicit security claim in commit title or message
No CVE, advisory, or vulnerability description present in supplied materials
No source-code-level security fix visible; changes are build/packaging/dependency metadata
Evidence from the diff
The commit updates the monero_c dependency from ref 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 to bc8d1a0b75b97156d71579581b4cdfe58c777ed2 and adjusts build scripts, CI workflow, CMake install rules, Xcode project references, and test helpers to match a new release layout where native libraries are placed under scripts/monero_c/release/
Changed components
cw_monero package dependency on monero_ccw_wownero package dependency on monero_ccw_zano package dependency on monero_cAndroid native library packaging (jniLibs)iOS framework generation scriptsmacOS Xcode project and dylib packagingLinux CMake install rulesCI workflow pr_test_build_linux.ymlscripts/prepare_moneroc.shInspect captured patch +163 / −139
diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml
index d009e32e..36fb28a2 100644
--- a/.github/workflows/pr_test_build_linux.yml
+++ b/.github/workflows/pr_test_build_linux.yml
@@ -113,12 +113,15 @@ jobs:
- name: Build monero_c
run: |
- mkdir -p scripts/monero_c
- pushd scripts/monero_c
- wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
- unzip release-bundle.zip
- rm release-bundle.zip
- unxz -fv release/*/*.xz
+ ./scripts/prepare_moneroc.sh
+ mkdir -p scripts/monero_c/release
+ pushd scripts/monero_c/release
+ mkdir -p $(git describe --tags)
+ pushd $(git describe --tags)
+ wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
+ unzip release-bundle.zip
+ rm release-bundle.zip
+ popd
popd
- name: Execute Build and Setup Commands
@@ -218,7 +221,7 @@ jobs:
exec timeout --signal=SIGKILL 900 flutter drive --driver=test_driver/integration_test.dart --target=integration_test/test_suites/restore_wallet_through_seeds_flow_test.dart
- name: Test [cw_monero]
timeout-minutes: 15
- run: cd cw_monero && flutter test --verbose
+ run: cd cw_monero && flutter test
- name: Stop screen recording, encrypt and upload
if: always()
run: |
diff --git a/android/app/src/main/jniLibs/.gitignore b/android/app/src/main/jniLibs/.gitignore
new file mode 100644
index 00000000..af6e9106
--- /dev/null
+++ b/android/app/src/main/jniLibs/.gitignore
@@ -0,0 +1 @@
+lib*_wallet2_api_c.so
diff --git a/android/app/src/main/jniLibs/arm64-v8a/libmonero_libwallet2_api_c.so b/android/app/src/main/jniLibs/arm64-v8a/libmonero_libwallet2_api_c.so
deleted file mode 120000
index 6cdcd70a..00000000
--- a/android/app/src/main/jniLibs/arm64-v8a/libmonero_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/monero/aarch64-linux-android_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/arm64-v8a/libwownero_libwallet2_api_c.so b/android/app/src/main/jniLibs/arm64-v8a/libwownero_libwallet2_api_c.so
deleted file mode 120000
index 8f6150ee..00000000
--- a/android/app/src/main/jniLibs/arm64-v8a/libwownero_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/wownero/aarch64-linux-android_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/arm64-v8a/libzano_libwallet2_api_c.so b/android/app/src/main/jniLibs/arm64-v8a/libzano_libwallet2_api_c.so
deleted file mode 120000
index 49ddd0f4..00000000
--- a/android/app/src/main/jniLibs/arm64-v8a/libzano_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/zano/aarch64-linux-android_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/armeabi-v7a/libmonero_libwallet2_api_c.so b/android/app/src/main/jniLibs/armeabi-v7a/libmonero_libwallet2_api_c.so
deleted file mode 120000
index c0d56dd3..00000000
--- a/android/app/src/main/jniLibs/armeabi-v7a/libmonero_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/monero/armv7a-linux-androideabi_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/armeabi-v7a/libwownero_libwallet2_api_c.so b/android/app/src/main/jniLibs/armeabi-v7a/libwownero_libwallet2_api_c.so
deleted file mode 120000
index 5a71e87b..00000000
--- a/android/app/src/main/jniLibs/armeabi-v7a/libwownero_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/wownero/armv7a-linux-androideabi_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/armeabi-v7a/libzano_libwallet2_api_c.so b/android/app/src/main/jniLibs/armeabi-v7a/libzano_libwallet2_api_c.so
deleted file mode 120000
index 43f9b98b..00000000
--- a/android/app/src/main/jniLibs/armeabi-v7a/libzano_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/zano/armv7a-linux-androideabi_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/x86_64/libmonero_libwallet2_api_c.so b/android/app/src/main/jniLibs/x86_64/libmonero_libwallet2_api_c.so
deleted file mode 120000
index 654be50b..00000000
--- a/android/app/src/main/jniLibs/x86_64/libmonero_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/monero/x86_64-linux-android_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/x86_64/libwownero_libwallet2_api_c.so b/android/app/src/main/jniLibs/x86_64/libwownero_libwallet2_api_c.so
deleted file mode 120000
index bb3da908..00000000
--- a/android/app/src/main/jniLibs/x86_64/libwownero_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/wownero/x86_64-linux-android_libwallet2_api_c.so
\ No newline at end of file
diff --git a/android/app/src/main/jniLibs/x86_64/libzano_libwallet2_api_c.so b/android/app/src/main/jniLibs/x86_64/libzano_libwallet2_api_c.so
deleted file mode 120000
index 8c37d73c..00000000
--- a/android/app/src/main/jniLibs/x86_64/libzano_libwallet2_api_c.so
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../scripts/monero_c/release/zano/x86_64-linux-android_libwallet2_api_c.so
\ No newline at end of file
diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock
index 2d4bb12e..6f6174d0 100644
--- a/cw_monero/pubspec.lock
+++ b/cw_monero/pubspec.lock
@@ -582,8 +582,8 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
- ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
- resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
+ ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
+ resolved-ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
url: "https://github.com/mrcyjanek/monero_c"
source: git
version: "0.0.0"
diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml
index 3877032b..7f38c0ea 100644
--- a/cw_monero/pubspec.yaml
+++ b/cw_monero/pubspec.yaml
@@ -26,7 +26,7 @@ dependencies:
monero:
git:
url: https://github.com/mrcyjanek/monero_c
- ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
+ ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
path: impls/monero.dart
mutex: ^3.1.0
ledger_flutter_plus: ^1.4.1
@@ -54,7 +54,6 @@ flutter:
# be modified. They are used by the tooling to maintain consistency when
# adding or updating assets for this project.
-
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
diff --git a/cw_monero/test/monero_wallet_service_test.dart b/cw_monero/test/monero_wallet_service_test.dart
index 780caea4..87cd0dbf 100644
--- a/cw_monero/test/monero_wallet_service_test.dart
+++ b/cw_monero/test/monero_wallet_service_test.dart
@@ -18,7 +18,7 @@ import 'utils/setup_monero_c.dart';
Future<void> main() async {
group("MoneroWalletService Tests", () {
late MoneroWalletService walletService;
- late File moneroCBinary;
+ File? moneroCBinary;
setUpAll(() async {
await initDb(pathOverride: './test/data/db');
@@ -34,7 +34,7 @@ Future<void> main() async {
tearDownAll(() {
Directory('./test/data').deleteSync(recursive: true);
- moneroCBinary.deleteSync();
+ moneroCBinary!.deleteSync();
});
group("Create wallet", () {
diff --git a/cw_monero/test/utils/setup_monero_c.dart b/cw_monero/test/utils/setup_monero_c.dart
index 1a098100..20ae78d7 100644
--- a/cw_monero/test/utils/setup_monero_c.dart
+++ b/cw_monero/test/utils/setup_monero_c.dart
@@ -1,16 +1,27 @@
import 'dart:io';
+import 'package:path/path.dart' as p;
File getMoneroCBinary() {
- if (Platform.isWindows)
- return File(
- '../scripts/monero_c/release/monero/x86_64-w64-mingw32_libwallet2_api_c.dll');
- if (Platform.isMacOS) return File('../macos/monero_libwallet2_api_c.dylib');
- return File('../scripts/monero_c/release/monero/x86_64-linux-gnu_libwallet2_api_c.so');
+ final baseDir = Directory('../scripts/monero_c/release');
+
+ final versionDir =
+ baseDir.listSync().whereType<Directory>().map((d) => d.path).firstWhere(
+ (path) => p.basename(path).startsWith('v'),
+ );
+
+ if (Platform.isWindows) {
+ return File(p.join(
+ versionDir, 'x86_64-w64-mingw32', 'libmonero_wallet2_api_c.dll'));
+ }
+ if (Platform.isMacOS) {
+ return File(p.join(versionDir, 'macos', 'libmonero_wallet2_api_c.dylib'));
+ }
+ return File(
+ p.join(versionDir, 'x86_64-linux-gnu', 'libmonero_wallet2_api_c.so'));
}
String get moneroCBinaryName {
- if (Platform.isWindows)
- return "monero_libwallet2_api_c.dll";
- if (Platform.isMacOS) return "monero_libwallet2_api_c.dylib";
- return "/usr/lib/monero_libwallet2_api_c.so";
+ if (Platform.isWindows) return "libmonero_wallet2_api_c.dll";
+ if (Platform.isMacOS) return "libmonero_wallet2_api_c.dylib";
+ return "/usr/lib/libmonero_wallet2_api_c.so";
}
diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock
index e95c3b6c..734af933 100644
--- a/cw_wownero/pubspec.lock
+++ b/cw_wownero/pubspec.lock
@@ -502,8 +502,8 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
- ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
- resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
+ ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
+ resolved-ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
url: "https://github.com/mrcyjanek/monero_c"
source: git
version: "0.0.0"
diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml
index 44657144..a23fc395 100644
--- a/cw_wownero/pubspec.yaml
+++ b/cw_wownero/pubspec.yaml
@@ -24,7 +24,7 @@ dependencies:
monero:
git:
url: https://github.com/mrcyjanek/monero_c
- ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash
+ ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2 # monero_c hash
path: impls/monero.dart
mutex: ^3.1.0
@@ -49,7 +49,6 @@ flutter:
# be modified. They are used by the tooling to maintain consistency when
# adding or updating assets for this project.
-
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
diff --git a/cw_zano/pubspec.lock b/cw_zano/pubspec.lock
index b18f0cfc..662ccded 100644
--- a/cw_zano/pubspec.lock
+++ b/cw_zano/pubspec.lock
@@ -507,8 +507,8 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
- ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
- resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
+ ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
+ resolved-ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2
url: "https://github.com/mrcyjanek/monero_c"
source: git
version: "0.0.0"
diff --git a/cw_zano/pubspec.yaml b/cw_zano/pubspec.yaml
index 54091a85..8eb5d3e1 100644
--- a/cw_zano/pubspec.yaml
+++ b/cw_zano/pubspec.yaml
@@ -25,7 +25,7 @@ dependencies:
monero:
git:
url: https://github.com/mrcyjanek/monero_c
- ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash
+ ref: bc8d1a0b75b97156d71579581b4cdfe58c777ed2 # monero_c hash
path: impls/monero.dart
dev_dependencies:
flutter_test:
@@ -38,7 +38,6 @@ dev_dependencies:
dependency_overrides:
watcher: ^1.1.0
-
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt
index 2356c844..7a45c054 100644
--- a/linux/CMakeLists.txt
+++ b/linux/CMakeLists.txt
@@ -113,14 +113,37 @@ else()
set(LIB_TRIPLET "x86_64-linux-gnu")
endif()
-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/zcash_lib/target/release/libwarp_api_ffi.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libwarp_api_ffi.so"
- COMPONENT Runtime)
+execute_process(
+ COMMAND git describe --tags
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c
+ OUTPUT_VARIABLE MONERO_C_TAG
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/${LIB_TRIPLET}_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "monero_libwallet2_api_c.so"
- COMPONENT Runtime)
+set(MONERO_C_RELEASE_DIR
+ "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/${MONERO_C_TAG}/${LIB_TRIPLET}"
+)
-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/wownero/${LIB_TRIPLET}_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "wownero_libwallet2_api_c.so"
- COMPONENT Runtime)
+install(
+ FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/zcash_lib/target/release/libwarp_api_ffi.so"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ RENAME "libwarp_api_ffi.so"
+ COMPONENT Runtime
+)
+
+install(
+ FILES "${MONERO_C_RELEASE_DIR}/libmonero_wallet2_api_c.so"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ RENAME "libmonero_wallet2_api_c.so"
+ COMPONENT Runtime
+)
+
+install(
+ FILES "${MONERO_C_RELEASE_DIR}/libwownero_wallet2_api_c.so"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ RENAME "libwownero_wallet2_api_c.so"
+ COMPONENT Runtime
+)
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)
diff --git a/macos/.gitignore b/macos/.gitignore
index 746adbb6..ac653c48 100644
--- a/macos/.gitignore
+++ b/macos/.gitignore
@@ -5,3 +5,4 @@
# Xcode-related
**/dgph
**/xcuserdata/
+*.dylib
diff --git a/macos/Podfile.lock b/macos/Podfile.lock
index 1a9b46f8..ccdbe0c7 100644
--- a/macos/Podfile.lock
+++ b/macos/Podfile.lock
@@ -167,34 +167,34 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
SPEC CHECKSUMS:
- bitbox_flutter: 16088f5c7febacf894f4d07bbdfb441c9f0757fe
- breez_sdk_spark_flutter: 2e864a52e699546aedea3d64d0e0cc88bc0ac595
- connectivity_plus: 0a976dfd033b59192912fa3c6c7b54aab5093802
- cw_mweb: 7440b12ead811dda972a9918442ea2a458e8742c
- device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
- devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225
+ bitbox_flutter: b3c6d3c4970b134a78a17fddef0ef429cfec2593
+ breez_sdk_spark_flutter: b7826ff465c65d620a03560c28c384f44c2dc383
+ connectivity_plus: 4adf20a405e25b42b9c9f87feff8f4b6fde18a4e
+ cw_mweb: 4746a3b5cc5bd4afe6fadd2481c4f7b239e391d0
+ device_info_plus: b0fafc687fb901e2af612763340f1b0d4352f8e5
+ devicelocale: 456a07c045d3113938aa4983065bd8526e2af792
dnssec_proof: d461cac7bd3301eb7447f87936745a0c1ae0a67e
- fast_scanner: d31bae07e2653403a69dac99fb710c1722b16a97
- file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d
- flutter_inappwebview_macos: bdf207b8f4ebd58e86ae06cd96b147de99a67c9b
- flutter_local_authentication: 85674893931e1c9cfa7c9e4f5973cb8c56b018b0
- flutter_local_notifications: 4ccab5b7a22835214a6672e3f9c5e8ae207dab36
- flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea
+ fast_scanner: a4ead8e56f185cd565e25250fdb97fa669ea1d2e
+ file_selector_macos: 6280b52b459ae6c590af5d78fc35c7267a3c4b31
+ flutter_inappwebview_macos: c2d68649f9f8f1831bfcd98d73fd6256366d9d1d
+ flutter_local_authentication: 2f9a2682f498abcc12d7e9729b5007a947170fdc
+ flutter_local_notifications: 4bf37a31afde695b56091b4ae3e4d9c7a7e6cda0
+ flutter_secure_storage_macos: 3dacac420d84c4d0dc5e868194ee43c8664ec797
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
- in_app_review: 866c9b17c87a7b46a395bda43f5d3ca02deb585a
+ in_app_review: 66e7680752b632d83f4f0e88b34d52ed303fbff4
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
- package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b
- path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
- share_plus: 1fa619de8392a4398bfaf176d441853922614e89
- shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
- sp_scanner: 269d96e0ec3173e69156be7239b95182be3b8303
- sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
+ package_info_plus: f0052d280d17aa382b932f399edf32507174e870
+ path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
+ share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc
+ shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
+ sp_scanner: d9316427b628dd86d6e9e3c5d42ed6b4b410157c
+ sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
- sqlite3_flutter_libs: 86f82662868ee26ff3451f73cac9c5fc2a1f57fa
- torch_dart: 2e94855e15fcc87bd824e179f1f9c3e0f1e1d302
- universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6
- url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404
- wakelock_plus: 9d63063ffb7af1c215209769067c57103bde719d
+ sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1
+ torch_dart: 7e4f682c34ee0d967a35977102590094a7510c90
+ universal_ble: ff19787898040d721109c6324472e5dd4bc86adc
+ url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
+ wakelock_plus: 917609be14d812ddd9e9528876538b2263aaa03b
PODFILE CHECKSUM: 65ec1541137fb5b35d00490dec1bb48d4d9586bb
diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj
index 0b71d21b..6474af82 100644
--- a/macos/Runner.xcodeproj/project.pbxproj
+++ b/macos/Runner.xcodeproj/project.pbxproj
@@ -28,8 +28,8 @@
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
83FF6BF911B29965D3589BE7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD06F8F6E3797AC031038136 /* Pods_Runner.framework */; };
9F565D5929954F53009A75FB /* secRandom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F565D5729954F53009A75FB /* secRandom.swift */; };
- CE75FC4A2C147EBA00CCC46E /* wownero_libwallet2_api_c.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE75FC492C147EBA00CCC46E /* wownero_libwallet2_api_c.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
- CED5DBE42BE59BBF0065028F /* monero_libwallet2_api_c.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = CED5DBE32BE59BBF0065028F /* monero_libwallet2_api_c.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+ CE5899C52F71669A008E754F /* libwownero_wallet2_api_c.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE5899C32F71669A008E754F /* libwownero_wallet2_api_c.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+ CE5899C62F71669A008E754F /* libmonero_wallet2_api_c.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE5899C42F71669A008E754F /* libmonero_wallet2_api_c.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -59,8 +59,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
- CE75FC4A2C147EBA00CCC46E /* wownero_libwallet2_api_c.dylib in CopyFiles */,
- CED5DBE42BE59BBF0065028F /* monero_libwallet2_api_c.dylib in CopyFiles */,
+ CE5899C52F71669A008E754F /* libwownero_wallet2_api_c.dylib in CopyFiles */,
+ CE5899C62F71669A008E754F /* libmonero_wallet2_api_c.dylib in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -90,8 +90,8 @@
9F1E7BFB2BF2D27500C28C9A /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
9F565D5729954F53009A75FB /* secRandom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = secRandom.swift; path = CakeWallet/secRandom.swift; sourceTree = "<group>"; };
BD06F8F6E3797AC031038136 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- CE75FC492C147EBA00CCC46E /* wownero_libwallet2_api_c.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = wownero_libwallet2_api_c.dylib; sourceTree = "<group>"; };
- CED5DBE32BE59BBF0065028F /* monero_libwallet2_api_c.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = monero_libwallet2_api_c.dylib; sourceTree = "<group>"; };
+ CE5899C32F71669A008E754F /* libwownero_wallet2_api_c.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libwownero_wallet2_api_c.dylib; sourceTree = "<group>"; };
+ CE5899C42F71669A008E754F /* libmonero_wallet2_api_c.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libmonero_wallet2_api_c.dylib; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -120,8 +120,8 @@
33CC10E42044A3C60003C045 = {
isa = PBXGroup;
children = (
- CE75FC492C147EBA00CCC46E /* wownero_libwallet2_api_c.dylib */,
- CED5DBE32BE59BBF0065028F /* monero_libwallet2_api_c.dylib */,
+ CE5899C42F71669A008E754F /* libmonero_wallet2_api_c.dylib */,
+ CE5899C32F71669A008E754F /* libwownero_wallet2_api_c.dylib */,
9F565D5729954F53009A75FB /* secRandom.swift */,
33FAB671232836740065AC1E /* Runner */,
33CEB47122A05771004F2AC0 /* Flutter */,
diff --git a/macos/monero_libwallet2_api_c.dylib b/macos/monero_libwallet2_api_c.dylib
deleted file mode 120000
index b0ccd724..00000000
--- a/macos/monero_libwallet2_api_c.dylib
+++ /dev/null
@@ -1 +0,0 @@
-../scripts/monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib
\ No newline at end of file
diff --git a/macos/wownero_libwallet2_api_c.dylib b/macos/wownero_libwallet2_api_c.dylib
deleted file mode 120000
index 6b79a4f0..00000000
--- a/macos/wownero_libwallet2_api_c.dylib
+++ /dev/null
@@ -1 +0,0 @@
-../scripts/monero_c/release/wownero/host-apple-darwin_libwallet2_api_c.dylib
\ No newline at end of file
diff --git a/scripts/android/build_monero_all.sh b/scripts/android/build_monero_all.sh
index 1cec707e..341f1449 100755
--- a/scripts/android/build_monero_all.sh
+++ b/scripts/android/build_monero_all.sh
@@ -1,7 +1,7 @@
#!/bin/bash
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
-# Usage: env USE_DOCKER= ./build_all.sh
+# Usage: env USE_DOCKER= ./build_all.sh
set -x -e
@@ -12,15 +12,33 @@ cd "$(dirname "$0")"
for COIN in monero wownero zano;
do
pushd ../monero_c
+ monero_c_tag=$(git describe --tags)
for target in {x86_64,aarch64}-linux-android armv7a-linux-androideabi
do
- if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
+ if [[ -f "release/${monero_c_tag}/${target}/${COIN}_libwallet2_api_c.so" ]];
then
echo "file exist, not building monero_c for ${COIN}/$target.";
else
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
- unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
fi
+
+ case $target in
+ x86_64-linux-android)
+ mkdir -p ../../android/app/src/main/jniLibs/x86_64 || true
+ cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/x86_64/
+ ;;
+ armv7a-linux-androideabi)
+ mkdir -p ../../android/app/src/main/jniLibs/armeabi-v7a || true
+ cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/armeabi-v7a/
+ ;;
+ aarch64-linux-android)
+ mkdir -p ../../android/app/src/main/jniLibs/arm64-v8a || true
+ cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/arm64-v8a/
+ ;;
+ *)
+ echo "Unsupported target: $target"
+ exit 1;
+ esac
done
popd
done
diff --git a/scripts/ios/build_monero_all.sh b/scripts/ios/build_monero_all.sh
index 69d4f006..0f82c044 100755
--- a/scripts/ios/build_monero_all.sh
+++ b/scripts/ios/build_monero_all.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
+source "$(cd "$(dirname "$0")/.." && pwd)/functions.sh"
. ./config.sh
# ./install_missing_headers.sh
@@ -19,16 +19,8 @@ for COIN in monero wownero zano;
do
pushd ../monero_c
./build_single.sh ${COIN} aarch64-apple-ios -j$MAKE_JOB_COUNT
- ./build_single.sh ${COIN} aarch64-apple-iossimulator -j$MAKE_JOB_COUNT
+ ./build_single.sh ${COIN} aarch64-apple-ios-simulator -j$MAKE_JOB_COUNT
popd
done
-unxz -fk ../monero_c/release/monero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
-unxz -fk ../monero_c/release/wownero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
-unxz -fk ../monero_c/release/zano/aarch64-apple-ios_libwallet2_api_c.dylib.xz
-
-unxz -fk ../monero_c/release/monero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
-unxz -fk ../monero_c/release/wownero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
-unxz -fk ../monero_c/release/zano/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
-
-./gen_framework.sh
\ No newline at end of file
+./gen_framework.sh
diff --git a/scripts/ios/gen_framework.sh b/scripts/ios/gen_framework.sh
index e1c237f8..fda1e197 100755
--- a/scripts/ios/gen_framework.sh
+++ b/scripts/ios/gen_framework.sh
@@ -2,7 +2,8 @@
set -e
IOS_DIR="$(pwd)/../../ios"
-DYLIB_PATH="$(pwd)/../../scripts/monero_c/release"
+monero_c_tag=$(cd $(pwd)/../../scripts/monero_c/; git describe --tags)
+DYLIB_PATH="$(pwd)/../../scripts/monero_c/release/${monero_c_tag}/"
TMP_DIR="${IOS_DIR}/tmp"
rm -rf "${IOS_DIR:?}/MoneroWallet.xcframework" "${IOS_DIR:?}/WowneroWallet.xcframework" "${IOS_DIR:?}/ZanoWallet.xcframework"
@@ -16,7 +17,7 @@ write_info_plist() {
target="$3"
plist_path="${framework_bundle}/Info.plist"
- if [[ "x$target" = "xiossimulator" ]]; then
+ if [[ "x$target" = "xios-simulator" ]]; then
platform="iPhoneSimulator"
dtplatformname="iphonesimulator"
dtsdkname="iphonesimulator17.4"
@@ -97,11 +98,11 @@ create_framework() {
echo "Creating ${framework_name}.framework for target ${target} in ${out_dir}..."
framework_bundle="${out_dir}/${framework_name}.framework"
-
+
rm -rf "$framework_bundle"
mkdir -p "$framework_bundle"
- input_dylib="${DYLIB_PATH}/${wallet}/aarch64-apple-${target}_libwallet2_api_c.dylib"
+ input_dylib="${DYLIB_PATH}/aarch64-apple-${target}/lib${wallet}_wallet2_api_c.dylib"
if [[ ! -f "$input_dylib" ]]; then
echo "Error: Input dylib not found: $input_dylib"
exit 1
@@ -144,7 +145,7 @@ for i in "${!wallets[@]}"; do
mkdir -p "$device_out" "$simulator_out"
create_framework "$wallet" "$framework_name" "ios" "$device_out"
- create_framework "$wallet" "$framework_name" "iossimulator" "$simulator_out"
+ create_framework "$wallet" "$framework_name" "ios-simulator" "$simulator_out"
device_framework="${device_out}/${framework_name}.framework"
simulator_framework="${simulator_out}/${framework_name}.framework"
diff --git a/scripts/linux/build_monero_all.sh b/scripts/linux/build_monero_all.sh
index 6c901052..e17073d3 100755
--- a/scripts/linux/build_monero_all.sh
+++ b/scripts/linux/build_monero_all.sh
@@ -16,13 +16,7 @@ do
else
target="x86_64-linux-gnu"
fi
-
- if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
- then
- echo "file exist, not building monero_c for ${COIN}/$target.";
- else
- ./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
- unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
- fi
+
+ ./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
popd
-done
\ No newline at end of file
+done
diff --git a/scripts/macos/build_monero_all.sh b/scripts/macos/build_monero_all.sh
index f4667424..196def11 100755
--- a/scripts/macos/build_monero_all.sh
+++ b/scripts/macos/build_monero_all.sh
@@ -2,14 +2,14 @@
set -x -e
cd "$(dirname "$0")"
+../prepare_moneroc.sh
NPROC="-j$(sysctl -n hw.logicalcpu)"
MONERO_LIBS=""
WOWNERO_LIBS=""
-MONEROC_RELEASE_DIR="../monero_c/release/monero"
-WOWNEROC_RELEASE_DIR="../monero_c/release/wownero"
+monero_c_tag=$(cd ../monero_c/; git describe --tags)
+MONEROC_RELEASE_DIR="../monero_c/release/${monero_c_tag}"
-../prepare_moneroc.sh
# NOTE: -j1 is intentional. Otherwise you will run into weird behaviour on macos
if [[ ! "x$USE_DOCKER" == "x" ]];
@@ -22,29 +22,26 @@ then
popd
done
else
- ARCHS=(x86_64 arm64)
+ ARCHS=(x86_64 arm64)
for COIN in monero wownero;
do
MONERO_LIBS=""
WOWNERO_LIBS=""
- for ARCH in "${ARCHS[@]}";
- do
- if [[ "$ARCH" == "arm64" ]]; then
- HOST="aarch64-apple-darwin"
- else
- HOST="x86_64-apple-darwin"
- fi
-
- MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
- WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
-
- pushd ../monero_c
+ for ARCH in "${ARCHS[@]}";
+ do
+ if [[ "$ARCH" == "arm64" ]]; then
+ HOST="aarch64-apple-darwin"
+ else
+ HOST="x86_64-apple-darwin"
+ fi
+ MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libmonero_wallet2_api_c.dylib"
+ WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libwownero_wallet2_api_c.dylib"
+ pushd ../monero_c
./build_single.sh ${COIN} ${HOST} -j$MAKE_JOB_COUNT
- unxz -f ./release/${COIN}/${HOST}_libwallet2_api_c.dylib.xz
- popd
- done
+ popd
+ done
done
fi
-lipo -create ${MONERO_LIBS} -output "${MONEROC_RELEASE_DIR}/host-apple-darwin_libwallet2_api_c.dylib"
-lipo -create ${WOWNERO_LIBS} -output "${WOWNEROC_RELEASE_DIR}/host-apple-darwin_libwallet2_api_c.dylib"
+lipo -create ${MONERO_LIBS} -output "${MONEROC_RELEASE_DIR}/../../../../macos/libmonero_wallet2_api_c.dylib"
+lipo -create ${WOWNERO_LIBS} -output "${MONEROC_RELEASE_DIR}/../../../../macos/libwownero_wallet2_api_c.dylib"
diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh
index b5752ad2..2d7b06f0 100755
--- a/scripts/prepare_moneroc.sh
+++ b/scripts/prepare_moneroc.sh
@@ -9,18 +9,17 @@ then
rm -rf monero_c
git clone https://github.com/mrcyjanek/monero_c --branch master monero_c
cd monero_c
- # NOTE: Make sure to update monero_c prebuilds link in workflow files
- # https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
- git checkout 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
- git reset --hard
- git submodule update --init --force --recursive
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- ./apply_patches.sh zano
else
cd monero_c
fi
+# NOTE: Make sure to update monero_c prebuilds link in workflow files
+# https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
+git fetch -a
+git checkout bc8d1a0b75b97156d71579581b4cdfe58c777ed2
+git reset --hard
+git submodule update --init --force --recursive
+
for coin in monero wownero zano;
do
if [[ ! -f "$coin/.patch-applied" ]];
diff --git a/tool/download_moneroc_prebuilds.dart b/tool/download_moneroc_prebuilds.dart
index fd9cd6dd..a12777ad 100644
--- a/tool/download_moneroc_prebuilds.dart
+++ b/tool/download_moneroc_prebuilds.dart
@@ -20,13 +20,11 @@ final List<String> triplets = [
"x86_64-w64-mingw32",
// "x86_64-apple-darwin11", // Intel macbooks (contrib) - not used by cake
// "aarch64-apple-darwin11", // apple silicon macbooks (contrib) - not used by cake
- // "host-apple-darwin", // not available on CI (yet)
// "x86_64-host-apple-darwin", // not available on CI (yet)
"aarch64-apple-darwin", // apple silicon macbooks
"x86_64-apple-darwin", // intel macbooks
- "aarch64-host-apple-darwin", // apple silicon macbooks (local builds)
"aarch64-apple-ios",
- "aarch64-apple-iossimulator",
+ "aarch64-apple-ios-simulator",
];
Future<void> main() async {
Why this scored 30/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.