Files
dbx/src-tauri/build.rs
T
t8y2 9a7c12c65a fix: restore macOS frameworks to tauri.conf.json for proper bundling
TAURI_CONFIG env var merge did not apply frameworks to the bundler,
resulting in libodbc/libltdl missing from Contents/Frameworks/.

Restore frameworks in tauri.conf.json and skip them in dev mode via
build.rs when the dylibs are not present locally.
2026-05-07 22:14:01 +08:00

10 lines
421 B
Rust

fn main() {
// In dev mode, skip framework bundling to avoid requiring libodbc/libltdl locally.
// CI copies the dylibs into src-tauri/ before release builds.
#[cfg(target_os = "macos")]
if std::env::var("TAURI_CONFIG").is_err() && !std::path::Path::new("libodbc.2.dylib").exists() {
std::env::set_var("TAURI_CONFIG", r#"{"bundle":{"macOS":{"frameworks":[]}}}"#);
}
tauri_build::build()
}