Bookworm Portable Setup �����ֿ� (history-cleansed 2026-04-21)
修复 v1.5.1 用户实测发现的两个体验问题:
1. **uv 安装失败 + RemoteException 弹窗** (auto-setup.ps1)
- 旧逻辑: python -m pip install uv (网络/权限/$ErrorActionPreference=Stop 易触发)
- 新逻辑: 三层 fallback (winget → Astral 官方脚本 → pip), 全程 SilentlyContinue
- 失败仅写入 $TEMP/bookworm-uv-install.log, 不阻断不弹窗 (uv 是可选依赖)
2. **PS2EXE -NoConsole 把 Log-X 弹窗化** (build.ps1)
- 加 -NoOutput + -NoError, 所有 Write-Host 静默吞掉
- 用户不再被 70+ 个 [!] 弹窗轰炸
3. **静默后无进度反馈 → GUI 进度窗口** (auto-setup.ps1)
- 新增 Show-ProgressForm/Update-Progress/Update-Progress-SubStatus/Close-ProgressForm
- 顶部常驻 Form: 标题 + Phase 标签 + 当前状态 + 进度条 + 日志路径
- 所有 Log-X 改写日志文件 ($TEMP/bookworm-setup-{ts}.log) + 更新进度窗口
4. **桌面专用图标** (auto-setup.ps1 + bookworm-desktop.ico)
- 从 og-image.png 自动检测蓝紫渐变 B 圆 → 圆形 alpha mask → 7 尺寸 ICO (86 KB)
- New-DesktopShortcuts 增加 IconLocation, 桌面快捷方式显示 Bookworm 主图标
- 主图比 favicon 神经螺旋更突出, 48px 也清晰可辨
5. **Phase 7 安装完成 banner**: Write-Host → Show-MsgBox
6. **Claude Code 启动**: 主进程启动 → Start-Process cmd /k claude (新窗口)
构建验证: 7/7 补丁字符串 (Show-ProgressForm/BWLogFile/winget/astral/
bookworm-desktop.ico/IconLocation 等) 经 EXE 字符串扫描确认编译进 build artifact.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| assets | ||
| patches | ||
| 拓展 | ||
| .gitignore | ||
| auto-setup.ps1 | ||
| Bookworm-AutoSetup.bat | ||
| bookworm-desktop.ico | ||
| Bookworm-Install.bat | ||
| Bookworm-OneClick-Mac.sh | ||
| Bookworm-OneClick-Win10.bat | ||
| Bookworm-OneClick.bat | ||
| Bookworm-Setup.bat | ||
| Bookworm-Setup.sh | ||
| bookworm.ico | ||
| build.ps1 | ||
| crypto-helper.js | ||
| deploy-gitea.sh | ||
| download-panel.html | ||
| download.html | ||
| encrypt-secrets.ps1 | ||
| gen-authcode.js | ||
| generate-integrity.ps1 | ||
| guide-mac.html | ||
| guide-unified.html | ||
| guide.html | ||
| install-mac.sh | ||
| install.ps1 | ||
| lessons-learned.md | ||
| prepare-repo.ps1 | ||
| quick-reference.txt | ||
| quick-start.html | ||
| README.txt | ||
| secure-firewall.sh | ||
| settings.local.template.json | ||
| setup-all.js | ||
| setup-https.sh | ||
| stop.ps1 | ||
| sync-version.js | ||
| uninstall-mac.sh | ||
| 卸载Bookworm.bat | ||
| 启动Bookworm-v3.bat | ||
| 启动Bookworm.bat | ||
| 更新并启动Bookworm.bat | ||
Bookworm Portable v1.4 - 纯云端便携部署工具包
================================================
=== 文件说明 ===
deploy-gitea.sh ECS Gitea 部署 (服务端,执行一次)
prepare-repo.ps1 仓库准备 (本机执行一次)
encrypt-secrets.ps1 凭证加密 (本机执行一次)
settings.local.template.json settings.local.json 模板 (权限白名单)
(settings.template.json 已由 build-portable.js 管理,存于 config 仓库)
install.ps1 安装/启动 (目标机执行)
stop.ps1 清理/卸载 (目标机执行)
=== 一次性部署 ===
步骤 1: 部署 Gitea (ECS)
> scp deploy-gitea.sh root@8.138.11.105:/tmp/
> ssh root@8.138.11.105 "GITEA_ADMIN_PASS='你的密码' bash /tmp/deploy-gitea.sh"
> 登录 http://8.138.11.105:3000 创建两个私有仓库:
- bookworm-config (系统文件)
- bookworm-boot (引导脚本+加密凭证)
步骤 2: 推送 Bookworm 配置
> .\prepare-repo.ps1 -GitUrl "http://8.138.11.105:3000/bookworm/bookworm-config.git"
步骤 3: 加密凭证
> .\encrypt-secrets.ps1
> (输入中转站 API Key + MCP 凭证 + 设置主密码,至少 12 位)
步骤 4: 推送 boot 仓库
> 将 install.ps1, stop.ps1, secrets.enc 推送到 bookworm-boot 仓库
=== 目标机使用 ===
安装: .\install.ps1
清理: .\stop.ps1
恢复: .\stop.ps1 -Restore
深度: .\stop.ps1 -Deep
=== 目标机要求 ===
[必须] Claude Code, Node.js >= 18, Git
[可选] Python 3.x, openssl (Git for Windows 自带)
=== 安全规格 ===
加密: AES-256-CBC + PBKDF2 (600000 迭代, OWASP 2023)
凭证: 仅进程级环境变量,不写磁盘/注册表
Gitea: INSTALL_LOCK=true, 注册关闭, 管理员 CLI 创建
密码: openssl stdin 管道传入,不暴露在进程列表
校验: Gitea 二进制 SHA256 完整性校验