From 49739126663591a244f6aac71610ee1209888f10 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Thu, 7 May 2026 17:36:44 +0800 Subject: [PATCH] fix: bundle libodbc into macOS app and improve update UX - Bundle libodbc.2.dylib into .app/Contents/Frameworks/ via Tauri's macOS frameworks config to fix "app can't be opened" on macOS - Replace relaunch() with exit(0) to avoid Tauri restart bug (#11392) - Lock update dialog during download and after install - Render release notes as markdown --- .github/workflows/release.yml | 4 +++ .gitignore | 1 + src-tauri/tauri.conf.json | 3 ++ src/components/layout/UpdateDialog.vue | 41 +++++++++++++++++++++----- src/composables/useAppUpdater.ts | 4 +-- src/i18n/locales/en.ts | 2 ++ src/i18n/locales/zh-CN.ts | 2 ++ 7 files changed, 47 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 282fb776b4..56effda9b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,10 @@ jobs: if: startsWith(matrix.platform, 'macos') run: brew install unixodbc + - name: Bundle ODBC library (macOS) + if: startsWith(matrix.platform, 'macos') + run: cp "$(brew --prefix unixodbc)/lib/libodbc.2.dylib" src-tauri/ + - name: Install Apple certificate (macOS) if: startsWith(matrix.platform, 'macos') env: diff --git a/.gitignore b/.gitignore index caa5426c8f..041d42b5f1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ dist/ docs/.next/ docs/out/ docs/.source/ +src-tauri/*.dylib # OS files .DS_Store diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 811ac26762..a5d9221e2d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -29,6 +29,9 @@ "active": true, "targets": "all", "createUpdaterArtifacts": true, + "macOS": { + "frameworks": ["libodbc.2.dylib"] + }, "icon": [ "icons/32x32.png", "icons/128x128.png", diff --git a/src/components/layout/UpdateDialog.vue b/src/components/layout/UpdateDialog.vue index 2434657d56..542165f222 100644 --- a/src/components/layout/UpdateDialog.vue +++ b/src/components/layout/UpdateDialog.vue @@ -1,5 +1,7 @@