forked from CachyOS/CachyOS-Welcome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
24 lines (20 loc) · 724 Bytes
/
build.rs
File metadata and controls
24 lines (20 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use std::process::{self, Command};
use std::{env, fs};
fn main() {
for i in fs::read_dir("data").unwrap() {
println!("cargo:rerun-if-changed={}", i.unwrap().path().display());
}
for i in fs::read_dir("ui").unwrap() {
println!("cargo:rerun-if-changed={}", i.unwrap().path().display());
}
let out_dir = env::var("OUT_DIR").unwrap();
let status = Command::new("glib-compile-resources")
.arg(&format!("--target={}/cachyos-welcome.gresource", out_dir))
.arg("cachyos-welcome.gresource.xml")
.status()
.unwrap();
if !status.success() {
eprintln!("glib-compile-resources failed with exit status {}", status);
process::exit(1);
}
}