feat(host/windows): "Punktfunk Host" identity in Task Manager (icon + version info)

punktfunk-host.exe embedded no icon or version resources, so Task Manager and
Explorer showed a bare lowercase exe name with a generic icon. build.rs now
embeds the branded .ico + FileDescription "Punktfunk Host" / ProductName
"Punktfunk" via winresource (same pattern as the Windows client and the tray;
Linux packaging builds skip the block). The tray gets a matching "Punktfunk
Tray" description, and the SCM display name moves off lowercase
"punktfunk streaming host" to "Punktfunk Host" (applied idempotently by
`service install` on upgrade).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 13:52:55 +00:00
parent 4d1d20f832
commit 1be83575b6
5 changed files with 127 additions and 5 deletions
+17
View File
@@ -17,4 +17,21 @@ fn main() {
.unwrap_or_else(|| std::env::var("CARGO_PKG_VERSION").unwrap_or_else(|_| "unknown".into()));
println!("cargo:rustc-env=PUNKTFUNK_VERSION={version}");
println!("cargo:rerun-if-env-changed=PUNKTFUNK_BUILD_VERSION");
// Windows identity resources: the branded icon + version info. Task Manager / Explorer show a
// process by its version-info FileDescription — without one the host appears as a bare
// "punktfunk-host.exe" with no icon. Same winresource pattern as clients/windows and
// punktfunk-tray (cfg(windows) = build HOST, so Linux packaging builds skip it; CARGO_CFG_WINDOWS
// = TARGET).
#[cfg(windows)]
if std::env::var_os("CARGO_CFG_WINDOWS").is_some() {
let icon = "../../packaging/windows/branding/punktfunk.ico";
println!("cargo:rerun-if-changed={icon}");
winresource::WindowsResource::new()
.set_icon_with_id(icon, "1")
.set("FileDescription", "Punktfunk Host")
.set("ProductName", "Punktfunk")
.compile()
.expect("embed windows icon/version resources");
}
}