mirror of
https://github.com/wownero/cyberwow.git
synced 2026-11-12 11:13:55 +01:00
add crypto config
This commit is contained in:
@@ -19,8 +19,10 @@ along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
const outputBin = 'wownerod';
|
||||
const appPath = 'wownerod';
|
||||
import 'config/prototype.dart';
|
||||
import 'config/cyberwow.dart' as cryptoConfig;
|
||||
|
||||
final config = cryptoConfig.config;
|
||||
|
||||
const arch = 'arm64';
|
||||
// const arch = 'x86_64';
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'prototype.dart';
|
||||
|
||||
final config = CryptoConfig
|
||||
(
|
||||
'wownerod',
|
||||
'wownerod',
|
||||
);
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
class CryptoConfig {
|
||||
final String outputBin;
|
||||
final String appPath;
|
||||
CryptoConfig
|
||||
(
|
||||
this.outputBin,
|
||||
this.appPath,
|
||||
);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ Stream<String> runBinary (String name) async* {
|
||||
|
||||
final appDocDir = await getApplicationDocumentsDirectory();
|
||||
final appDocPath = appDocDir.path;
|
||||
final binDir = new Directory(appDocDir.path + "/" + appPath);
|
||||
final binDir = new Directory(appDocDir.path + "/" + config.appPath);
|
||||
|
||||
await binDir.create();
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
const loadingText = "Follow the white rabbit.";
|
||||
LoadingState _loadingState = await _blankState.next(loadingText);
|
||||
|
||||
const binName = outputBin;
|
||||
const resourcePath = 'native/output/' + arch + '/' + binName;
|
||||
final binName = config.outputBin;
|
||||
final resourcePath = 'native/output/' + arch + '/' + binName;
|
||||
final bundle = DefaultAssetBundle.of(context);
|
||||
final loading = deployBinary(bundle, resourcePath, binName);
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class LoadingState extends HookedState {
|
||||
}
|
||||
}
|
||||
|
||||
final outputBinExists = await binaryExists(outputBin);
|
||||
final outputBinExists = await binaryExists(config.outputBin);
|
||||
if (outputBinExists) {
|
||||
await load();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user