Mercurial > mxe-octave
changeset 5960:49b3f6c6d255
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".
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 21 Nov 2021 12:29:36 +0100 |
parents | bf9be5e7ab00 |
children | 7c0066684448 |
files | binary-dist-rules.mk installer-files/octave-launch.c |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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); }