fn main() { println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=packaging/windows/paperdoll-renderer.ico"); let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default(); if target_os != "windows" { return; } let mut resources = winresource::WindowsResource::new(); resources.set_icon("packaging/windows/paperdoll-renderer.ico"); if let Err(err) = resources.compile() { panic!("the Windows executable icon could not be embedded: {err}"); } }