impress_asr_input_rust/build.rs
impressionyang ceb2df18c4
Some checks are pending
Build Windows GUI / build-windows (push) Waiting to run
Build Windows GUI / release (push) Blocked by required conditions
初始提交:Windows 跨平台语音识别应用
功能:
- Tauri v2 GUI 应用
- 系统托盘支持
- 日志输出到文件
- 带时间戳的版本号
- 前端资源嵌入

修复:
- 前端路径使用相对路径
- 移除 devUrl 配置
- 窗口置顶设置
2026-05-21 17:58:18 +08:00

19 lines
548 B
Rust

//! 构建脚本
use chrono::Local;
fn main() {
// 生成编译时间戳
let build_time = Local::now().format("%Y%m%d_%H%M%S").to_string();
println!("cargo:rustc-env=BUILD_TIME={}", build_time);
// 生成带时间戳的版本号
let version = env!("CARGO_PKG_VERSION");
let timestamped_version = format!("{}-{}", version, build_time);
println!("cargo:rustc-env=TIMESTAMPED_VERSION={}", timestamped_version);
// 仅在启用 gui 特性时运行 tauri-build
#[cfg(feature = "gui")]
tauri_build::build();
}