Build with SQLCipher on desktop

This commit is contained in:
Hanh 2023-03-06 15:31:31 +10:00
parent ed9c61ea98
commit 7a79fc4ce2
7 changed files with 16 additions and 10 deletions

View File

@ -10,7 +10,7 @@ flutter doctor -v
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
mv /tmp/out.toml native/zcash-sync/Cargo.toml
cargo b -r --features=dart_ffi
cargo b -r --features=dart_ffi,sqlcipher
sudo apt-get install -y libunwind-dev
sudo apt-get install -y clang cmake ninja-build libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsecret-1-dev libjsoncpp-dev

View File

@ -12,8 +12,8 @@ flutter doctor -v
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
mv /tmp/out.toml native/zcash-sync/Cargo.toml
cargo b -r --target=x86_64-apple-darwin --features=dart_ffi
cargo b -r --target=aarch64-apple-darwin --features=dart_ffi
cargo b -r --target=x86_64-apple-darwin --features=dart_ffi,sqlcipher
cargo b -r --target=aarch64-apple-darwin --features=dart_ffi,sqlcipher
mkdir -p target/universal/release
lipo target/x86_64-apple-darwin/release/libwarp_api_ffi.dylib target/aarch64-apple-darwin/release/libwarp_api_ffi.dylib -output target/universal/release/libwarp_api_ffi.dylib -create

View File

@ -14,7 +14,7 @@ flutter doctor -v
# DLL
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
mv /tmp/out.toml native/zcash-sync/Cargo.toml
cargo b -r --features=dart_ffi
cargo b -r --features=dart_ffi,sqlcipher
# Codegen
flutter pub get

View File

@ -989,6 +989,7 @@ Future<String?> getDbPasswd(BuildContext context, String dbPath) async {
final confirmed = await showDialog<bool>(
context: context,
barrierColor: Colors.black,
barrierDismissible: false,
builder: (context) {
return AlertDialog(
content: Container(

View File

@ -102,11 +102,16 @@ class FullBackupState extends State<FullBackupPage> {
_onSave(BuildContext context) async {
if (key.text.isNotEmpty) {
settings.setBackupEncKey(key.text);
WarpApi.zipBackup(key.text, settings.tempDir);
final backupPath = p.join(settings.tempDir, BACKUP_NAME);
await exportFile(context, backupPath, BACKUP_NAME);
Navigator.of(context).pop();
try {
settings.setBackupEncKey(key.text);
WarpApi.zipBackup(key.text, settings.tempDir);
final backupPath = p.join(settings.tempDir, BACKUP_NAME);
await exportFile(context, backupPath, BACKUP_NAME);
Navigator.of(context).pop();
}
on String catch (msg) {
showSnackBar(msg);
}
}
}

BIN
misc/ywallet.dmg Normal file

Binary file not shown.

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.3.5+392
version: 1.3.5+393
environment:
sdk: ">=2.12.0 <3.0.0"