Skip to content

Commit 2be488a

Browse files
committed
fix: Use full path to makensis in CI workflow
Chocolatey installs NSIS but doesn't add it to PATH automatically. Updated the workflow to search for makensis.exe in common install locations.
1 parent eaa516a commit 2be488a

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,30 @@ jobs:
237237
exit 1
238238
}
239239
240+
# Find makensis - choco installs to Program Files
241+
$nsisPath = "C:\Program Files (x86)\NSIS\makensis.exe"
242+
if (!(Test-Path $nsisPath)) {
243+
$nsisPath = "C:\Program Files\NSIS\makensis.exe"
244+
}
245+
if (!(Test-Path $nsisPath)) {
246+
# Try to find it via where command
247+
$nsisPath = (Get-Command makensis -ErrorAction SilentlyContinue).Source
248+
}
249+
if (!$nsisPath -or !(Test-Path $nsisPath)) {
250+
Write-Error "NSIS makensis.exe not found!"
251+
exit 1
252+
}
253+
254+
Write-Host "Using NSIS at: $nsisPath"
255+
240256
# Build NSIS installer
241257
Write-Host "Building NSIS installer..."
242-
makensis installer.nsi
258+
& $nsisPath installer.nsi
259+
260+
if ($LASTEXITCODE -ne 0) {
261+
Write-Error "NSIS build failed with exit code $LASTEXITCODE"
262+
exit 1
263+
}
243264
244265
# Verify installer was created
245266
if (Test-Path "dist/NetworkMonitor-Setup-*.exe") {

0 commit comments

Comments
 (0)