env! is resolved at compile time which means we don't need to read and set LOCALDI from build.rs
18 lines
459 B
Rust
18 lines
459 B
Rust
use std::env;
|
|
use std::fs::File;
|
|
use std::io::Write;
|
|
use std::path::Path;
|
|
use std::process::Command;
|
|
|
|
fn main() {
|
|
// Rerun the build script when files in the resources folder are changed.
|
|
println!("cargo:rerun-if-changed=resources");
|
|
println!("cargo:rerun-if-changed=resources/*");
|
|
|
|
Command::new("glib-compile-resources")
|
|
.args(&["--generate", "resources.xml"])
|
|
.current_dir("resources")
|
|
.status()
|
|
.unwrap();
|
|
}
|