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>
17 lines
639 B
Rust
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");
|
|
}
|
|
}
|