bookworm-boot/启动Bookworm.bat
bookworm 2d4dea242b fix: 去掉 Start-Process, bat 负责窗口/ps1 负责执行
根因: Start-Process pwsh 开新窗口但 claude 找不到 PATH,
同时 OneClick.bat 重复调用 install.ps1 导致双启动。

- install.ps1: 新增 -SkipLaunch 参数, step9 改为同步 & claude
- auto-setup.ps1: Phase7 去掉 Start-Process, 同步 & claude
- OneClick.bat: step7 加 -SkipLaunch, 最终块 start pwsh -Command claude
- 启动/更新.bat: 直接 start pwsh -Command claude (不经 install.ps1)

架构: bat 决定窗口类型, ps1 只管同步执行

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:34:00 +08:00

27 lines
702 B
Batchfile

@echo off
chcp 65001 > nul
cd /d "%~dp0"
:: 中转站在国内,不走代理
set NO_PROXY=bww.letcareme.com,code.letcareme.com,letcareme.com,localhost,127.0.0.1
set no_proxy=%NO_PROXY%
:: 优先 pwsh7: 直接在 pwsh7 窗口运行 claude
where pwsh >nul 2>nul
if %errorlevel% equ 0 (
start "Bookworm Smart Assistant" pwsh -NoLogo -NoExit -Command "& claude --dangerously-skip-permissions"
exit
)
:: 回退 PowerShell 5.1
title Bookworm Portable
echo.
echo [!] PowerShell 7 未安装, 使用 PowerShell 5.1
echo.
powershell -ExecutionPolicy Bypass -File install.ps1 -StartOnly -AutoAccept
if %errorlevel% neq 0 (
echo.
echo 启动失败,按任意键退出...
pause > nul
)