From b9cf8b9523f462780731eaa0120a0eb88635049a Mon Sep 17 00:00:00 2001 From: Coen van den Munckhof Date: Wed, 2 Sep 2026 11:32:35 +0200 Subject: [PATCH 1/2] installer nsis via choco --- .../Pipelines/Templates/create-installer.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.azuredevops/Pipelines/Templates/create-installer.yaml b/.azuredevops/Pipelines/Templates/create-installer.yaml index aa649c4c..51aadcdf 100644 --- a/.azuredevops/Pipelines/Templates/create-installer.yaml +++ b/.azuredevops/Pipelines/Templates/create-installer.yaml @@ -17,12 +17,15 @@ steps: displayName: Remove empty directories - pwsh: | - nuget install NSIS-Package -Version 3.11.0.2 -OutputDirectory ./packages - $nsis = Get-ChildItem -Path "./packages" -Filter "makensis.exe" -Recurse | Select-Object -First 1 + choco install nsis --version 3.12.0 --yes --no-progress --limit-output + if ($LASTEXITCODE -ne 0) { + throw "Chocolatey failed to install NSIS (exit code $LASTEXITCODE)." + } + $nsis = Get-Command makensis.exe -ErrorAction SilentlyContinue if (-not $nsis) { - Write-Error "makensis.exe not found in ./packages after nuget install NSIS-Package" + throw "makensis.exe was not found on PATH after installing NSIS." } - & $nsis.FullName /DPRODUCT_VERSION=$Env:NBGV_SEMVER2 setup/RepoM.nsi + & $nsis.Source /DPRODUCT_VERSION=$Env:NBGV_SEMVER2 setup/RepoM.nsi displayName: ⚙️ Create installer - task: DeleteFiles@1 From 76d479f70b1137358924ce4dc0595bb67003f964 Mon Sep 17 00:00:00 2001 From: Coen van den Munckhof Date: Wed, 2 Sep 2026 11:49:15 +0200 Subject: [PATCH 2/2] Fix installer script to correctly locate makensis.exe after NSIS installation --- .azuredevops/Pipelines/Templates/create-installer.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azuredevops/Pipelines/Templates/create-installer.yaml b/.azuredevops/Pipelines/Templates/create-installer.yaml index 51aadcdf..34702e16 100644 --- a/.azuredevops/Pipelines/Templates/create-installer.yaml +++ b/.azuredevops/Pipelines/Templates/create-installer.yaml @@ -21,11 +21,11 @@ steps: if ($LASTEXITCODE -ne 0) { throw "Chocolatey failed to install NSIS (exit code $LASTEXITCODE)." } - $nsis = Get-Command makensis.exe -ErrorAction SilentlyContinue - if (-not $nsis) { - throw "makensis.exe was not found on PATH after installing NSIS." + $nsis = Join-Path ${env:ProgramFiles(x86)} "NSIS\makensis.exe" + if (-not (Test-Path -LiteralPath $nsis -PathType Leaf)) { + throw "makensis.exe was not found at '$nsis' after installing NSIS." } - & $nsis.Source /DPRODUCT_VERSION=$Env:NBGV_SEMVER2 setup/RepoM.nsi + & $nsis /DPRODUCT_VERSION=$Env:NBGV_SEMVER2 setup/RepoM.nsi displayName: ⚙️ Create installer - task: DeleteFiles@1