From eec78586288b8ca9490dcacc7079c26ca9e6d08b Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Wed, 1 Jan 2025 19:27:05 +0900 Subject: [PATCH] isDbug windows bug fixed --- lib/model/app_data.g.dart | 2 +- lib/utils/system_util.dart | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/model/app_data.g.dart b/lib/model/app_data.g.dart index 19c4e9e..99ded3d 100644 --- a/lib/model/app_data.g.dart +++ b/lib/model/app_data.g.dart @@ -9,7 +9,7 @@ part of 'app_data.dart'; AppData _$AppDataFromJson(Map json) => AppData() ..name = json['name'] as String ..version = json['version'] as String - ..gitCount = json['gitCount'] as int? + ..gitCount = (json['gitCount'] as num?)?.toInt() ..gitHash = json['gitHash'] as String ..buildDate = json['buildDate'] as String; diff --git a/lib/utils/system_util.dart b/lib/utils/system_util.dart index 8228ab6..2eb0848 100644 --- a/lib/utils/system_util.dart +++ b/lib/utils/system_util.dart @@ -7,7 +7,7 @@ import 'package:dart_framework/utils/path.dart'; import 'package:yaml/yaml.dart'; import 'package:path/path.dart' as path; -const int intMax = 0x7FFFFFFFFFFFFFFF; +const int intMax = 0x7FFFFFFFFFFFFFFF; const int intMin = -0x8000000000000000; bool isDebug = true; @@ -23,12 +23,12 @@ Future initialize(String name, String appID) async { appName = name; scriptPath = Platform.script.toFilePath(windows: Platform.isWindows); executablePath = Platform.executable; - isDebug = path.basename(Platform.resolvedExecutable) == 'dart'; + isDebug = + path.basenameWithoutExtension(Platform.resolvedExecutable) == 'dart'; userPath = await Path.userPath; dataPath = await Path.dataPath; } - Map?> envArguments(List arguments) { var dic = ?>{}; var list = []; @@ -132,4 +132,4 @@ Future readFileByte(String filePath) async { }); c.complete(bytes); return c.future; -} \ No newline at end of file +}