- install.ps1: Save-SecretsToCache 改用真正 DPAPI 加密 (System.Security.ProtectedData) 增加 GEMINI_API_KEY 到缓存键列表 - install.ps1: Get-CachedSecrets DPAPI 解密 + 旧版明文缓存向后兼容 - 启动Bookworm.bat: pwsh7路径启动 claude 前从注册表加载 DPAPI 加密凭证 - 更新并启动Bookworm.bat: 同上 + PS5.1 回退路径从2次调用精简为1次 - assets/: 纳入版本管理 (favicon-32.png / logo-200x200.png / logo-dark.svg) - HTML: 同步 download/guide-mac/guide-unified/guide 页面更新 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
1.3 KiB
Batchfile
26 lines
1.3 KiB
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 可用性
|
|
where pwsh >nul 2>nul
|
|
if %errorlevel% equ 0 (
|
|
:: pwsh7: 先同步配置, 再在新窗口启动 claude (从注册表缓存加载 DPAPI 凭证)
|
|
pwsh -NoLogo -ExecutionPolicy Bypass -File "%~dp0install.ps1" -AutoAccept -SkipLaunch
|
|
start "Bookworm Smart Assistant" pwsh -NoLogo -NoExit -Command "Add-Type -AssemblyName System.Security;$r='HKCU:\Software\Bookworm\CachedEnv';try{(Get-ItemProperty $r -EA Stop).PSObject.Properties|Where-Object{$_.Name-match'^[A-Z_]+$'}|ForEach-Object{$v=$_.Value;try{$b=[Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String($v),$null,[Security.Cryptography.DataProtectionScope]::CurrentUser);$v=[Text.Encoding]::UTF8.GetString($b)}catch{};[Environment]::SetEnvironmentVariable($_.Name,$v,'Process')}}catch{};& claude --dangerously-skip-permissions"
|
|
exit
|
|
)
|
|
|
|
:: 回退 PowerShell 5.1: 一次调用完成更新+加载凭证+启动 (消除双次调用)
|
|
title Bookworm Portable
|
|
powershell -ExecutionPolicy Bypass -File "%~dp0install.ps1" -AutoAccept
|
|
if %errorlevel% neq 0 (
|
|
echo.
|
|
echo 启动失败,按任意键退出...
|
|
pause > nul
|
|
)
|