2024-06-26 02:31:44 +08:00
|
|
|
fn main() {
|
2024-07-09 09:59:56 +08:00
|
|
|
#[cfg(debug_assertions)]
|
2024-07-15 20:17:39 +08:00
|
|
|
{
|
|
|
|
|
capnpc::CompilerCommand::new()
|
|
|
|
|
.src_prefix("capnp")
|
|
|
|
|
.file("capnp/plugin.capnp")
|
|
|
|
|
.output_path("capnp")
|
|
|
|
|
.run()
|
|
|
|
|
.expect("schema compiler command");
|
|
|
|
|
}
|
2024-07-09 09:59:56 +08:00
|
|
|
|
2024-06-26 03:43:17 +08:00
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
|
{
|
2024-06-26 02:31:44 +08:00
|
|
|
let mut res = winresource::WindowsResource::new();
|
|
|
|
|
res.set_icon("logo/icon.ico");
|
|
|
|
|
res.compile().unwrap();
|
|
|
|
|
}
|
2024-06-26 14:16:32 +08:00
|
|
|
|
|
|
|
|
#[cfg(target_os = "macos")]
|
|
|
|
|
{
|
|
|
|
|
use std::fs;
|
|
|
|
|
|
|
|
|
|
let version = env!("CARGO_PKG_VERSION");
|
|
|
|
|
fs::write("VERSION", version).unwrap();
|
|
|
|
|
}
|
2024-06-26 02:31:44 +08:00
|
|
|
}
|