0
0
mirror of https://github.com/Pumpkin-MC/Pumpkin synced 2025-07-02 21:17:32 +00:00
Files
Pumpkin/pumpkin/build.rs
Alexander Medvedev 575f17948f Inline format arguments
Looks much nicer and more readable
2025-05-10 15:22:06 +02:00

20 lines
586 B
Rust

use git_version::git_version;
use std::env;
fn main() {
#[cfg(all(target_os = "windows", not(debug_assertions)))]
{
let mut res = tauri_winres::WindowsResource::new();
res.set_icon("../assets/icon.ico");
res.set_language(0x0009); // English
res.compile().unwrap();
}
let version = git_version!(fallback = "unknown");
let git_version = match version {
"unknown" => env::var("GIT_VERSION").unwrap_or("unknown".to_string()),
_ => version.to_string(),
};
println!("cargo:rustc-env=GIT_VERSION={git_version}");
}