feat: standalone 独立安装包集成 + 安装方式选择器 (0.9.4)

- 新增 standalone 安装链路(自带 Node.js,零依赖,无需 npm)
- 安装方式选择器:自动/CDN加速/GitHub/npm 四选一
- 动态查询 latest.json 获取最新版本,不怕旧资源被删除
- GitHub 模式:从 GitHub Releases 下载(CDN 不可用时备选)
- CherryStudio openclaw.exe 干扰过滤
- 默认源改为汉化优化版
- 日志隐藏 R2 下载地址(安全)
- 卸载兼容:standalone + npm 双清理
- 版本检测覆盖所有 standalone 安装路径
- README + 官网添加独立安装包说明
- macOS npm 权限问题通过 standalone 自动解决
This commit is contained in:
晴天
2026-03-17 06:32:23 +08:00
parent 3516f099ff
commit 1809329aaa
13 changed files with 682 additions and 54 deletions

View File

@@ -505,7 +505,7 @@ async function handleSaveConfig(page, restart) {
// ===== 升级操作 =====
async function doUpgradeWithModal(source, page, version = null) {
async function doUpgradeWithModal(source, page, version = null, method = 'auto') {
const modal = showUpgradeModal('升级 / 切换版本')
let unlistenLog, unlistenProgress, unlistenDone, unlistenError
setUpgrading(true)
@@ -549,12 +549,12 @@ async function doUpgradeWithModal(source, page, version = null) {
})
// 发起后台任务(立即返回)
await api.upgradeOpenclaw(source, version)
await api.upgradeOpenclaw(source, version, method)
modal.appendLog('后台任务已启动,请等待完成...')
} else {
// Web 模式仍然同步等待dev-api 后端没有 spawn
modal.appendLog('Web 模式:升级过程日志不可用,请等待完成...')
const msg = await api.upgradeOpenclaw(source, version)
const msg = await api.upgradeOpenclaw(source, version, method)
modal.setDone(typeof msg === 'string' ? msg : (msg?.message || '升级完成'))
await loadVersion(page)
cleanup()