arm success

This commit is contained in:
Marco Salazar 2022-09-01 16:51:06 +08:00
parent 550752f11b
commit 6ee57ab217
4 changed files with 22 additions and 12 deletions

View file

@ -70,16 +70,18 @@ void main() async {
}
// FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
await Hive.initFlutter(appDirectory.path);
final isar = await Isar.open(
[LogSchema],
directory: appDirectory.path,
inspector: false,
);
await Logging.instance.init(isar);
await DebugService.instance.init(isar);
if(!(Logging.isArmLinux || Logging.isTestEnv)) {
final isar = await Isar.open(
[LogSchema],
directory: appDirectory.path,
inspector: false,
);
await Logging.instance.init(isar);
await DebugService.instance.init(isar);
// clear out all info logs on startup. No need to await and block
DebugService.instance.purgeInfoLogs();
// clear out all info logs on startup. No need to await and block
DebugService.instance.purgeInfoLogs();
}
// Registering Transaction Model Adapters
Hive.registerAdapter(TransactionDataAdapter());

View file

@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:core' as core;
import 'dart:core';
import 'dart:io';
import 'package:flutter/foundation.dart';
@ -11,6 +12,8 @@ import 'package:stackwallet/utilities/enums/log_level_enum.dart';
export 'enums/log_level_enum.dart';
class Logging {
static const isArmLinux =
bool.fromEnvironment("IS_ARM");
static final isTestEnv = Platform.environment["FLUTTER_TEST"] == "true";
Logging._();
static final Logging _instance = Logging._();
@ -25,7 +28,7 @@ class Logging {
}
Future<void> initInIsolate() async {
if (isTestEnv) {
if (isTestEnv || isArmLinux) {
// do this for now until we mock Isar properly for testing
isar = null;
return;
@ -42,7 +45,7 @@ class Logging {
core.bool printToConsole = true,
core.bool printFullLength = false,
}) {
if (isTestEnv) {
if (isTestEnv || isArmLinux) {
Logger.print(object, normalLength: !printFullLength);
return;
}

View file

@ -1,5 +1,9 @@
#!/bin/bash
# for arm
# flutter-elinux clean
# flutter-elinux pub get
# flutter-elinux build linux --dart-define="IS_ARM=true"
mkdir build
./build_secure_storage_deps.sh &
(cd ../../crypto_plugins/flutter_liblelantus/scripts/linux && ./build_all.sh ) &

View file

@ -5,8 +5,8 @@ mkdir build
# Build JsonCPP
cd build
git clone https://github.com/open-source-parsers/jsoncpp.git
git checkout 48d2a69d47bbf92337a09fc1672e1bad39fdde86
cd jsoncpp
git checkout 1.7.4
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles" ..
@ -15,6 +15,7 @@ make -j$(nproc)
cd $LINUX_DIRECTORY
# Build libSecret
# sudo apt install meson libgirepository1.0-dev valac xsltproc gi-docgen docbook-xsl
# sudo apt install python3-pip
#pip3 install --user meson --upgrade
# pip3 install --user gi-docgen
cd build