fn main() { println!("cargo:rerun-if-changed=assets/icons/ico/moorly.ico"); if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") { return; } let mut resource = winresource::WindowsResource::new(); resource.set_icon("assets/icons/ico/moorly.ico"); resource.set("ProductName", "Moorly"); resource.set("FileDescription", "Moorly"); resource .compile() .expect("failed to embed the Windows icon resource"); }