Add non-elevated game option

This commit is contained in:
Thoronium
2023-04-14 23:22:34 -06:00
parent 5de80f1655
commit 7bfa5e8e11
18 changed files with 78 additions and 14 deletions

View File

@@ -29,7 +29,8 @@
"use_proxy": "使用内置代理",
"wipe_login": "清除登录缓存",
"horny_mode": "Horny 模式",
"auto_mongodb": "自动启动 MongoDB"
"auto_mongodb": "自动启动 MongoDB",
"un_elevated": "非提升运行游戏(无管理员)"
},
"downloads": {
"grasscutter_fullbuild": "下载 Grasscutter 一体化",

View File

@@ -29,7 +29,8 @@
"use_proxy": "使用內建代理伺服器",
"wipe_login": "擦除登錄緩存",
"horny_mode": "Horny模式",
"auto_mongodb": "自動啟動 MongoDB"
"auto_mongodb": "自動啟動 MongoDB",
"un_elevated": "在不升高的情况下运行游戏(没有管理员)。"
},
"downloads": {
"grasscutter_fullbuild": "下載Grasscutter多合一下載",

View File

@@ -28,7 +28,8 @@
"use_proxy": "Gebruik interne proxy",
"wipe_login": "Wis de inlogcache",
"horny_mode": "Geile modus",
"auto_mongodb": "Start automatisch MongoDB"
"auto_mongodb": "Start automatisch MongoDB",
"un_elevated": "Führen Sie das Spiel nicht erhöht aus (kein Admin)"
},
"downloads": {
"grasscutter_fullbuild": "Alles in Einem Grasscutter Daten herunterladen",

View File

@@ -29,7 +29,8 @@
"use_proxy": "Use Internal Proxy",
"wipe_login": "Wipe Login Cache",
"horny_mode": "Horny Mode",
"auto_mongodb": "Automatically Start MongoDB"
"auto_mongodb": "Automatically Start MongoDB",
"un_elevated": "Run the game non-elevated (no admin)"
},
"downloads": {
"grasscutter_fullbuild": "Download Grasscutter All-in-One",

View File

@@ -29,7 +29,8 @@
"use_proxy": "Usar proxy interno",
"wipe_login": "Borrar caché de inicio de sesión",
"horny_mode": "Modo cachondo",
"auto_mongodb": "Iniciar automáticamente MongoDB"
"auto_mongodb": "Iniciar automáticamente MongoDB",
"un_elevated": "Ejecutar el juego no elevado (no admin)"
},
"downloads": {
"grasscutter_fullbuild": "Descargar Datos todo en uno de Grasscutter",

View File

@@ -29,7 +29,8 @@
"use_proxy": "Utiliser un proxy interne",
"wipe_login": "Effacer le cache de connexion",
"horny_mode": "Mode excitation",
"auto_mongodb": "Démarrer automatiquement MongoDB"
"auto_mongodb": "Démarrer automatiquement MongoDB",
"un_elevated": "Exécuter le jeu sans élévation (pas d'administrateur)"
},
"downloads": {
"grasscutter_fullbuild": "Telecharger Grasscutter tout-en-un",

View File

@@ -28,7 +28,8 @@
"use_proxy": "Gunakan Proxy Internal",
"wipe_login": "Menghapus Cache Login",
"horny_mode": "Mode Terangsang",
"auto_mongodb": "Mulai MongoDB secara otomatis"
"auto_mongodb": "Mulai MongoDB secara otomatis",
"un_elevated": "Jalankan game yang tidak ditinggikan (tanpa admin)"
},
"downloads": {
"grasscutter_fullbuild": "Sedang Mendownload Grasscutter Semua Dalam Satu",

View File

@@ -29,7 +29,8 @@
"use_proxy": "내부 프록시 사용",
"wipe_login": "로그인 캐시 지우기",
"horny_mode": "Horny 모드",
"auto_mongodb": "MongoDB 자동 시작"
"auto_mongodb": "MongoDB 자동 시작",
"un_elevated": "게임 비상승 실행(관리자 없음)"
},
"downloads": {
"grasscutter_fullbuild": "올인원 Grasscutter 다운로드",

View File

@@ -27,7 +27,8 @@
"use_proxy": "Izmantot iekšējo starpniekserveri",
"wipe_login": "Noslaucīt pieteikšanās kešatmiņu",
"horny_mode": "Uzbudināts režīms",
"auto_mongodb": "Automātiski startējiet MongoDB"
"auto_mongodb": "Automātiski startējiet MongoDB",
"un_elevated": "Palaist spēli bez paaugstinājuma (bez administratora)"
},
"downloads": {
"grasscutter_fullbuild": "Lejupielādējiet Grasscutter viss vienā",

View File

@@ -28,7 +28,8 @@
"use_proxy": "Gebruik Interne Proxy",
"wipe_login": "Login cache wissen",
"horny_mode": "Geile modus",
"auto_mongodb": "Start automatisch MongoDB"
"auto_mongodb": "Start automatisch MongoDB",
"un_elevated": "Voer het spel uit zonder hoogtevrees (geen admin)"
},
"downloads": {
"grasscutter_fullbuild": "Grasscutter Alles-in-één Downloaden",

View File

@@ -29,7 +29,8 @@
"use_proxy": "Usar Proxy Interno",
"wipe_login": "Limpar Cache de Login",
"horny_mode": "Modo com tesão",
"auto_mongodb": "Iniciar MongoDB Automaticamente"
"auto_mongodb": "Iniciar MongoDB Automaticamente",
"un_elevated": "Executar o jogo não-elevated (sem admin)"
},
"downloads": {
"grasscutter_fullbuild": "Baixar o Grasscutter Tudo-em-Um",

View File

@@ -28,7 +28,8 @@
"use_proxy": "Использовать встроенный Прокси",
"wipe_login": "Очистить кэш входа в систему",
"horny_mode": "роговой режим",
"auto_mongodb": "Автоматически запускать MongoDB"
"auto_mongodb": "Автоматически запускать MongoDB",
"un_elevated": "Запустите игру в неэлегантном режиме (без администратора)"
},
"downloads": {
"grasscutter_fullbuild": "Скачать все в одном Grasscutter",

View File

@@ -29,7 +29,8 @@
"use_proxy": "Sử dụng proxy nội bộ",
"wipe_login": "Tẩy sạch cache đăng nhập",
"horny_mode": "Chế độ hứng tình",
"auto_mongodb": "Tự động khởi động MongoDB"
"auto_mongodb": "Tự động khởi động MongoDB",
"un_elevated": "Chạy trò chơi không nâng cao (không có quản trị viên)"
},
"downloads": {
"grasscutter_fullbuild": "Tải Grasscutter tất cả trong một",

View File

@@ -105,6 +105,7 @@ fn main() {
system_helpers::set_migoto_delay,
system_helpers::wipe_registry,
system_helpers::get_platform,
system_helpers::run_un_elevated,
proxy::set_proxy_addr,
proxy::generate_ca_files,
unzip::unzip,

View File

@@ -77,6 +77,18 @@ pub fn run_jar(path: String, execute_in: String, java_path: String) {
};
}
#[tauri::command]
pub fn run_un_elevated(path: String) {
// Open the program non-elevated.
match open::with(
format!("cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"{}\"\"", path),
"C:\\Windows\\System32\\cmd.exe",
) {
Ok(_) => (),
Err(e) => println!("Failed to open program ({}): {}", &path, e),
};
}
#[tauri::command]
pub fn open_in_browser(url: String) {
// Open the URL in the default browser.