mirror of
https://github.com/lights0123/n-link.git
synced 2024-12-22 10:15:27 +00:00
switch to tauri-build
This commit is contained in:
parent
a8dddd1756
commit
89a613d25a
16
desktop/src-tauri/Cargo.lock
generated
16
desktop/src-tauri/Cargo.lock
generated
|
@ -1765,7 +1765,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"winres",
|
||||
"tauri-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3097,6 +3097,20 @@ dependencies = [
|
|||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "1.0.0-beta.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c9c9a9bea25b9d6f5845b8662e18447e17218f99860cab37e39e2b57a9fcd49"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"serde_json",
|
||||
"tauri-utils",
|
||||
"winres",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "1.0.0-beta.4"
|
||||
|
|
|
@ -22,8 +22,8 @@ indicatif = "0.15"
|
|||
libusb1-sys = { version = "0.4.2", features = [ "vendored" ] }
|
||||
hashbrown = "0.11"
|
||||
|
||||
[target."cfg(windows)".build-dependencies]
|
||||
winres = "0.1"
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.0.0-beta.4" }
|
||||
|
||||
[features]
|
||||
custom-protocol = [ "tauri/custom-protocol" ]
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
#[cfg(windows)]
|
||||
extern crate winres;
|
||||
|
||||
#[cfg(windows)]
|
||||
fn main() {
|
||||
if std::path::Path::new("icons/icon.ico").exists() {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_icon_with_id("icons/icon.ico", "32512");
|
||||
res.compile().expect("Unable to find visual studio tools");
|
||||
} else {
|
||||
panic!("No Icon.ico found. Please add one or check the path");
|
||||
}
|
||||
tauri_build::build()
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn main() {}
|
||||
|
|
Loading…
Reference in a new issue