Rust
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#[cfg(windows)]
|
||||
extern crate winres;
|
||||
|
||||
fn main() {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let mut res = winres::WindowsResource::new();
|
||||
|
||||
// Set icon if it exists
|
||||
if std::path::Path::new("assets/icon.ico").exists() {
|
||||
res.set_icon("assets/icon.ico");
|
||||
}
|
||||
|
||||
// Set language to English
|
||||
res.set_language(0x0009);
|
||||
|
||||
// Set product information
|
||||
res.set("ProductName", "Create App Secret");
|
||||
res.set("FileDescription", "Create Azure App Registration Secrets and Save to Key Vault");
|
||||
res.set("CompanyName", "Gemeente Vught");
|
||||
res.set("LegalCopyright", "Copyright © 2026");
|
||||
res.set("OriginalFilename", "Create-App-Secret.exe");
|
||||
|
||||
// Get version from Cargo.toml
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
res.set("ProductVersion", version);
|
||||
res.set("FileVersion", version);
|
||||
|
||||
// Fail build if resource compilation fails
|
||||
res.compile().expect("Failed to compile Windows resources");
|
||||
|
||||
// Rebuild when icon changes
|
||||
println!("cargo:rerun-if-changed=assets/icon.ico");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user