build.rs 607 B

123456789101112131415161718192021
  1. fn main() {
  2. #[cfg(windows)]
  3. {
  4. use std::io::Write;
  5. let mut res = winres::WindowsResource::new();
  6. res.set_icon("../../res/icon.ico")
  7. .set_language(winapi::um::winnt::MAKELANGID(
  8. winapi::um::winnt::LANG_ENGLISH,
  9. winapi::um::winnt::SUBLANG_ENGLISH_US,
  10. ))
  11. .set_manifest_file("../../res/manifest.xml");
  12. match res.compile() {
  13. Err(e) => {
  14. write!(std::io::stderr(), "{}", e).unwrap();
  15. std::process::exit(1);
  16. }
  17. Ok(_) => {}
  18. }
  19. }
  20. }