//! Embeds the application icon in the Windows executable, so that File Explorer, the window //! and the taskbar show it without any loose file next to the executable. fn main() { println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=assets/app.rc"); println!("cargo:rerun-if-changed=assets/icon.ico"); if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") { embed_resource::compile( "assets/app.rc", embed_resource::ParamsIncludeDirs(["assets"]), ) .manifest_required() .expect("Failed to embed the application icon"); } }