Watch
1
0
Fork
You've already forked RedFlag
0
RedFlag/desktop/build.rs
Fimeg f487de554a desktop: become the machine console
Qt/QML now carries 11 local views while the Agent owns observation and intent. Tauri, WebKit, and the second React desktop build leave together. Linux ships first; Windows waits for a native Qt runner.
2026-09-01 08:29:58 -04:00

31 lines
992 B
Rust

use cxx_qt_build::{CxxQtBuilder, QmlModule};
use qt_build_utils::QmlFile;
fn main() {
let singletons = ["qml/Theme.qml"];
let views = ["qml/LineGraph.qml", "qml/MetricCard.qml", "qml/NavItem.qml"];
let mut files = vec![QmlFile::from("qml/Main.qml")];
files.extend(
singletons
.iter()
.map(|path| QmlFile::from(*path).singleton(true)),
);
files.extend(views.iter().map(|path| QmlFile::from(*path)));
for path in ["qml/Main.qml"]
.iter()
.chain(singletons.iter())
.chain(views.iter())
{
println!("cargo:rerun-if-changed={path}");
}
println!("cargo:rerun-if-changed=src/bridge/machine.rs");
CxxQtBuilder::new_qml_module(QmlModule::new("com.redflag.desktop").qml_files(files))
.qrc_resources(["icons/icon.png"])
.file("src/bridge/machine.rs")
.qt_module("Core")
.qt_module("Gui")
.qt_module("Qml")
.qt_module("Quick")
.build();
}