Use new format for update
This commit is contained in:
4 files changed
+9
-7
No files matched your search
@@ -773,13 +773,15 @@ async fn update(
|
||||
app: tauri::AppHandle,
|
||||
window: tauri::WebviewWindow,
|
||||
) -> tauri_plugin_updater::Result<()> {
|
||||
let target = {
|
||||
use tauri_plugin_os::arch;
|
||||
|
||||
let plat = {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if std::path::Path::new("/etc/debian_version").exists() {
|
||||
"linux-debian"
|
||||
} else if std::path::Path::new("/etc/redhat-release").exists() {
|
||||
"linux-fedora"
|
||||
"linux-redhat"
|
||||
} else {
|
||||
let mut new_url = window.url().unwrap();
|
||||
new_url.set_path("/update/outdated");
|
||||
@@ -789,13 +791,13 @@ async fn update(
|
||||
}
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
tauri_plugin_updater::target().unwrap_or("unknown".to_string())
|
||||
platform()
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(update) = app
|
||||
.updater_builder()
|
||||
.target(target)
|
||||
.target(format!("{}-{}", plat, arch()))
|
||||
.build()?
|
||||
.check()
|
||||
.await?
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
|
||||
"endpoints": [
|
||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}¤tVersion={{current_version}}"
|
||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
|
||||
"endpoints": [
|
||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}¤tVersion={{current_version}}"
|
||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
|
||||
"endpoints": [
|
||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}¤tVersion={{current_version}}"
|
||||
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}¤tVersion={{current_version}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user