Skip to content

Commit

Permalink
feat: Add updater logic
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse committed Mar 2, 2025
1 parent 1f88d3d commit aa0cb67
Show file tree
Hide file tree
Showing 8 changed files with 323 additions and 30 deletions.
312 changes: 283 additions & 29 deletions src-tauri/Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ tauri-plugin-store = "2"
# Windows API stuff
winapi = "0.3.9"
winreg = "0.52.0"

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-updater = "2"
3 changes: 2 additions & 1 deletion src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"core:window:allow-start-dragging",
"core:default",
"opener:default",
"store:default"
"store:default",
"updater:default"
]
}
14 changes: 14 additions & 0 deletions src-tauri/capabilities/desktop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"identifier": "desktop-capability",
"platforms": [
"macOS",
"windows",
"linux"
],
"windows": [
"main"
],
"permissions": [
"updater:default"
]
}
1 change: 1 addition & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub fn run() {
));

let tauri_builder_res = tauri::Builder::default()
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_store::Builder::new().build())
.plugin(tauri_plugin_opener::init())
.setup(|app| {
Expand Down
9 changes: 9 additions & 0 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"bundle": {
"active": true,
"createUpdaterArtifacts": "v1Compatible",
"targets": "all",
"icon": [
"icons/32x32.png",
Expand All @@ -32,5 +33,13 @@
"icons/icon.icns",
"icons/icon.ico"
]
},
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEVBNjM3NzJGRDgxMTU4NUUKUldSZVdCSFlMM2RqNmdhK3pIZjhEYWg2WnZGSFJqdkhLSHNOSjNhaW5VQVFLaHV3YWFDTnFKWWQK",
"endpoints": [
"https://github.com/R2NorthstarTools/FlightCore/releases/latest/download/latest-release.json"
]
}
}
}
10 changes: 10 additions & 0 deletions src-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@tauri-apps/plugin-dialog": "^2.0.0",
"@tauri-apps/plugin-shell": "^2.0.0",
"@tauri-apps/plugin-store": "^2.2.0",
"@tauri-apps/plugin-updater": "^2.5.1",
"vue": "^3.4.35",
"vue-i18n": "^9.13.1",
"vue-router": "^4.4.3",
Expand Down

0 comments on commit aa0cb67

Please sign in to comment.