Release v0.3.0: move settings into an on-demand single-instance configurator
This commit is contained in:
@@ -6,6 +6,9 @@ try {
|
||||
$stop = Start-Process -FilePath $exe -ArgumentList '--exit' -WindowStyle Hidden -PassThru
|
||||
if (-not $stop.WaitForExit(5000)) { throw 'Exit command timed out.' }
|
||||
foreach ($process in $running) { if (-not $process.WaitForExit(10000)) { throw 'KSwitcher did not stop.' } }
|
||||
$config = @(Get-Process 'KSwitcher.Config' -ErrorAction SilentlyContinue | Where-Object { $_.Path -eq (Join-Path $root 'build\KSwitcher.Config.exe') })
|
||||
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
|
||||
'OK' | Set-Content -LiteralPath (Join-Path $root 'build\update-result.txt')
|
||||
|
||||
Reference in New Issue
Block a user