2026-05-21 17:29:31 +08:00
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
|
fn main() {
|
2026-05-21 22:32:18 +08:00
|
|
|
let windres_available = std::process::Command::new("where")
|
|
|
|
|
.arg("windres")
|
|
|
|
|
.output()
|
|
|
|
|
.map(|o| o.status.success())
|
|
|
|
|
.unwrap_or(false);
|
|
|
|
|
|
|
|
|
|
if windres_available {
|
|
|
|
|
embed_resource::compile("read.rc", embed_resource::NONE);
|
|
|
|
|
} else {
|
|
|
|
|
println!("cargo:warning=windres not found, skipping Windows resource (icon) compilation");
|
|
|
|
|
}
|
2026-05-21 17:29:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(not(target_os = "windows"))]
|
|
|
|
|
fn main() {}
|