File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,7 +260,13 @@ jobs:
260260 Set-Content $IssPath $issContentNoSign -NoNewline
261261
262262 $InstallerBaseName = "UniGetUI.Installer.$Platform"
263- & ISCC.exe $IssPath /F"$InstallerBaseName" /O"$OutputDir"
263+ $IsccArgs = @($IssPath, "/F$InstallerBaseName", "/O$OutputDir")
264+ if ([System.Boolean]::Parse('${{ needs.preflight.outputs.dry-run }}') -eq $false) {
265+ Write-Host "Using lzma/ultra64 installer compression for release build."
266+ $IsccArgs = @('/DInstallerCompression=lzma/ultra64') + $IsccArgs
267+ }
268+
269+ & ISCC.exe @IsccArgs
264270 if ($LASTEXITCODE -ne 0) { throw "Inno Setup failed with exit code $LASTEXITCODE" }
265271 }
266272 finally {
Original file line number Diff line number Diff line change 66#define MyAppPublisher " Devolutions Inc."
77#define MyAppURL " https://github.com/Devolutions/UniGetUI"
88#define MyAppExeName " UniGetUI.exe"
9+ #ifndef InstallerCompression
10+ #define InstallerCompression " lzma"
11+ #endif
912
1013#define public Dependency_Path_NetCoreCheck " InstallerExtras\"
1114#include " InstallerExtras\CodeDependencies.iss"
@@ -46,7 +49,7 @@ SignedUninstallerDir=InstallerExtras\
4649MinVersion = 10.0
4750SetupIconFile = src\SharedAssets\Assets\Images\icon.ico
4851UninstallDisplayIcon = {app} \UniGetUI.exe
49- Compression = lzma
52+ Compression = {#InstallerCompression}
5053SolidCompression = yes
5154WizardStyle = modern dynamic
5255WizardImageFile = InstallerExtras\installer-banner.png
Original file line number Diff line number Diff line change 2121. PARAMETER Version
2222 Version string to stamp into the build (e.g. "3.3.7"). If not provided,
2323 the current version from SharedAssemblyInfo.cs is used.
24- #>
2524
25+ . PARAMETER MaxInstallerCompression
26+ Use the strongest Inno Setup compression settings for the installer.
27+ #>
2628[CmdletBinding ()]
2729param (
2830 [string ] $Configuration = " Release" ,
2931 [string ] $Platform = " x64" ,
3032 [string ] $OutputPath = (Join-Path $PSScriptRoot " .." " output" ),
3133 [switch ] $SkipTests ,
3234 [switch ] $SkipInstaller ,
35+ [switch ] $MaxInstallerCompression ,
3336 [string ] $Version
3437)
3538
@@ -143,7 +146,13 @@ if (-not $SkipInstaller) {
143146 $IssContentNoSign = $IssContentNoSign -Replace ' (?m)^SignedUninstaller=yes' , ' SignedUninstaller=no'
144147 Set-Content $IssPath $IssContentNoSign - NoNewline
145148
146- & $IsccPath $IssPath / F" $InstallerBaseName " / O" $OutputPath "
149+ $IsccArgs = @ ($IssPath , " /F$InstallerBaseName " , " /O$OutputPath " )
150+ if ($MaxInstallerCompression ) {
151+ Write-Host " Using lzma/ultra64 installer compression."
152+ $IsccArgs = @ (' /DInstallerCompression=lzma/ultra64' ) + $IsccArgs
153+ }
154+
155+ & $IsccPath @IsccArgs
147156 if ($LASTEXITCODE -ne 0 ) {
148157 throw " Inno Setup failed with exit code $LASTEXITCODE "
149158 }
You can’t perform that action at this time.
0 commit comments