build.rs 390 B

12345678910111213141516
  1. #[cfg(windows)]
  2. extern crate winres;
  3. #[cfg(windows)]
  4. fn main() {
  5. if std::path::Path::new("icons/icon.ico").exists() {
  6. let mut res = winres::WindowsResource::new();
  7. res.set_icon("icons/icon.ico");
  8. res.compile().expect("Unable to find visual studio tools");
  9. } else {
  10. panic!("No Icon.ico found. Please add one or check the path");
  11. }
  12. }
  13. #[cfg(not(windows))]
  14. fn main() {}