use enum for arch

This commit is contained in:
fuwa
2019-12-28 13:47:37 +00:00
parent 9fba251031
commit 5d458d11be
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -24,11 +24,13 @@ import 'config/cyberwow.dart' as cryptoConfig;
final c = cryptoConfig.config;
const arch = 'arm64';
enum Arch { arm64, x86_64 }
const arch = Arch.arm64;
// const arch = 'x86_64';
const minimumHeight = 118361;
const isEmu = arch == 'x86_64';
const isEmu = identical(arch, Arch.x86_64);
const emuHost = '192.168.10.100';
const host = isEmu ? emuHost : '127.0.0.1';
+1 -1
View File
@@ -123,7 +123,7 @@ class _CyberWOW_PageState extends State<CyberWOW_Page> with WidgetsBindingObserv
LoadingState _loadingState = await _blankState.next(loadingText);
final binName = config.c.outputBin;
final resourcePath = 'native/output/' + config.arch + '/' + binName;
final resourcePath = 'native/output/' + describeEnum(config.arch) + '/' + binName;
final bundle = DefaultAssetBundle.of(context);
final loading = process.deployBinary(bundle, resourcePath, binName);