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 @@
- {{ updateInfo.release_notes }}
-
+ class="max-h-48 overflow-auto rounded-md border bg-muted/30 p-3 text-xs [&_h1]:text-sm [&_h1]:font-semibold [&_h1]:mb-1 [&_h2]:text-sm [&_h2]:font-semibold [&_h2]:mb-1 [&_h3]:text-xs [&_h3]:font-semibold [&_h3]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ul]:my-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_ol]:my-1 [&_li]:my-0.5 [&_p]:my-1 [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[11px] [&_a]:text-primary [&_a]:underline"
+ v-html="renderedNotes"
+ />
Docker 用户请运行
docker compose pull && docker compose up -d
@@ -57,11 +77,16 @@ const isDesktop = isTauriRuntime();
-
+
-
+
+
+ {{ t("updates.reopenHint") }}
+