Give makensis absolute paths, and one installer to find
Benchmarks / CPU and I/O (per commit) (push) Successful in 2m53s
Benchmarks / Frame budget (on demand) (push) Skipped
Build and test / Desktop (Linux) (push) Successful in 1h34m55s
Build and test / Layer separation (push) Successful in 1m10s
🐳 Android image / Build and push (push) Successful in 3s
Build and test / android-image (push) Successful in 3s
🐳 Windows image / Build and push (push) Successful in 6s
Build and test / windows-image (push) Successful in 6s
Traceability / Requirement traces (push) Successful in 38s
Build and test / Android (aarch64) (push) Successful in 27m51s
Build and test / Windows (x86_64, cross) (push) Successful in 1h10m51s

The first CI run of the Windows leg passed every step up to packaging
and died in makensis with LicenseData: open failed
"target-windows/installer/stage\LICENSE". CI sets CARGO_TARGET_DIR to
the relative target-windows, and NSIS on a POSIX host translates the
backslash in a File path only when a leading / tells it the path is a
POSIX one; a relative name reaches it with the backslash intact.
Locally the target was always /work/…, which is why it never showed.
package.sh now resolves its directories with realpath first.

It also removes any installer already in the output directory before
writing the new one. That directory is cached between runs, so after a
version bump a glob over it finds two, and the smoke test hands Wine
both names joined by a newline as one path — which is what happened
locally the moment the version moved to 0.12.1.
This commit is contained in:
2026-09-14 01:12:33 +02:00
parent 8012979a1e
commit 8c3b62745a
+13 -2
View File
@@ -13,8 +13,15 @@ set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO="$(cd "${HERE}/../.." && pwd)" REPO="$(cd "${HERE}/../.." && pwd)"
TARGET="${CARGO_TARGET_DIR:-${REPO}/target}/x86_64-pc-windows-gnu/release" # Absolute, whatever CARGO_TARGET_DIR was. NSIS on a POSIX host translates
OUT="${OUT:-${CARGO_TARGET_DIR:-${REPO}/target}/installer}" # the backslashes in `${STAGE}\LICENSE` only when it can tell the path is a
# POSIX one, which it decides from a leading `/`; a relative `target-windows`
# — which is exactly what CI sets — reaches it as a name with a literal
# backslash in it and "LicenseData: open failed". The first CI run died there,
# after every step before it had passed.
TARGET_DIR="$(realpath -m "${CARGO_TARGET_DIR:-${REPO}/target}")"
TARGET="${TARGET_DIR}/x86_64-pc-windows-gnu/release"
OUT="$(realpath -m "${OUT:-${TARGET_DIR}/installer}")"
EXE="${TARGET}/darkroom-desktop.exe" EXE="${TARGET}/darkroom-desktop.exe"
[[ -f "${EXE}" ]] || { echo "error: ${EXE} not built" >&2; exit 1; } [[ -f "${EXE}" ]] || { echo "error: ${EXE} not built" >&2; exit 1; }
@@ -56,6 +63,10 @@ for dir in face scene; do
done done
echo "==> staged $(ls "${STAGE}/models" | wc -l) model file(s)" echo "==> staged $(ls "${STAGE}/models" | wc -l) model file(s)"
# One installer in the output directory, the one just built. The directory
# is cached between CI runs, so after a version bump a glob over it would find
# two and the smoke test would hand Wine both names as one path.
rm -f "${OUT}"/DarkRoom-*-x86_64-setup.exe
INSTALLER="${OUT}/DarkRoom-${VERSION}-x86_64-setup.exe" INSTALLER="${OUT}/DarkRoom-${VERSION}-x86_64-setup.exe"
# NSIS wants Windows-style paths in File directives even on a POSIX host, and # NSIS wants Windows-style paths in File directives even on a POSIX host, and
# the script takes its inputs by define so nothing about the layout here is # the script takes its inputs by define so nothing about the layout here is