mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 06:44:45 +08:00
回滚动态UAC
This commit is contained in:
@ -162,9 +162,6 @@ class HomeUIModel extends BaseUIModel {
|
||||
VoidCallback? doCheck() {
|
||||
if (isChecking) return null;
|
||||
return () async {
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
isChecking = true;
|
||||
lastScreenInfo = "正在分析...";
|
||||
await _statCheck();
|
||||
@ -299,8 +296,7 @@ class HomeUIModel extends BaseUIModel {
|
||||
return;
|
||||
case "no_live_path":
|
||||
try {
|
||||
SystemHelper.powershellAdminRun(
|
||||
['New-Item -ItemType Directory -Path "${item.value}" -Force']);
|
||||
await Directory(item.value).create(recursive: true);
|
||||
showToast(context!, "创建文件夹成功,请尝试继续下载游戏!");
|
||||
checkResult?.remove(item);
|
||||
notifyListeners();
|
||||
@ -329,8 +325,8 @@ class HomeUIModel extends BaseUIModel {
|
||||
final Map eacJson = json.decode(utf8.decode(eacJsonData));
|
||||
final eacID = eacJson["productid"];
|
||||
try {
|
||||
var result = await SystemHelper.powershellAdminRun(
|
||||
["${item.value}\\EasyAntiCheat_EOS_Setup.exe", "install", eacID]);
|
||||
var result = await Process.run(
|
||||
"${item.value}\\EasyAntiCheat_EOS_Setup.exe", ["install", eacID]);
|
||||
dPrint("${item.value}\\EasyAntiCheat_EOS_Setup.exe install $eacID");
|
||||
if (result.stderr == "") {
|
||||
showToast(context!, "修复成功,请尝试启动游戏。(若问题无法解决,请使用工具箱的 《重装 EAC》)");
|
||||
@ -370,9 +366,6 @@ class HomeUIModel extends BaseUIModel {
|
||||
showToast(context!, "该功能需要一个有效的安装位置");
|
||||
return;
|
||||
}
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
showDialog(
|
||||
context: context!,
|
||||
dismissWithEsc: false,
|
||||
@ -387,9 +380,6 @@ class HomeUIModel extends BaseUIModel {
|
||||
showToast(context!, "该功能需要一个有效的安装位置");
|
||||
return;
|
||||
}
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
AnalyticsApi.touch("performance_launch");
|
||||
BaseUIContainer(
|
||||
uiCreate: () => PerformanceUI(),
|
||||
|
@ -211,9 +211,6 @@ class ToolsUIModel extends BaseUIModel {
|
||||
showToast(context!, "该功能需要一个有效的游戏安装目录");
|
||||
return;
|
||||
}
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
working = true;
|
||||
try {
|
||||
final eacPath = "$scInstalledPath\\EasyAntiCheat";
|
||||
@ -354,10 +351,6 @@ class ToolsUIModel extends BaseUIModel {
|
||||
"P4k 是星际公民的核心游戏文件,高达近 100GB,盒子提供的离线下载是为了帮助一些p4k文件下载超级慢的用户。"
|
||||
"\n\n接下来会弹窗询问您保存位置(可以选择星际公民文件夹也可以选择别处),下载完成后请确保 P4K 文件夹位于 LIVE 文件夹内,之后使用星际公民启动器校验更新即可。");
|
||||
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
|
||||
AnalyticsApi.touch("p4k_download");
|
||||
final r = await showDialog(
|
||||
context: context!,
|
||||
|
Reference in New Issue
Block a user