Files
arena-tracker/crates/app/build.rs
T
nessarandClaude Fable 5.2 7c7e667c57
CI / core (pull_request) Successful in 1m10s
CI / core (push) Successful in 1m44s
Add the Arena Tracker logo and embed its Windows application icon
Ticket #16. The logo is a gold ring around a crown: the Arena seen from
above and a top 1, without text. The Windows icon derived from it is
embedded in the executable as icon resource 1 by a build script, which
is the resource GPUI loads for the window: File Explorer, the window and
the taskbar show it with no loose file next to the executable.

embed-resource was already in Cargo.lock as a build dependency of GPUI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 00:07:48 +01:00

17 lines
639 B
Rust

//! 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");
}
}