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.
This commit is contained in:
t8y2 committed 2026-05-07 22:14:01 +08:00
1 parent 53c5c28542
commit 9a7c12c65a
3 files changed
+9 -1

No files matched your search

-1
View File
@@ -113,7 +113,6 @@ jobs:
APPLE_ID: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_ID || '' }}
APPLE_PASSWORD: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_TEAM_ID || '' }}
TAURI_CONFIG: ${{ startsWith(matrix.platform, 'macos') && '{"bundle":{"macOS":{"frameworks":["libodbc.2.dylib","libltdl.7.dylib"]}}}' || '{}' }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'DBX ${{ github.ref_name }}'
+6
View File
@@ -1,3 +1,9 @@
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()
}
+3
View File
@@ -29,6 +29,9 @@
"active": true,
"targets": "all",
"createUpdaterArtifacts": true,
"macOS": {
"frameworks": ["libodbc.2.dylib", "libltdl.7.dylib"]
},
"icon": [
"icons/32x32.png",
"icons/128x128.png",