Skip to content

Commit

Permalink
CI: Change Windows packaging to generate ZIP archives by default
Browse files Browse the repository at this point in the history
The current code either packages a .msi **or** generates a .zip.
Many users prefer the zip (and it has the benefit of mitigating code signing warnings).
This change always generates the .zip file.
If `-BuildInstaller` is also specified then is **also** builds a .msi.
  • Loading branch information
paulpv committed Dec 11, 2023
1 parent e385ac1 commit caaaaa9
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/scripts/Package-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,20 @@ function Package {

Remove-Item @RemoveArgs

Log-Group "Archiving ${ProductName}..."
$CompressArgs = @{
Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*")
CompressionLevel = 'Optimal'
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
Verbose = ($Env:CI -ne $null)
}
Compress-Archive -Force @CompressArgs
Log-Group

if ( ( $BuildInstaller ) ) {
Log-Group "Packaging ${ProductName}..."
$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"

$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"
if ( ! ( Test-Path -Path $IsccFile ) ) {
throw 'InnoSetup install script not found. Run the build script or the CMake build and install procedures first.'
}
Expand All @@ -79,18 +89,9 @@ function Package {
Invoke-External iscc ${IsccFile} /O"${ProjectRoot}/release" /F"${OutputName}-Installer"
Remove-Item -Path Package -Recurse
Pop-Location -Stack BuildTemp
} else {
Log-Group "Archiving ${ProductName}..."
$CompressArgs = @{
Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*")
CompressionLevel = 'Optimal'
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
Verbose = ($Env:CI -ne $null)
}

Compress-Archive -Force @CompressArgs
Log-Group
}
Log-Group
}

Package

0 comments on commit caaaaa9

Please # to comment.