Release v0.4.0: add screen capture and annotation editor

This commit is contained in:
2026-10-28 22:15:59 +02:00
parent e5ff9495e4
commit dc615d0223
89 changed files with 2745 additions and 48 deletions
+7 -1
View File
@@ -10,6 +10,12 @@ try {
foreach ($process in $config) { if (-not $process.WaitForExit(10000)) { throw 'Close the configurator before updating.' } }
Copy-Item -LiteralPath (Join-Path $root 'build\staged\KSwitcher.Config.exe') -Destination (Join-Path $root 'build\KSwitcher.Config.exe') -Force
Copy-Item -LiteralPath (Join-Path $root 'build\staged\KSwitcher.exe') -Destination $exe -Force
Start-Process -FilePath $exe -WindowStyle Hidden
$eventName = 'Local\KSwitcher.Update.Started.' + [guid]::NewGuid().ToString('N')
$started = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::ManualReset, $eventName)
try {
$newProcess = Start-Process -FilePath $exe -ArgumentList "--update-ready-event=$eventName" -WorkingDirectory (Split-Path $exe) -WindowStyle Hidden -PassThru
if (-not $started.WaitOne(10000)) { throw 'KSwitcher did not confirm startup within 10 seconds.' }
if ($newProcess.WaitForExit(1000)) { throw "KSwitcher exited after startup (code $($newProcess.ExitCode))." }
} finally { $started.Dispose() }
'OK' | Set-Content -LiteralPath (Join-Path $root 'build\update-result.txt')
} catch { $_.Exception.Message | Set-Content -LiteralPath (Join-Path $root 'build\update-result.txt'); exit 1 }