From 3b85bc6f01326f04f2ed06f8e299188203868554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E5=A4=A9?= Date: Thu, 2 Apr 2026 17:05:37 +0800 Subject: [PATCH] feat: Windows dual build - lightweight + full WebView2 installer --- .github/workflows/release.yml | 60 ++++++++++++++++++++++++++++++++--- CHANGELOG.md | 6 ++++ docs/index.html | 22 +++++++------ package-lock.json | 4 +-- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 4 +-- 8 files changed, 82 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index caedc40..91a35bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,10 @@ jobs: os: windows-latest args: "" rust_target: "" + - name: Windows (x64) 完整包 + os: windows-latest + args: "" + rust_target: "" steps: - name: 签出代码 @@ -91,6 +95,7 @@ jobs: libayatana-appindicator3-dev - name: 构建 Tauri 应用 + if: matrix.platform.name != 'Windows (x64) 完整包' uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -112,6 +117,49 @@ jobs: prerelease: false args: ${{ matrix.platform.args }} + # ── Windows 完整包(内嵌 WebView2 离线安装器)────────────────────────────── + - name: 配置 WebView2 完整包模式 + if: matrix.platform.name == 'Windows (x64) 完整包' + shell: bash + run: | + node -e " + const fs = require('fs'); + const f = 'src-tauri/tauri.conf.json'; + const c = JSON.parse(fs.readFileSync(f, 'utf8')); + c.bundle.windows.webviewInstallMode = { type: 'offlineInstaller', silent: true }; + fs.writeFileSync(f, JSON.stringify(c, null, 2)); + " + + - name: 构建 Windows 完整包 + if: matrix.platform.name == 'Windows (x64) 完整包' + shell: bash + run: npx tauri build + + - name: 重命名并上传完整包 + if: matrix.platform.name == 'Windows (x64) 完整包' + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION="${TAG_NAME#v}" + BUNDLE_DIR="src-tauri/target/release/bundle" + + # 确保 Release 已存在(可能被其他 matrix job 的 tauri-action 创建) + gh release create "$TAG_NAME" --title "ClawPanel $TAG_NAME" \ + --notes "正在构建所有平台安装包,请稍候..." 2>/dev/null || true + + # 重命名 NSIS exe 并上传 + mv "${BUNDLE_DIR}/nsis/ClawPanel_${VERSION}_x64-setup.exe" \ + "${BUNDLE_DIR}/nsis/ClawPanel_${VERSION}_x64-setup-full.exe" + gh release upload "$TAG_NAME" \ + "${BUNDLE_DIR}/nsis/ClawPanel_${VERSION}_x64-setup-full.exe" --clobber + + # 重命名 MSI 并上传 + mv "${BUNDLE_DIR}/msi/ClawPanel_${VERSION}_x64_en-US.msi" \ + "${BUNDLE_DIR}/msi/ClawPanel_${VERSION}_x64-full_en-US.msi" + gh release upload "$TAG_NAME" \ + "${BUNDLE_DIR}/msi/ClawPanel_${VERSION}_x64-full_en-US.msi" --clobber + # ── 所有平台构建完成后,统一更新 Release Notes ───────────────────────────── # 独立 job 确保只执行一次,彻底避免多个 matrix job 的竞争条件 update-release-notes: @@ -270,10 +318,14 @@ jobs: echo '> **⚠️ 首次打开提示"无法验证开发者"?** 在终端执行:`sudo xattr -rd com.apple.quarantine /Applications/ClawPanel.app`,或前往 **系统设置 → 隐私与安全性** 点击「仍要打开」。' echo "" echo "### Windows" - echo "| 格式 | 安装包 |" - echo "|------|--------|" - echo "| EXE 安装器(推荐) | [ClawPanel_${VERSION}_x64-setup.exe](${DL}/ClawPanel_${VERSION}_x64-setup.exe) |" - echo "| MSI 安装器 | [ClawPanel_${VERSION}_x64_en-US.msi](${DL}/ClawPanel_${VERSION}_x64_en-US.msi) |" + echo "| 格式 | 安装包 | 说明 |" + echo "|------|--------|------|" + echo "| EXE 安装器(推荐) | [ClawPanel_${VERSION}_x64-setup.exe](${DL}/ClawPanel_${VERSION}_x64-setup.exe) | 轻量版 ~10 MB |" + echo "| EXE 完整包 | [ClawPanel_${VERSION}_x64-setup-full.exe](${DL}/ClawPanel_${VERSION}_x64-setup-full.exe) | 含 WebView2 ~200 MB |" + echo "| MSI 安装器 | [ClawPanel_${VERSION}_x64_en-US.msi](${DL}/ClawPanel_${VERSION}_x64_en-US.msi) | 轻量版 ~10 MB |" + echo "| MSI 完整包 | [ClawPanel_${VERSION}_x64-full_en-US.msi](${DL}/ClawPanel_${VERSION}_x64-full_en-US.msi) | 含 WebView2 ~200 MB |" + echo "" + echo "> **💡 轻量版 vs 完整包**:Win10 1803+ 和 Win11 已预装 WebView2,推荐下载轻量版。如果是内网/断网环境,选择完整包。" echo "" echo "### Linux" echo "| 格式 | 安装包 |" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b88fcb..2cc790c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/), 版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。 +## [0.11.1] - 2026-04-02 + +### 改进 (Improvements) + +- **Windows 双版本安装包** — 新增 Windows 完整包(含 WebView2 离线安装器,~200 MB),适合内网/断网环境;默认安装包恢复为轻量版(~10 MB),Win10 1803+ / Win11 已预装 WebView2 无需额外下载 + ## [0.11.0] - 2026-04-02 ### 新功能 (Features) diff --git a/docs/index.html b/docs/index.html index 45f1cce..d961add 100644 --- a/docs/index.html +++ b/docs/index.html @@ -34,7 +34,7 @@ "description": "OpenClaw AI Agent 可视化管理面板,基于 Tauri v2 的跨平台桌面应用。内置晴辰助手支持工具调用,晴辰云 AI 接口一键接入。支持仪表盘监控、多模型配置、消息渠道管理、内置 QQ 机器人、实时 AI 聊天、记忆管理、Agent 管理、网关配置、内网穿透等功能。支持 11 种语言。", "url": "https://claw.qt.cool/", "downloadUrl": "https://github.com/qingchencloud/clawpanel/releases/latest", - "softwareVersion": "0.11.0", + "softwareVersion": "0.11.1", "author": { "@type": "Organization", "name": "晴辰云 QingchenCloud", @@ -1155,7 +1155,7 @@
-
v0.11.0 最新版
+
v0.11.1 最新版

下载安装

选择你的操作系统,一键下载安装

@@ -1165,11 +1165,11 @@

macOS

支持 Apple Silicon 和 Intel 芯片