Private
Public Access
1
0

kordophoned sans kpcli building on macos

This commit is contained in:
James Magahern
2025-07-31 19:16:44 -07:00
parent 742703cb8e
commit 8115f94121
11 changed files with 120 additions and 27 deletions

View File

@@ -1,5 +1,11 @@
const KORDOPHONE_XML: &str = "include/net.buzzert.kordophonecd.Server.xml";
#[cfg(not(target_os = "linux"))]
fn main() {
// No D-Bus code generation on non-Linux platforms
}
#[cfg(target_os = "linux")]
fn main() {
// Generate D-Bus code
let out_dir = std::env::var("OUT_DIR").unwrap();
@@ -14,8 +20,8 @@ fn main() {
let xml = std::fs::read_to_string(KORDOPHONE_XML).expect("Error reading server dbus interface");
let output =
dbus_codegen::generate(&xml, &opts).expect("Error generating server dbus interface");
let output = dbus_codegen::generate(&xml, &opts)
.expect("Error generating server dbus interface");
std::fs::write(out_path, output).expect("Error writing server dbus code");