diff --git a/src-tauri/data/Cargo.toml b/src-tauri/data/Cargo.toml index cde41629..ba84636d 100644 --- a/src-tauri/data/Cargo.toml +++ b/src-tauri/data/Cargo.toml @@ -1,21 +1,31 @@ [package] -name = "PROJECTNAME" -version = "PROJECTVERSION" -description = "PROJECTDESC" -authors = ["1024xiaoshen"] +name = "PakePlus" +version = "0.1.0" +description = "A Tauri App" +authors = ["you"] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +# The `_lib` suffix may seem redundant but it is necessary +# to make the lib name unique and wouldn't conflict with the bin name. +# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 +name = "pakeplus_lib" +crate-type = ["staticlib", "cdylib", "rlib"] + [build-dependencies] -tauri-build = { version = "1", features = [] } +tauri-build = { version = "2", features = [] } [dependencies] -tauri = { version = "1", features = [ "os-all", "path-all", "protocol-all", "dialog-all", "clipboard-all", "fs-all", "http-all", "window-all", -3] } +tauri = { version = "2", features = ["protocol-asset"] } +tauri-plugin-opener = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" base64 = "0.22.1" +tauri-plugin-os = "2.0.0" +tauri-plugin-fs = "2.0.0" +tauri-plugin-shell = "2.0.0" +tauri-plugin-dialog = "2.0.0" +tauri-plugin-http = { version = "2", features = ["unsafe-headers"] } -[features] -# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!! -custom-protocol = ["tauri/custom-protocol"] diff --git a/src-tauri/data/main.rs b/src-tauri/data/main.rs index edd94d0b..dac1f874 100644 --- a/src-tauri/data/main.rs +++ b/src-tauri/data/main.rs @@ -35,13 +35,7 @@ pub fn run() { }) .setup(|app| { let app_handle = app.handle(); - let window_json = r#"{ - "title": "PakePlus", - "label": "PakePlus", - "width": 800, - "height": 600, - "url": "https://juejin.cn/" -}"#; + let window_json = r#"WINDOWCONFIG"#; match json_to_window_config(window_json) { Ok(config) => { println!("Parsed WindowConfig: {:?}", config);