From 4e10c99c9fbb617722ea06e85e0f211a3676eae2 Mon Sep 17 00:00:00 2001 From: Kyle Date: Fri, 10 Jul 2026 14:11:12 -0400 Subject: [PATCH] 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. --- build-inso-installer.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/build-inso-installer.sh b/build-inso-installer.sh index d3d46da090..2f2ba416f3 100755 --- a/build-inso-installer.sh +++ b/build-inso-installer.sh @@ -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"