cosmic-applets/applets/cosmic-applet-workspaces/build.rs

27 lines
897 B
Rust
Raw Normal View History

use std::{env, path::PathBuf, process::Command};
2022-06-16 10:48:15 -04:00
// use wayland_scanner::{generate_client_code};
2022-06-08 10:47:16 -04:00
fn main() {
if let Some(output) = Command::new("git")
2022-06-16 11:55:31 -04:00
.args(&["rev-parse", "HEAD"])
.output()
.ok()
{
let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
}
2022-06-08 10:47:16 -04:00
gio::compile_resources(
"data/resources",
"data/resources/resources.gresource.xml",
"compiled.gresource",
);
2022-06-16 10:48:15 -04:00
// let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());
// // Location of the xml file, relative to the `Cargo.toml`
// let ext_workspace_protocol_file = "data/resources/ext-workspace-unstable-v1.xml";
// // Target directory for the generate files
// generate_client_code!(
// ext_workspace_protocol_file,
// &dest.join("ext_workspace.rs"),
// );
2022-06-08 10:47:16 -04:00
}