mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 07:54:44 +08:00
fix https://github.com/StarCitizenToolBox/app/issues/27 : unp4k missing runtime
This commit is contained in:
@ -83,10 +83,7 @@ class Unp4kCModel extends _$Unp4kCModel {
|
||||
errorMessage: "${state.errorMessage}\n${event.data}");
|
||||
}
|
||||
if (!_hasUnp4kRunTimeError) {
|
||||
if (state.errorMessage.contains(
|
||||
"You must install .NET to run this application") ||
|
||||
state.errorMessage.contains(
|
||||
"You must install or update .NET to run this application")) {
|
||||
if (checkRunTimeError(state.errorMessage)) {
|
||||
_hasUnp4kRunTimeError = true;
|
||||
AnalyticsApi.touch("unp4k_no_runtime");
|
||||
}
|
||||
@ -246,6 +243,19 @@ class Unp4kCModel extends _$Unp4kCModel {
|
||||
}
|
||||
}
|
||||
|
||||
static bool checkRunTimeError(String errorMessage) {
|
||||
if (errorMessage
|
||||
.contains("You must install .NET to run this application") ||
|
||||
errorMessage.contains(
|
||||
"You must install or update .NET to run this application") ||
|
||||
errorMessage.contains(
|
||||
"It was not possible to find any compatible framework version")) {
|
||||
AnalyticsApi.touch("unp4k_no_runtime");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static Future<Uint8List> unp4kTools(
|
||||
String applicationBinaryModuleDir, List<String> args) async {
|
||||
await BinaryModuleConf.extractModule(
|
||||
|
Reference in New Issue
Block a user