mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-07-05 01:26:07 +08:00
bug fix
This commit is contained in:
@ -16,8 +16,8 @@ import 'package:window_manager/window_manager.dart';
|
||||
import '../base/ui.dart';
|
||||
|
||||
class AppConf {
|
||||
static const String appVersion = "2.9.10 Beta";
|
||||
static const int appVersionCode = 25;
|
||||
static const String appVersion = "2.9.12 Beta";
|
||||
static const int appVersionCode = 27;
|
||||
static const String appVersionDate = "2023-11-03";
|
||||
|
||||
static const String gitlabHomeUrl =
|
||||
@ -46,9 +46,6 @@ class AppConf {
|
||||
static const isMSE =
|
||||
String.fromEnvironment("MSE", defaultValue: "false") == "true";
|
||||
|
||||
static final launchHelperPath =
|
||||
"${AppConf.applicationSupportDir}\\launch_helper.vbs";
|
||||
|
||||
static init(List<String> args) async {
|
||||
dPrint("launch args == $args");
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:starcitizen_doctor/common/conf.dart';
|
||||
import 'package:starcitizen_doctor/common/utils/base_utils.dart';
|
||||
|
||||
class SystemHelper {
|
||||
@ -198,24 +197,4 @@ foreach ($adapter in $adapterMemory) {
|
||||
} catch (_) {}
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
static initVBS() async {
|
||||
final script = '''
|
||||
If Not WScript.Arguments.Named.Exists("elevate") Then
|
||||
CreateObject("Shell.Application").ShellExecute WScript.FullName _
|
||||
, """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1
|
||||
WScript.Quit
|
||||
End If
|
||||
Dim objShell
|
||||
Set objShell = WScript.CreateObject( "WScript.Shell" )
|
||||
objShell.Run("""${Platform.resolvedExecutable}""")
|
||||
Set objShell = Nothing
|
||||
''';
|
||||
final vbsFile = File(AppConf.launchHelperPath);
|
||||
if (await vbsFile.exists()) {
|
||||
await vbsFile.delete();
|
||||
}
|
||||
await vbsFile.create();
|
||||
await vbsFile.writeAsString(script);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user