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。

chore(ci): tighten win7 loader audit and drop 2012r2 workflow

zipg717dcc129422
diff --git a/.github/scripts/assert-webview2-win7-loader.ps1 b/.github/scripts/assert-webview2-win7-loader.ps1
index e755f003e6..d24fddecd0 100644
--- a/.github/scripts/assert-webview2-win7-loader.ps1
+++ b/.github/scripts/assert-webview2-win7-loader.ps1
@@ -16,10 +16,9 @@ $ErrorActionPreference = "Stop"
# dbx.exe proves the pinned loader was not the one linked. The PE import audit
# cannot catch this: 1.0.1054.31 imports nothing newer than 1.0.902.49.
$loaderMarkers = @(
- "Failed to find the Web",
- "Failed to find the app",
- "Failed to find an inst",
- "WebView2: Failed to find an installed"
+ "WebView2: Failed to find the app exe path.",
+ "WebView2: Failed to find the WebView2 client dll at:",
+ "WebView2: Failed to find an installed WebView2 runtime or non-stable Microsoft Edge installation."
)
if (!(Test-Path -LiteralPath $BinaryPath -PathType Leaf)) {
diff --git a/.github/workflows/windows-server-2012-r2.yml b/.github/workflows/windows-server-2012-r2.yml
deleted file mode 100644
index 7dd753d9aa..0000000000
--- a/.github/workflows/windows-server-2012-r2.yml
+++ /dev/null
@@ -1,143 +0,0 @@
-name: Windows Server 2012 R2 Offline Compatibility
-
-on:
- workflow_dispatch:
- inputs:
- run_remote_smoke_test:
- description: Run the optional WinRM smoke test after building
- required: true
- default: false
- type: boolean
-
-permissions:
- contents: read
-
-concurrency:
- group: windows-server-2012-r2-${{ github.ref }}
- cancel-in-progress: true
-
-env:
- CARGO_INCREMENTAL: "0"
- RUSTFLAGS: -C debuginfo=line-tables-only -C target-feature=+crt-static
-
-jobs:
- build-win7-server2012r2-offline:
- name: Build Win7 / Server 2012 R2 Offline Installer
- runs-on: windows-2022
- timeout-minutes: 90
- steps:
- - uses: actions/checkout@v5
-
- - name: Setup pnpm
- uses: pnpm/action-setup@v6
- with:
- version: 10.27.0
-
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: 22.13.0
- cache: pnpm
-
- - name: Install frontend dependencies
- run: pnpm install --frozen-lockfile
-
- - name: Setup Rust compatibility toolchain
- uses: dtolnay/rust-toolchain@nightly
- with:
- toolchain: nightly-2026-07-22
- components: rust-src
-
- - name: Prepare WebView2 109 fixed runtime
- shell: pwsh
- run: ./.github/scripts/prepare-webview2-win7-runtime.ps1
-
- - name: Prepare Win7 / Server 2012 R2 WebView2 loader
- shell: pwsh
- run: ./.github/scripts/prepare-webview2-win7-loader.ps1
-
- - name: Build frontend
- run: pnpm build
-
- - name: Build DBX compatibility binary
- shell: pwsh
- run: |
- $env:TAURI_CONFIG = Get-Content src-tauri/tauri.webview2-win7-fixed.conf.json -Raw
- cargo build --locked --package dbx --release --features custom-protocol --target x86_64-win7-windows-msvc -Z build-std=std,panic_abort
-
- - name: Audit compatibility PE imports
- shell: pwsh
- run: ./.github/scripts/assert-win7-pe-compat.ps1 -BinaryPath target/x86_64-win7-windows-msvc/release/dbx.exe
-
- - name: Bundle Win7 / Server 2012 R2 offline installer
- shell: pwsh
- run: |
- $bundleDir = "target/x86_64-win7-windows-msvc/release/bundle/nsis"
- pnpm tauri bundle --bundles nsis --target x86_64-win7-windows-msvc `
- --config src-tauri/tauri.webview2-win7-fixed.conf.json
- $installer = Get-ChildItem $bundleDir -Filter "*.exe" |
- Sort-Object LastWriteTimeUtc -Descending |
- Select-Object -First 1
- if (!$installer) {
- throw "Missing Win7 / Server 2012 R2 fixed-runtime installer in $bundleDir"
- }
- Copy-Item -LiteralPath $installer.FullName `
- -Destination "DBX_${{ github.sha }}_x64-win7-server2012r2-webview2-109-offline-setup.exe" `
- -Force
-
- - name: Audit installer contents
- shell: pwsh
- run: |
- $installer = Get-ChildItem -Filter "DBX_*_x64-win7-server2012r2-webview2-109-offline-setup.exe" |
- Select-Object -First 1
- ./.github/scripts/assert-win7-installer-content.ps1 -InstallerPath $installer.FullName
-
- - name: Upload Win7 / Server 2012 R2 test installer
- uses: actions/upload-artifact@v4
- with:
- name: DBX-win7-server2012r2-offline-test
- path: DBX_*_x64-win7-server2012r2-webview2-109-offline-setup.exe
- if-no-files-found: error
- retention-days: 7
-
- smoke-test-on-server-2012-r2:
- name: Smoke Test Installer on Server 2012 R2
- if: ${{ inputs.run_remote_smoke_test }}
- needs: build-win7-server2012r2-offline
- runs-on: [self-hosted, Windows, X64, server-2012-r2-controller]
- environment: windows-server-2012-r2-testing
- timeout-minutes: 30
- steps:
- - uses: actions/checkout@v5
-
- - name: Download test installer
- uses: actions/download-artifact@v5
- with:
- name: DBX-win7-server2012r2-offline-test
- path: installer
-
- - name: Install and start DBX on Server 2012 R2
- shell: pwsh
- env:
- SERVER2012_HOST: ${{ secrets.SERVER2012_HOST }}
- SERVER2012_USERNAME: ${{ secrets.SERVER2012_USERNAME }}
- SERVER2012_PASSWORD: ${{ secrets.SERVER2012_PASSWORD }}
- SERVER2012_USE_SSL: ${{ vars.SERVER2012_USE_SSL }}
- run: |
- $installer = Get-ChildItem installer -Filter "*.exe" | Select-Object -First 1
- if (!$installer) {
- throw "The Win7 / Server 2012 R2 installer artifact is missing."
- }
- ./.github/scripts/invoke-server2012-remote-validation.ps1 `
- -ComputerName $env:SERVER2012_HOST `
- -UserName $env:SERVER2012_USERNAME `
- -Mode Installer `
- -InstallerPath $installer.FullName
-
- - name: Upload verified Win7 / Server 2012 R2 installer
- uses: actions/upload-artifact@v4
- with:
- name: DBX-win7-server2012r2-offline-verified
- path: installer/*.exe
- if-no-files-found: error
- retention-days: 14
diff --git a/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts b/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts
index 7d61c3e975..31b5e222a9 100644
--- a/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts
+++ b/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts
@@ -129,10 +129,9 @@ describe("Windows 7 fixed WebView2 runtime bundle", () => {
});
it("audits the linked WebView2 loader in the final Win7 binary", () => {
- expect(win7LoaderAuditScript).toContain('"Failed to find the Web"');
- expect(win7LoaderAuditScript).toContain('"Failed to find the app"');
- expect(win7LoaderAuditScript).toContain('"Failed to find an inst"');
- expect(win7LoaderAuditScript).toContain('"WebView2: Failed to find an installed"');
+ expect(win7LoaderAuditScript).toContain('"WebView2: Failed to find the app exe path."');
+ expect(win7LoaderAuditScript).toContain('"WebView2: Failed to find the WebView2 client dll at:"');
+ expect(win7LoaderAuditScript).toContain('"WebView2: Failed to find an installed WebView2 runtime or non-stable Microsoft Edge installation."');
expect(win7LoaderAuditScript).toContain("GetEncoding(28591)");
expect(ciWorkflow).toContain("./.github/scripts/assert-webview2-win7-loader.ps1");
expect(releaseWorkflow).toContain("./.github/scripts/assert-webview2-win7-loader.ps1");