From df3a105f924168f6436a80fb1db0f6e053d4d6b2 Mon Sep 17 00:00:00 2001 From: bookworm Date: Tue, 28 Apr 2026 00:28:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(v3.2.0):=20=E5=AE=A1=E6=9F=A5=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=203=20Blocker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. $TOTAL_PHASES 7→8 (Phase 8 OTA 后 GUI 进度条溢出) 2. OTA config.json 只在不存在时写入 (保留 lastCheck 冷却) 3. remote URL 比对从硬编码改为动态 $expectedBase Co-Authored-By: Claude Opus 4.6 (1M context) --- Bookworm-Setup.exe | Bin 238592 -> 238592 bytes auto-setup.ps1 | 12 ++++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Bookworm-Setup.exe b/Bookworm-Setup.exe index 57cc926d1fdd02bae34a57aeb86905ea103b418d..c8dac6d6ac17b4d242e5d064ba79e48cb60dccda 100644 GIT binary patch delta 307 zcmZoT!PjttZ$bxCLf^zLImUStSBCTXoMB?{X8?i+ObkChPE-`0tjHM8xMXr8W4&Ml zP!0qP&^4 z#Nra?jMU_8C5XP-?fYGsrpRm$Nn(2AB+xVMbM@;b%Y4>dTlaltf?L$~fTc`596}{f qKY{$!2VyHsR1{-u*v`6+X(r=#z70&jJ~Az^*)F(<`90%A19kut_h&Nz delta 236 zcmZoT!PjttZ$bx?XYIr;IYzySE5rHjoMvM1X8?i+ObkChPE-`0tjHM8XfnBxv0hN% z3=>F(!2^hy7+4uXCJQnNGdGzsP2aeVNpo`mQ-c;`-R6rr&4P^PlP5ZfG-ujv&$MHl ztIL^RlABnPoS~pT-NA)Pl2LQ|#lwu!+YNIV8E;N^wqufOE4 z+Ycu(y>${;x;JtEcjGNi3%QHk&IN2Y+J0auQxAs_3)CGTx5$Cm3KJE@7zMVMu49_X dIQ_snrh@H!8<>85WHPYXF1U#KJ>x_Jb^xFYN}~V( diff --git a/auto-setup.ps1 b/auto-setup.ps1 index 20752cd..5d977a8 100644 --- a/auto-setup.ps1 +++ b/auto-setup.ps1 @@ -80,7 +80,7 @@ $GitUrl = "https://code.letcareme.com/bookworm/bookworm-smart-assistant.gi $BootUrl = "https://code.letcareme.com/bookworm/bookworm-boot.git" $BootDir = Join-Path $ScriptDir "bookworm-boot" $SecretsEnc = Join-Path $BootDir "secrets.enc" -$TOTAL_PHASES = 7 +$TOTAL_PHASES = 8 # ─── GUI 初始化 ───────────────────────────────────── Add-Type -AssemblyName System.Windows.Forms @@ -1621,7 +1621,7 @@ if (Test-Path (Join-Path $ClaudeDir ".git")) { try { $currentRemote = (& git -C $ClaudeDir remote get-url origin 2>$null) -replace '\.git$', '' $expectedBase = ($GitUrl -replace '\.git$', '') - if ($currentRemote -and $currentRemote -notmatch 'bookworm-smart-assistant') { + if ($currentRemote -and $currentRemote -ne $expectedBase) { Log-Warn "配置仓库 remote 指向旧源: $currentRemote, 切换到 $GitUrl" & git -C $ClaudeDir remote set-url origin $GitUrl 2>$null Log-OK "remote 已切换到 bookworm-smart-assistant" @@ -2632,8 +2632,12 @@ try { channel = 'stable' } | ConvertTo-Json -Depth 4 $otaConfigPath = Join-Path $otaDir 'config.json' - [IO.File]::WriteAllText($otaConfigPath, $otaConfig, [Text.UTF8Encoding]::new($false)) - Log-OK "8c OTA 配置已写入" + if (-not (Test-Path $otaConfigPath)) { + [IO.File]::WriteAllText($otaConfigPath, $otaConfig, [Text.UTF8Encoding]::new($false)) + Log-OK "8c OTA 配置已写入" + } else { + Log-OK "8c OTA 配置已存在, 保留 lastCheck" + } # 8d: 复制 bw-ota.ps1 (从安装器同目录或 BootDir) $otaScript = Join-Path $otaDir 'bw-ota.ps1'