tauri/cli/tauri.js/templates/src-tauri/src/build.rs
Tensor-Programming ee2d714b67
Feat(CLI) Icon Check fix: #309 (#310)
* add icon check for windows.

* fix spelling

* add basic icon logic

* make error more prolific
2020-01-12 20:27:35 -05:00

16 lines
388 B
Rust

#[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("icons/icon.ico");
res.compile().expect("Unable to find visual studio tools");
} else {
panic!("No Icon.ico found. Please add one or check the path");
}
#[cfg(not(windows))]
fn main() {}