Add a way to bypass update checking
This commit is contained in:
7 files changed
+58
-6
No files matched your search
@@ -10,6 +10,7 @@
|
|||||||
"@fortawesome/free-solid-svg-icons": "7.2.0",
|
"@fortawesome/free-solid-svg-icons": "7.2.0",
|
||||||
"@fortawesome/react-fontawesome": "3.3.1",
|
"@fortawesome/react-fontawesome": "3.3.1",
|
||||||
"@tauri-apps/api": "2.10.1",
|
"@tauri-apps/api": "2.10.1",
|
||||||
|
"@tauri-apps/plugin-cli": "2.4.1",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
|
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
|
||||||
"@tauri-apps/plugin-dialog": "2.7.0",
|
"@tauri-apps/plugin-dialog": "2.7.0",
|
||||||
"@tauri-apps/plugin-fs": "2.5.0",
|
"@tauri-apps/plugin-fs": "2.5.0",
|
||||||
@@ -274,6 +275,8 @@
|
|||||||
|
|
||||||
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.10.1", "", { "os": "win32", "cpu": "x64" }, "sha512-6Cn7YpPFwzChy0ERz6djKEmUehWrYlM+xTaNzGPgZocw3BD7OfwfWHKVWxXzdjEW2KfKkHddfdxK1XXTYqBRLg=="],
|
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.10.1", "", { "os": "win32", "cpu": "x64" }, "sha512-6Cn7YpPFwzChy0ERz6djKEmUehWrYlM+xTaNzGPgZocw3BD7OfwfWHKVWxXzdjEW2KfKkHddfdxK1XXTYqBRLg=="],
|
||||||
|
|
||||||
|
"@tauri-apps/plugin-cli": ["@tauri-apps/plugin-cli@2.4.1", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-8JXofQFI5cmiGolh1PlU4hzE2YJgrgB1lyaztyBYiiMCy13luVxBXaXChYPeqMkUo46J1UadxvYdjRjj0E8zaw=="],
|
||||||
|
|
||||||
"@tauri-apps/plugin-clipboard-manager": ["@tauri-apps/plugin-clipboard-manager@2.3.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-CUlb5Hqi2oZbcZf4VUyUH53XWPPdtpw43EUpCza5HWZJwxEoDowFzNUDt1tRUXA8Uq+XPn17Ysfptip33sG4eQ=="],
|
"@tauri-apps/plugin-clipboard-manager": ["@tauri-apps/plugin-clipboard-manager@2.3.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-CUlb5Hqi2oZbcZf4VUyUH53XWPPdtpw43EUpCza5HWZJwxEoDowFzNUDt1tRUXA8Uq+XPn17Ysfptip33sG4eQ=="],
|
||||||
|
|
||||||
"@tauri-apps/plugin-dialog": ["@tauri-apps/plugin-dialog@2.7.0", "", { "dependencies": { "@tauri-apps/api": "^2.10.1" } }, "sha512-4nS/hfGMGCXiAS3LtVjH9AgsSAPJeG/7R+q8agTFqytjnMa4Zq95Bq8WzVDkckpanX+yyRHXnRtrKXkANKDHvw=="],
|
"@tauri-apps/plugin-dialog": ["@tauri-apps/plugin-dialog@2.7.0", "", { "dependencies": { "@tauri-apps/api": "^2.10.1" } }, "sha512-4nS/hfGMGCXiAS3LtVjH9AgsSAPJeG/7R+q8agTFqytjnMa4Zq95Bq8WzVDkckpanX+yyRHXnRtrKXkANKDHvw=="],
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"@fortawesome/free-solid-svg-icons": "7.2.0",
|
"@fortawesome/free-solid-svg-icons": "7.2.0",
|
||||||
"@fortawesome/react-fontawesome": "3.3.1",
|
"@fortawesome/react-fontawesome": "3.3.1",
|
||||||
"@tauri-apps/api": "2.10.1",
|
"@tauri-apps/api": "2.10.1",
|
||||||
|
"@tauri-apps/plugin-cli": "2.4.1",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
|
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
|
||||||
"@tauri-apps/plugin-dialog": "2.7.0",
|
"@tauri-apps/plugin-dialog": "2.7.0",
|
||||||
"@tauri-apps/plugin-fs": "2.5.0",
|
"@tauri-apps/plugin-fs": "2.5.0",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ tauri-plugin-single-instance = "2.4.1"
|
|||||||
tauri-plugin-updater = "2.10.1"
|
tauri-plugin-updater = "2.10.1"
|
||||||
tauri-plugin-window-state = "2.4.1"
|
tauri-plugin-window-state = "2.4.1"
|
||||||
tauri-plugin-process = "2.3.1"
|
tauri-plugin-process = "2.3.1"
|
||||||
|
tauri-plugin-cli = "2.4.1"
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
tauri-plugin-decorum = "1.1.1"
|
tauri-plugin-decorum = "1.1.1"
|
||||||
|
|||||||
+23
-6
@@ -690,6 +690,7 @@ fn open_new_window(
|
|||||||
pub fn run() {
|
pub fn run() {
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
let mut builder = tauri::Builder::default()
|
let mut builder = tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_cli::init())
|
||||||
.plugin(tauri_plugin_process::init())
|
.plugin(tauri_plugin_process::init())
|
||||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||||
.plugin(tauri_plugin_store::Builder::new().build())
|
.plugin(tauri_plugin_store::Builder::new().build())
|
||||||
@@ -750,16 +751,32 @@ pub fn run() {
|
|||||||
}
|
}
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
{
|
{
|
||||||
let handle = app.handle().clone();
|
use tauri_plugin_cli::CliExt;
|
||||||
tauri::async_runtime::spawn(async move {
|
|
||||||
update(handle, window.clone()).await.unwrap();
|
match app.cli().matches() {
|
||||||
});
|
Ok(matches) => match matches.args.get("no-check-updates") {
|
||||||
|
Some(arg) => {
|
||||||
|
if arg.value == false {
|
||||||
|
let handle = app.handle().clone();
|
||||||
|
tauri::async_runtime::spawn(async move {
|
||||||
|
update(handle, window.clone()).await.unwrap();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let mut new_url = window.url().unwrap();
|
||||||
|
new_url.set_path("/main");
|
||||||
|
let _ = window.navigate(new_url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None => {}
|
||||||
|
},
|
||||||
|
Err(_) => {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
{
|
{
|
||||||
let mut new_url = app.config().build.dev_url.clone().unwrap();
|
let mut new_url = window.url().unwrap();
|
||||||
new_url.set_path("/main");
|
new_url.set_path("/main");
|
||||||
window.navigate(new_url).unwrap();
|
let _ = window.navigate(new_url).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -39,6 +39,16 @@
|
|||||||
"endpoints": [
|
"endpoints": [
|
||||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"description": "Lncvrt Games Launcher CLI",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"short": "n",
|
||||||
|
"name": "no-check-updates",
|
||||||
|
"description": "Bypasses th eupdate checker"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,6 +45,16 @@
|
|||||||
"endpoints": [
|
"endpoints": [
|
||||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"description": "Lncvrt Games Launcher CLI",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"short": "n",
|
||||||
|
"name": "no-check-updates",
|
||||||
|
"description": "Bypasses th eupdate checker"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,6 +42,16 @@
|
|||||||
"endpoints": [
|
"endpoints": [
|
||||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"description": "Lncvrt Games Launcher CLI",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"short": "n",
|
||||||
|
"name": "no-check-updates",
|
||||||
|
"description": "Bypasses th eupdate checker"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user