use enum for arch

pull/4/head
fuwa 4 years ago
parent 9fba251031
commit 5d458d11be

@ -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';

@ -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);