switch to tauri-build

This commit is contained in:
lights0123 2021-10-31 15:10:36 -04:00 committed by Ben Schattinger
parent a8dddd1756
commit 89a613d25a
3 changed files with 18 additions and 17 deletions

View file

@ -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"

View file

@ -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" ]

View file

@ -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() {}