Use new format for update

This commit is contained in:
Lncvrt committed 2026-04-19 16:27:20 -07:00
1 parent 8ca82777cc
commit 12cdda13fb
4 files changed
+9 -7

No files matched your search

+6 -4
View File
@@ -773,13 +773,15 @@ async fn update(
app: tauri::AppHandle, app: tauri::AppHandle,
window: tauri::WebviewWindow, window: tauri::WebviewWindow,
) -> tauri_plugin_updater::Result<()> { ) -> tauri_plugin_updater::Result<()> {
let target = { use tauri_plugin_os::arch;
let plat = {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
{ {
if std::path::Path::new("/etc/debian_version").exists() { if std::path::Path::new("/etc/debian_version").exists() {
"linux-debian" "linux-debian"
} else if std::path::Path::new("/etc/redhat-release").exists() { } else if std::path::Path::new("/etc/redhat-release").exists() {
"linux-fedora" "linux-redhat"
} else { } else {
let mut new_url = window.url().unwrap(); let mut new_url = window.url().unwrap();
new_url.set_path("/update/outdated"); new_url.set_path("/update/outdated");
@@ -789,13 +791,13 @@ async fn update(
} }
#[cfg(not(target_os = "linux"))] #[cfg(not(target_os = "linux"))]
{ {
tauri_plugin_updater::target().unwrap_or("unknown".to_string()) platform()
} }
}; };
if let Some(update) = app if let Some(update) = app
.updater_builder() .updater_builder()
.target(target) .target(format!("{}-{}", plat, arch()))
.build()? .build()?
.check() .check()
.await? .await?
+1 -1
View File
@@ -37,7 +37,7 @@
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
"endpoints": [ "endpoints": [
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}&currentVersion={{current_version}}" "https://games.lncvrt.xyz/api/launcher/update?target={{target}}&currentVersion={{current_version}}"
] ]
} }
} }
+1 -1
View File
@@ -43,7 +43,7 @@
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
"endpoints": [ "endpoints": [
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}&currentVersion={{current_version}}" "https://games.lncvrt.xyz/api/launcher/update?target={{target}}&currentVersion={{current_version}}"
] ]
} }
} }
+1 -1
View File
@@ -40,7 +40,7 @@
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
"endpoints": [ "endpoints": [
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}&currentVersion={{current_version}}" "https://games.lncvrt.xyz/api/launcher/update?target={{target}}&currentVersion={{current_version}}"
] ]
} }
} }