fix(packaging/windows): dodge WOW64 redirection — run ISCC on copies under C:\t
apple / swift (push) Successful in 53s
windows-host / package (push) Successful in 2m14s
ci / rust (push) Successful in 1m13s
ci / web (push) Successful in 30s
ci / docs-site (push) Successful in 31s
android / android (push) Successful in 3m32s
deb / build-publish (push) Successful in 3m6s
decky / build-publish (push) Successful in 18s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 6s
ci / bench (push) Successful in 4m48s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 5s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 10m10s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 10m8s
docker / deploy-docs (push) Successful in 6s
apple / swift (push) Successful in 53s
windows-host / package (push) Successful in 2m14s
ci / rust (push) Successful in 1m13s
ci / web (push) Successful in 30s
ci / docs-site (push) Successful in 31s
android / android (push) Successful in 3m32s
deb / build-publish (push) Successful in 3m6s
decky / build-publish (push) Successful in 18s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 6s
ci / bench (push) Successful in 4m48s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 5s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 10m10s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 10m8s
docker / deploy-docs (push) Successful in 6s
Root cause of the persistent ISCC "path not found": ISCC.exe is 32-bit, and the self-hosted runner runs as SYSTEM, so the checkout lives under C:\Windows\System32\config\systemprofile\.cache\... . WOW64 file-system redirection rewrites a 32-bit process's System32 reads to SysWOW64 (where nothing exists), so ISCC died opening the .iss before it even printed its version line. (The smoke-test diagnostic compiled fine precisely because it lived at C:\t\out.) Fix: copy every file ISCC reads (the .iss + host.env.example + README.md) into the non-redirected build dir C:\t\out and compile from there; BinDir, StageDir, and OutputDir already live under C:\t. Removed the now-spent smoke diagnostic. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,14 +109,26 @@ function Sign-File([string]$Path) {
|
||||
# --- sign the inner exe before it's packed ----------------------------------------------------
|
||||
Sign-File $exe
|
||||
|
||||
# --- resolve + validate the installer's source files (absolute paths -> ISCC /D defines) -------
|
||||
# --- resolve + validate the installer's source files ------------------------------------------
|
||||
$repoRoot = (Resolve-Path (Join-Path $here '..\..')).Path
|
||||
$hostEnv = Join-Path $repoRoot 'scripts\windows\host.env.example'
|
||||
$readme = Join-Path $here 'README.md'
|
||||
foreach ($p in @($exe, $hostEnv, $readme)) {
|
||||
$hostEnvSrc = Join-Path $repoRoot 'scripts\windows\host.env.example'
|
||||
$readmeSrc = Join-Path $here 'README.md'
|
||||
foreach ($p in @($exe, $hostEnvSrc, $readmeSrc, $iss)) {
|
||||
if (-not (Test-Path -LiteralPath $p)) { throw "installer source file missing: $p" }
|
||||
Write-Host " source ok: $p"
|
||||
}
|
||||
|
||||
# ISCC is a 32-bit program. On the self-hosted runner (which runs as SYSTEM) the checkout lives
|
||||
# under C:\Windows\System32\config\systemprofile\..., and WOW64 file-system redirection rewrites a
|
||||
# 32-bit process's System32 reads to SysWOW64 (where the files don't exist) -> ISCC dies at
|
||||
# script-open with "path not found". So stage every file ISCC reads (the .iss + the two payload
|
||||
# files) into the non-redirected build dir under C:\t. (BinDir/StageDir/OutputDir already live there.)
|
||||
$hostEnv = Join-Path $OutDir 'host.env.example'
|
||||
$readme = Join-Path $OutDir 'README.md'
|
||||
$issLocal = Join-Path $OutDir 'punktfunk-host.iss'
|
||||
Copy-Item -LiteralPath $hostEnvSrc -Destination $hostEnv -Force
|
||||
Copy-Item -LiteralPath $readmeSrc -Destination $readme -Force
|
||||
Copy-Item -LiteralPath $iss -Destination $issLocal -Force
|
||||
|
||||
$defines = @(
|
||||
"/DMyAppVersion=$Version",
|
||||
"/DBinDir=$TargetDir",
|
||||
@@ -134,26 +146,10 @@ if (-not $NoDriver) {
|
||||
}
|
||||
else { Write-Host "-NoDriver: building installer WITHOUT the bundled SudoVDA driver" }
|
||||
|
||||
# --- build the installer ----------------------------------------------------------------------
|
||||
Write-Host "==> ISCC $($defines -join ' ') $iss"
|
||||
& $iscc @defines $iss
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
$rc = $LASTEXITCODE
|
||||
Write-Warning "ISCC failed ($rc) — diagnostics:"
|
||||
$innoDir = Split-Path $iscc
|
||||
Write-Host " Inno dir: $innoDir"
|
||||
Write-Host " Default.isl present: $(Test-Path (Join-Path $innoDir 'Default.isl'))"
|
||||
Get-ChildItem $innoDir -File -ErrorAction SilentlyContinue | ForEach-Object { " $($_.Name)" }
|
||||
Write-Host " OutDir=$OutDir exists=$(Test-Path $OutDir) ; TargetDir=$TargetDir exists=$(Test-Path $TargetDir) ; StageExists=$(Test-Path (Join-Path $OutDir 'stage'))"
|
||||
# smoke test: does ISCC compile a trivial [Setup]-only script on this box at all?
|
||||
$smoke = Join-Path $OutDir 'smoke.iss'
|
||||
"[Setup]`r`nAppName=smoke`r`nAppVersion=1.0`r`nDefaultDirName={autopf}\smoke`r`nOutputDir=$OutDir`r`nOutputBaseFilename=smoke`r`n[Files]" |
|
||||
Set-Content -Encoding ASCII $smoke
|
||||
Write-Host "== smoke-test ISCC (trivial script) =="
|
||||
& $iscc $smoke
|
||||
Write-Host "== smoke rc=$LASTEXITCODE =="
|
||||
throw "ISCC failed ($rc)"
|
||||
}
|
||||
# --- build the installer (from the non-redirected copy under C:\t) -----------------------------
|
||||
Write-Host "==> ISCC $($defines -join ' ') $issLocal"
|
||||
& $iscc @defines $issLocal
|
||||
if ($LASTEXITCODE -ne 0) { throw "ISCC failed ($LASTEXITCODE)" }
|
||||
|
||||
$setup = Join-Path $OutDir "punktfunk-host-setup-$Version.exe"
|
||||
if (-not (Test-Path $setup)) { throw "expected installer not produced: $setup" }
|
||||
|
||||
Reference in New Issue
Block a user