aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/build.rs b/build.rs
index 9e7d61e..875e8c6 100644
--- a/build.rs
+++ b/build.rs
@@ -3,29 +3,24 @@ use std::path::Path;
use std::process::Command;
fn main() {
- // Tell cargo to rerun this build script if the schema file changes
println!("cargo:rerun-if-changed=data/tc.mal.lleap.gschema.xml");
let out_dir = env::var("OUT_DIR").unwrap();
let schema_dir = Path::new(&out_dir).join("glib-2.0").join("schemas");
- // Create the schema directory
std::fs::create_dir_all(&schema_dir).unwrap();
- // Copy the schema file to the output directory
std::fs::copy(
"data/tc.mal.lleap.gschema.xml",
schema_dir.join("tc.mal.lleap.gschema.xml"),
)
.unwrap();
- // Compile the schema using glib-compile-schemas
Command::new("glib-compile-schemas")
.arg(&schema_dir)
.output()
.unwrap();
- // Set environment variable for the schema directory
println!(
"cargo:rustc-env=GSETTINGS_SCHEMA_DIR={}",
schema_dir.display()