Files
spotifast/build.rs
T
Carmine Paolino 8089d8f400 Embed the Windows icon and build an installer
The executable now carries the icon and version information Windows
shows in Explorer and the taskbar. The release workflow also builds an
Inno Setup installer next to each zip: per-user, no administrator
rights, a Start menu entry, and it closes a running copy before an
update replaces it. The download page lists the installers from the
next release on.
2026-08-28 12:03:32 +02:00

18 lines
689 B
Rust

//! Windows executables carry their icon and version information as
//! resources; everywhere else there is nothing to do.
fn main() {
#[cfg(windows)]
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
println!("cargo:rerun-if-changed=packaging/windows/fastpotify.ico");
let mut resource = winresource::WindowsResource::new();
resource
.set_icon("packaging/windows/fastpotify.ico")
.set("ProductName", "Fastpotify")
.set("FileDescription", "Fastpotify");
if let Err(error) = resource.compile() {
println!("cargo:warning=Windows resources not embedded: {error}");
}
}
}