Wip
This commit is contained in:
17
build.rs
17
build.rs
@@ -13,13 +13,22 @@ fn main() {
|
||||
println!("cargo:rustc-link-lib=oleaut32");
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
if target_os == "windows" {
|
||||
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let icon = format!("{manifest_dir}/assets/Cagire.ico");
|
||||
eprintln!("winres: manifest_dir = {manifest_dir}");
|
||||
eprintln!("winres: icon path = {icon}");
|
||||
eprintln!("winres: icon exists = {}", std::path::Path::new(&icon).exists());
|
||||
eprintln!("winres: OUT_DIR = {}", std::env::var("OUT_DIR").unwrap_or_default());
|
||||
eprintln!("winres: TARGET = {}", std::env::var("TARGET").unwrap_or_default());
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_icon("assets/Cagire.ico")
|
||||
res.set_icon(&icon)
|
||||
.set("ProductName", "Cagire")
|
||||
.set("FileDescription", "Forth-based music sequencer")
|
||||
.set("LegalCopyright", "Copyright (c) 2025 Raphaël Forment");
|
||||
res.compile().expect("Failed to compile Windows resources");
|
||||
if let Err(e) = res.compile() {
|
||||
eprintln!("winres: compile error: {e:?}");
|
||||
panic!("Failed to compile Windows resources: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user