Implement Driftwood AppImage manager

This commit is contained in:
2026-02-26 23:04:27 +02:00
commit c3620b487d
33 changed files with 10399 additions and 0 deletions

36
build.rs Normal file
View File

@@ -0,0 +1,36 @@
use std::path::PathBuf;
use std::process::Command;
fn main() {
// Compile GResources
glib_build_tools::compile_resources(
&["data"],
"data/resources.gresource.xml",
"driftwood.gresource",
);
// Compile GSettings schema for development builds
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
let schema_dir = out_dir.join("gschemas");
std::fs::create_dir_all(&schema_dir).expect("Failed to create schema dir");
std::fs::copy(
"data/app.driftwood.Driftwood.gschema.xml",
schema_dir.join("app.driftwood.Driftwood.gschema.xml"),
)
.expect("Failed to copy schema");
let status = Command::new("glib-compile-schemas")
.arg(&schema_dir)
.status()
.expect("Failed to run glib-compile-schemas");
if !status.success() {
panic!("glib-compile-schemas failed");
}
println!(
"cargo::rustc-env=GSETTINGS_SCHEMA_DIR={}",
schema_dir.display()
);
}