Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix: skip macOS framework lookup in dev mode via build.rs

t8y265d184fd0309
diff --git a/src-tauri/.gitignore b/src-tauri/.gitignore
index 9deb0834ec..b0cadf41d2 100644
--- a/src-tauri/.gitignore
+++ b/src-tauri/.gitignore
@@ -1,3 +1,5 @@
# Generated by Cargo
/target/
/gen/schemas
+# CI-only: copied by release workflow for macOS bundling
+*.dylib
diff --git a/src-tauri/build.rs b/src-tauri/build.rs
index c1cd5c9d31..61b288e356 100644
--- a/src-tauri/build.rs
+++ b/src-tauri/build.rs
@@ -1,9 +1,11 @@
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":[]}}}"#);
+ {
+ let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap_or_else(|_| ".".to_string());
+ let has_dylibs = std::path::Path::new(&manifest_dir).join("libodbc.2.dylib").exists();
+ if !has_dylibs && std::env::var("TAURI_CONFIG").is_err() {
+ std::env::set_var("TAURI_CONFIG", r#"{"bundle":{"macOS":{"frameworks":[]}}}"#);
+ }
}
tauri_build::build()
}