fix(packaging/windows): pass installer source files as validated absolute defines
apple / swift (push) Successful in 54s
windows-host / package (push) Failing after 2m23s
ci / rust (push) Successful in 1m20s
ci / web (push) Successful in 29s
ci / docs-site (push) Successful in 31s
android / android (push) Successful in 3m32s
deb / build-publish (push) Successful in 3m7s
decky / build-publish (push) Successful in 13s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
ci / bench (push) Successful in 4m45s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m38s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m43s
docker / deploy-docs (push) Successful in 6s
apple / swift (push) Successful in 54s
windows-host / package (push) Failing after 2m23s
ci / rust (push) Successful in 1m20s
ci / web (push) Successful in 29s
ci / docs-site (push) Successful in 31s
android / android (push) Successful in 3m32s
deb / build-publish (push) Successful in 3m7s
decky / build-publish (push) Successful in 13s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
ci / bench (push) Successful in 4m45s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m38s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m43s
docker / deploy-docs (push) Successful in 6s
The {#SourcePath} relative-traversal for host.env.example/README kept tripping
ISCC ("path not found", error 2) regardless of the separator, so drop it: compute
the two paths absolutely in pack-host-installer.ps1, Test-Path them (clear PS error
if missing), and pass /DHostEnv + /DReadme. The .iss [Files] now reference the
absolute defines — no {#SourcePath}, no ..\.. traversal. Also prints "source ok"
for each so a future failure is unambiguous.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,8 +109,23 @@ 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) -------
|
||||
$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)) {
|
||||
if (-not (Test-Path -LiteralPath $p)) { throw "installer source file missing: $p" }
|
||||
Write-Host " source ok: $p"
|
||||
}
|
||||
$defines = @(
|
||||
"/DMyAppVersion=$Version",
|
||||
"/DBinDir=$TargetDir",
|
||||
"/DOutputDir=$OutDir",
|
||||
"/DHostEnv=$hostEnv",
|
||||
"/DReadme=$readme"
|
||||
)
|
||||
|
||||
# --- stage the SudoVDA driver bundle ----------------------------------------------------------
|
||||
$defines = @("/DMyAppVersion=$Version", "/DBinDir=$TargetDir", "/DOutputDir=$OutDir")
|
||||
if (-not $NoDriver) {
|
||||
$stage = Join-Path $OutDir 'stage'
|
||||
& (Join-Path $here 'stage-sudovda.ps1') -OutDir $stage
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
#ifndef OutputDir
|
||||
#define OutputDir "."
|
||||
#endif
|
||||
; Absolute paths to the two extra payload files, passed by pack-host-installer.ps1 (validated there).
|
||||
#ifndef HostEnv
|
||||
#define HostEnv "..\..\scripts\windows\host.env.example"
|
||||
#endif
|
||||
#ifndef Readme
|
||||
#define Readme "README.md"
|
||||
#endif
|
||||
; StageDir (the staged SudoVDA payload + nefconc.exe + install-sudovda.ps1) is optional.
|
||||
#ifdef StageDir
|
||||
#define WithDriver
|
||||
@@ -56,9 +63,8 @@ Name: "startservice"; Description: "Start the punktfunk host service now (also s
|
||||
|
||||
[Files]
|
||||
Source: "{#BinDir}\punktfunk-host.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
; {#SourcePath} (the .iss dir) has no trailing backslash — keep the explicit '\' separator.
|
||||
Source: "{#SourcePath}\..\..\scripts\windows\host.env.example"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#SourcePath}\README.md"; DestDir: "{app}"; DestName: "README.txt"; Flags: ignoreversion
|
||||
Source: "{#HostEnv}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#Readme}"; DestDir: "{app}"; DestName: "README.txt"; Flags: ignoreversion
|
||||
#ifdef WithDriver
|
||||
; The driver payload + nefconc.exe + install-sudovda.ps1, extracted to {tmp} and removed after install.
|
||||
Source: "{#StageDir}\*"; DestDir: "{tmp}\sudovda"; Flags: deleteafterinstall recursesubdirs createallsubdirs; Tasks: installdriver
|
||||
|
||||
Reference in New Issue
Block a user