This commit is contained in:
xkeyC 2024-01-29 23:14:55 +08:00
parent 52d178a609
commit 6376c2d607

View File

@ -6,6 +6,7 @@ import 'package:starcitizen_doctor/api/api.dart';
import 'package:starcitizen_doctor/base/ui_model.dart'; import 'package:starcitizen_doctor/base/ui_model.dart';
import 'package:starcitizen_doctor/common/conf/app_conf.dart'; import 'package:starcitizen_doctor/common/conf/app_conf.dart';
import 'package:starcitizen_doctor/common/conf/url_conf.dart'; import 'package:starcitizen_doctor/common/conf/url_conf.dart';
import 'package:starcitizen_doctor/common/helper/system_helper.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
import 'package:html/parser.dart'; import 'package:html/parser.dart';
@ -90,21 +91,21 @@ class UpgradeDialogUIModel extends BaseUIModel {
return; return;
} }
// try { try {
// final r = await (Process.run( final r = await (Process.run(
// SystemHelper.powershellPath, ["start", fileName, "/SILENT"])); SystemHelper.powershellPath, ["start", fileName, "/SILENT"]));
// if (r.stderr.toString().isNotEmpty) { if (r.stderr.toString().isNotEmpty) {
// throw r.stderr; throw r.stderr;
// } }
// exit(0); exit(0);
// } catch (_) { } catch (_) {
// isUpgrading = false; isUpgrading = false;
// progress = null; progress = null;
// showToast(context!, "运行失败,请尝试手动安装!"); showToast(context!, "运行失败,请尝试手动安装!");
// Process.run(SystemHelper.powershellPath, Process.run(SystemHelper.powershellPath,
// ["explorer.exe", "/select,\"$fileName\""]); ["explorer.exe", "/select,\"$fileName\""]);
// notifyListeners(); notifyListeners();
// } }
} }
void doCancel() { void doCancel() {