# HG changeset patch # User Markus Mützel # Date 1637494176 -3600 # Node ID 49b3f6c6d25525aa4e48f3845d61d86e01d28a90 # Parent bf9be5e7ab005309f42413bac88edb4316a38b67 octave-launch: Don't use short path names when building default-octave. * installer-files/octave-launch.c: Conditionally don't transform to short path names. * binary-dist-rules.mk (octave-launch): De-activate transformation to short path names when building "default-octave". diff -r bf9be5e7ab00 -r 49b3f6c6d255 binary-dist-rules.mk --- a/binary-dist-rules.mk Sun Nov 21 11:55:46 2021 +0100 +++ b/binary-dist-rules.mk Sun Nov 21 12:29:36 2021 +0100 @@ -94,19 +94,24 @@ @: > installer-files/.dirstamp ifeq ($(MXE_WINDOWS_BUILD),yes) + + ifeq ($(OCTAVE_TARGET),default-octave) + OCTAVE_LAUNCH_NO_SHORT_CPPFLAGS := -DNO_SHORT_PATH_NAMES + endif + .PHONY: octave-launch octave-launch: installer-files/octave-launch.exe ## FIXME: We aren't using VPATH? installer-files/octave-launch.exe: $(TOP_DIR)/installer-files/octave-launch.c installer-files/octave-launch.res | installer-files/.dirstamp - $(MXE_CC) $< -o $@ installer-files/octave-launch.res -Wl,--subsystem,windows -lshlwapi -municode -DUNICODE -D_UNICODE + $(MXE_CC) $< -o $@ installer-files/octave-launch.res -Wl,--subsystem,windows -lshlwapi -municode -DUNICODE -D_UNICODE $(OCTAVE_LAUNCH_NO_SHORT_CPPFLAGS) .PHONY: octave-launch-firsttime octave-launch-firsttime: installer-files/octave-launch-firsttime.exe ## FIXME: We aren't using VPATH? installer-files/octave-launch-firsttime.exe: $(TOP_DIR)/installer-files/octave-launch.c installer-files/octave-launch.res | installer-files/.dirstamp - $(MXE_CC) $< -o $@ installer-files/octave-launch.res -Wl,--subsystem,windows -lshlwapi -municode -DUNICODE -D_UNICODE -DFIRST_TIME + $(MXE_CC) $< -o $@ installer-files/octave-launch.res -Wl,--subsystem,windows -lshlwapi -municode -DUNICODE -D_UNICODE -DFIRST_TIME $(OCTAVE_LAUNCH_NO_SHORT_CPPFLAGS) installer-files/octave-launch.res: $(TOP_DIR)/installer-files/octave-launch.rc | installer-files/.dirstamp $(MXE_WINDRES) $< -o $@ -O coff diff -r bf9be5e7ab00 -r 49b3f6c6d255 installer-files/octave-launch.c --- a/installer-files/octave-launch.c Sun Nov 21 11:55:46 2021 +0100 +++ b/installer-files/octave-launch.c Sun Nov 21 12:29:36 2021 +0100 @@ -80,12 +80,16 @@ path[nSize] = L'\0'; } +#ifdef NO_SHORT_PATH_NAMES + StringCchCopyW (rootpath, PATH_SZ, path); +#else /* transform to short paths to work around issues with spaces in paths */ /* FIXME: This won't help on systems with de-activated short paths */ nSize = GetShortPathNameW (path, rootpath, PATH_SZ-1); if (nSize == 0) StringCchCopyW (rootpath, PATH_SZ, path); +#endif SetEnvironmentVariableW (L"MXE_ROOT", rootpath); @@ -200,6 +204,9 @@ StringCchCopyW (path, PATH_SZ, tmpbuff); } +#ifdef NO_SHORT_PATH_NAMES + StringCchCopyW (newhome, PATH_SZ, path); +#else /* transform to short paths to work around issues with spaces in paths */ /* FIXME: This won't help on systems with de-activated short @@ -208,6 +215,7 @@ if (nSize == 0) StringCchCopyW (newhome, PATH_SZ, path); +#endif SetEnvironmentVariableW (L"HOME", newhome); }