fix(installer): pass absolute Windows-style paths to makensis

NSIS's File directive resolves relative paths against the .nsi script's
own directory, not the process cwd, so the previous relative
BINARIES_DIR/OUT_DIR resolved to a nonexistent nested path. Use cygpath
to convert to native C:\... paths, since makensis is a native Windows
program that doesn't understand MSYS2's POSIX-style paths either.
This commit is contained in:
Kyle
2026-07-10 14:11:12 -04:00
parent 356db8c51d
commit 4e10c99c9f

View File

@@ -4,12 +4,17 @@
set -e
VERSION=$(jq .version ./packages/insomnia-inso/package.json -rj)
BINARIES_DIR=packages/insomnia-inso/binaries
OUT_DIR=packages/insomnia-inso/artifacts
INSTALLER_DIR=packages/insomnia-inso/installer
mkdir -p $OUT_DIR
mkdir -p packages/insomnia-inso/artifacts
# NSIS's File directive resolves relative paths against the .nsi script's own directory,
# not the process's working directory — pass absolute, native Windows-style paths instead
# (cygpath converts this shell's POSIX-style path to the C:\... form makensis.exe needs).
ROOT_WIN=$(cygpath -w "$(pwd)")
BINARIES_DIR="$ROOT_WIN\\packages\\insomnia-inso\\binaries"
OUT_DIR="$ROOT_WIN\\packages\\insomnia-inso\\artifacts"
echo "Building inso-installer.exe for version $VERSION..."
makensis -DVERSION=$VERSION -DBINARIES_DIR=$BINARIES_DIR -DOUT_DIR=$OUT_DIR $INSTALLER_DIR/inso-installer.nsi
echo "Done. See $OUT_DIR/inso-installer.exe"
makensis -DVERSION=$VERSION -DBINARIES_DIR="$BINARIES_DIR" -DOUT_DIR="$OUT_DIR" $INSTALLER_DIR/inso-installer.nsi
echo "Done. See $OUT_DIR\\inso-installer.exe"