- Phase 1: +PowerShell 7/Python 3.12/uv, pwsh升为核心依赖
- Phase 4: 修复缓存命中后仍弹密码框的逻辑缺陷
- Phase 5: 新增 {{PWSH_PATH}} 占位符渲染
- Phase 6: npm cache add + uv tool install 预缓存(超时保护)
- Phase 7: Start-Process pwsh 独立窗口启动Claude
- install.ps1: Render函数添加 {{PWSH_PATH}} + Start-Process启动
- OneClick.bat: 新增步骤4/8安装PowerShell 7
- 所有.bat: start pwsh新窗口模式 + CRLF修复
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
719 B
Batchfile
27 lines
719 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: 启动新 PowerShell 7 窗口, 退出 cmd
|
|
where pwsh >nul 2>nul
|
|
if %errorlevel% equ 0 (
|
|
start "Bookworm - 更新并启动" pwsh -NoLogo -ExecutionPolicy Bypass -File "%~dp0install.ps1" -AutoAccept
|
|
exit
|
|
)
|
|
|
|
:: 回退 PowerShell 5.1
|
|
title Bookworm Portable - 更新并启动
|
|
echo.
|
|
echo [!] PowerShell 7 未安装, 使用 PowerShell 5.1
|
|
echo.
|
|
powershell -ExecutionPolicy Bypass -File install.ps1 -AutoAccept
|
|
if %errorlevel% neq 0 (
|
|
echo.
|
|
echo 启动失败,按任意键退出...
|
|
pause > nul
|
|
)
|