diff options
| author | Fuwn <[email protected]> | 2021-02-21 18:30:25 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-21 18:30:25 -0800 |
| commit | 1a8d4449192b17c67f615faef44a1993efbac142 (patch) | |
| tree | 3732be235698b60ba71622a95da719bc2480de0f /src-tauri/src/build.rs | |
| download | tauri-vue-master.tar.xz tauri-vue-master.zip | |
Diffstat (limited to 'src-tauri/src/build.rs')
| -rw-r--r-- | src-tauri/src/build.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src-tauri/src/build.rs b/src-tauri/src/build.rs new file mode 100644 index 0000000..75f4465 --- /dev/null +++ b/src-tauri/src/build.rs @@ -0,0 +1,16 @@ +#[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."); + } +} + +#[cfg(not(windows))] +fn main() {} |