diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ef93ab6..ba4b3e8 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1448,6 +1448,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "minisign-verify" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" + [[package]] name = "miniz_oxide" version = "0.5.3" @@ -2712,6 +2718,7 @@ checksum = "8e1ebb60bb8f246d5351ff9b7728fdfa7a6eba72baa722ab6021d553981caba1" dependencies = [ "anyhow", "attohttpc", + "base64", "cocoa", "dirs-next", "embed_plist", @@ -2724,6 +2731,7 @@ dependencies = [ "heck 0.4.0", "http", "ignore", + "minisign-verify", "notify-rust", "objc", "once_cell", @@ -2749,12 +2757,14 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", + "time", "tokio", "url", "uuid 1.1.2", "webkit2gtk", "webview2-com", "windows 0.37.0", + "zip", ] [[package]] @@ -2939,6 +2949,7 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ + "itoa 1.0.2", "libc", "num_threads", ] @@ -3654,3 +3665,14 @@ name = "xml-rs" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + +[[package]] +name = "zip" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index afafa6e..0a92314 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ tauri-build = { version = "1.0.0", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.0.0", features = ["api-all"] } +tauri = { version = "1.0.0", features = ["api-all", "updater"] } [features] # by default Tauri runs in production mode diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ed507ca..05c79f5 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,12 +1,31 @@ #![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" +all(not(debug_assertions), target_os = "windows"), +windows_subsystem = "windows" )] +// fn update() { +// // Initialize updater and check if a new version is available +// // Event: tauri://update +// window.emit("tauri://update".to_string(), None); +// // Listen New Update Available +// // Event: tauri://update-available +// window.listen("tauri://update-available".to_string(), move |msg| { +// println!("New version available: {:?}", msg); +// }); +// // Emit Install and Download +// // Event: tauri://update-install +// window.emit("tauri://update-install".to_string(), None); +// // Listen Install Progress +// // Event: tauri://update-status +// window.listen("tauri://update-status".to_string(), move |msg| { +// println!("New status: {:?}", msg); +// }) +// } + fn main() { - let context = tauri::generate_context!(); - tauri::Builder::default() - .menu(tauri::Menu::os_default(&context.package_info().name)) - .run(context) - .expect("error while running tauri application"); + let context = tauri::generate_context!(); + tauri::Builder::default() + .menu(tauri::Menu::os_default(&context.package_info().name)) + .run(context) + .expect("error while running tauri application"); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 61bd645..d915232 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -29,7 +29,7 @@ "icons/icon.icns", "icons/icon.ico" ], - "identifier": "com.tauri.dev", + "identifier": "com.augus.dev", "longDescription": "", "macOS": { "entitlements": null, @@ -51,7 +51,12 @@ "csp": null }, "updater": { - "active": false + "active": true, + "endpoints": [ + "https://releases.myapp.com/{{target}}/{{current_version}}" + ], + "dialog": false, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDFEMjYzRTMzNEJEN0I1Q0YKUldUUHRkZExNejRtSFZkTno4VUNrejlpUDJuT1V3T0JRKzhHNnhOazdHVlNiZXYvLzBLV1czZWoK" }, "windows": [ { diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue index f1d7b62..fb7dd1b 100644 --- a/src/components/HelloWorld.vue +++ b/src/components/HelloWorld.vue @@ -11,6 +11,10 @@ const count = ref(0) TAURI GUIDE +

+ Blog | Genshin +

+