diff --git a/Bookworm-Setup.exe b/Bookworm-Setup.exe index 57cc926..c8dac6d 100644 Binary files a/Bookworm-Setup.exe and b/Bookworm-Setup.exe differ 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'