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。

feat(release): add Windows WebView2 offline installer

zipgda63f6e35898
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ac87987256..0a589230c9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -223,6 +223,37 @@ jobs:
Compress-Archive -Path (Join-Path $portableDir "*") -DestinationPath $zipName -Force
gh release upload "${env:GITHUB_REF_NAME}" $zipName --repo "${env:GITHUB_REPOSITORY}" --clobber
+ - name: Upload Windows WebView2 offline installer
+ if: matrix.arch == 'x64' || matrix.arch == 'arm64'
+ shell: pwsh
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ $version = "${env:GITHUB_REF_NAME}".TrimStart("v")
+ $arch = "${{ matrix.arch }}"
+ $bundleDir = "target/${{ matrix.target }}/release/bundle/nsis"
+ $offlineName = "DBX_${version}_${arch}-webview2-offline-setup.exe"
+ $before = @{}
+
+ if (Test-Path $bundleDir) {
+ Get-ChildItem $bundleDir -Filter "*.exe" | ForEach-Object { $before[$_.FullName] = $_.LastWriteTimeUtc }
+ }
+
+ pnpm tauri bundle --bundles nsis --target ${{ matrix.target }} --config src-tauri/tauri.webview2-offline.conf.json
+
+ $installer = Get-ChildItem $bundleDir -Filter "*.exe" |
+ Where-Object { !$before.ContainsKey($_.FullName) -or $_.LastWriteTimeUtc -gt $before[$_.FullName] } |
+ Sort-Object LastWriteTimeUtc -Descending |
+ Select-Object -First 1
+
+ if (!$installer) {
+ Write-Error "Missing WebView2 offline installer in ${bundleDir}"
+ exit 1
+ }
+
+ Copy-Item $installer.FullName $offlineName -Force
+ gh release upload "${env:GITHUB_REF_NAME}" $offlineName --repo "${env:GITHUB_REPOSITORY}" --clobber
+
cleanup-release-signatures:
needs: build
runs-on: ubuntu-latest
diff --git a/src-tauri/tauri.webview2-offline.conf.json b/src-tauri/tauri.webview2-offline.conf.json
new file mode 100644
index 0000000000..d41fa89e3c
--- /dev/null
+++ b/src-tauri/tauri.webview2-offline.conf.json
@@ -0,0 +1,10 @@
+{
+ "bundle": {
+ "windows": {
+ "webviewInstallMode": {
+ "silent": true,
+ "type": "offlineInstaller"
+ }
+ }
+ }
+}