fn main() { // On macOS, embed Info.plist into the binary so the OS recognises it as a GUI app. if cfg!(target_os = "macos") { let plist = std::path::Path::new("../../resources/macos/installer-Info.plist"); if plist.exists() { println!("cargo:rustc-link-arg=-sectcreate"); println!("cargo:rustc-link-arg=__TEXT"); println!("cargo:rustc-link-arg=__info_plist"); println!( "cargo:rustc-link-arg={}", plist.canonicalize().unwrap().display() ); } } // Set application icon from .ico resource (if present). if cfg!(target_os = "windows") { let mut res = winresource::WindowsResource::new(); // Attempt to set icon; ignore if file doesn't exist. if std::path::Path::new("../../resources/icon.ico").exists() { res.set_icon("../../resources/icon.ico"); } res.set("ProductName", "Clean Flash Player Installer"); res.set("FileDescription", "Clean Flash Player Installer"); res.set("ProductVersion", "34.0.0.330"); res.set("CompanyName", "FlashPatch Team"); res.set("LegalCopyright", "FlashPatch Team"); res.set_manifest(r#" True/PM PerMonitorV2 "#); let _ = res.compile(); } }