Skip to content

Commit

Permalink
updater go brrrr
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 22, 2023
1 parent c7b7cf4 commit 42c802c
Show file tree
Hide file tree
Showing 14 changed files with 724 additions and 81 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@tauri-apps/plugin-dialog": "2.0.0-alpha.3",
"@tauri-apps/plugin-log": "2.0.0-alpha.3",
"@tauri-apps/plugin-notification": "2.0.0-alpha.3",
"@tauri-apps/plugin-os": "2.0.0-alpha.6",
"@tauri-apps/plugin-process": "2.0.0-alpha.3",
"@tauri-apps/plugin-stronghold": "2.0.0-alpha.4",
"@tauri-apps/plugin-updater": "2.0.0-alpha.3",
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

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

48 changes: 48 additions & 0 deletions src-tauri/Cargo.lock

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

1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tauri = { version = "2.0.0-alpha", features = ["devtools", "tray-icon"] }
tauri-plugin-updater = "2.0.0-alpha"
tauri-plugin-process = "2.0.0-alpha"
tauri-plugin-log = "2.0.0-alpha"
tauri-plugin-os = "2.0.0-alpha"
reqwest = { version = "0.11.22", features = ["json"] }
url = "2.4.1"
chrono = "0.4"
Expand Down
9 changes: 6 additions & 3 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ pub fn run() {

let mut app = tauri::Builder::default()
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_os::init())
// Add logging plugin
.plugin(
tauri_plugin_log::Builder::default()
.clear_targets()
.targets([
Target::new(TargetKind::Webview),
Target::new(TargetKind::LogDir {
file_name: Some("webview.log".into()),
file_name: Some("webview".into()),
})
.filter(|metadata| metadata.target() == WEBVIEW_TARGET),
Target::new(TargetKind::LogDir {
file_name: Some("rust.log".into()),
file_name: Some("rust".into()),
})
.filter(|metadata| metadata.target() != WEBVIEW_TARGET),
])
Expand Down Expand Up @@ -90,7 +91,9 @@ pub fn run() {
.invoke_handler(tauri::generate_handler![
close_splashscreen,
updater::check_for_updates,
updater::install_update
updater::download_update,
updater::install_update,
updater::clear_update_cache
])
.build(context)
.expect("error while running tauri application");
Expand Down
Loading

0 comments on commit 42c802c

Please sign in to comment.