Fix temp .iss path: write alongside original, not in Output subdir

Relative paths in RynthCore.iss (SetupIconFile, Source staging\app\*)
are relative to installer\. Writing the temp file to installer\Output\
shifted these paths one level up, causing 'path not found' errors.
Write to installer\RynthCore.tmp.iss instead and clean up after ISCC.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tombohar 2026-04-18 13:48:04 -04:00
commit fb4fe05657

View file

@ -147,7 +147,9 @@ New-Item -ItemType Directory -Path "$ScriptDir\Output" -Force | Out-Null
# /D flags to ISPP (the preprocessor chokes on them in some Inno Setup 6
# builds when the .iss file has specific content patterns).
$issSource = "$ScriptDir\RynthCore.iss"
$issTmp = "$ScriptDir\Output\RynthCore.tmp.iss"
# Write temp file alongside the original so all relative paths (SetupIconFile,
# Source, staging\) still resolve from the installer\ directory.
$issTmp = "$ScriptDir\RynthCore.tmp.iss"
$issContent = Get-Content $issSource -Raw
if ($Version) {
$issContent = $issContent -replace 'AppVersion=0\.0\.0', "AppVersion=$Version"
@ -155,8 +157,12 @@ if ($Version) {
}
Set-Content -Path $issTmp -Value $issContent -Encoding UTF8
& $IsccPath $issTmp
if ($LASTEXITCODE -ne 0) { throw "ISCC build failed (exit $LASTEXITCODE)" }
try {
& $IsccPath $issTmp
if ($LASTEXITCODE -ne 0) { throw "ISCC build failed (exit $LASTEXITCODE)" }
} finally {
Remove-Item $issTmp -Force -ErrorAction SilentlyContinue
}
Write-Host ""
Write-Host "SUCCESS" -ForegroundColor Green