$ErrorActionPreference = 'Stop' $root = $PSScriptRoot $destination = Join-Path $root 'dist\KSwitcher' New-Item -ItemType Directory -Force $destination | Out-Null Copy-Item -LiteralPath (Join-Path $root 'build\release\KSwitcher.exe') -Destination $destination Copy-Item -LiteralPath (Join-Path $root 'LICENSE') -Destination $destination Copy-Item -LiteralPath (Join-Path $root 'vendor\json-LICENSE.txt') -Destination $destination Copy-Item -LiteralPath (Join-Path $root 'README.md') -Destination $destination # Enumerate the distributable files explicitly; do not include a user's data directory. $files = @('KSwitcher.exe','LICENSE','json-LICENSE.txt','README.md') | ForEach-Object { Join-Path $destination $_ } $archive = Join-Path $root 'dist\KSwitcher-win-x64.zip' Compress-Archive -LiteralPath $files -DestinationPath $archive -Force Get-FileHash -LiteralPath $archive -Algorithm SHA256