changeset 4953:cbf69a7357d9

* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
author John Donoghue
date Wed, 06 Feb 2019 08:57:29 -0500
parents fa56d6006e32
children c105cddd23d5
files installer-files/cmdshell.bat
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/installer-files/cmdshell.bat	Wed Feb 06 08:23:17 2019 -0500
+++ b/installer-files/cmdshell.bat	Wed Feb 06 08:57:29 2019 -0500
@@ -4,14 +4,6 @@
 Rem convert to 8.3 format
 for %%I in ("%OCTAVE_HOME%") do set OCTAVE_HOME=%%~sI
 
-Rem   Set up PATH. Make sure the octave bin dir
-Rem   comes first.
-
-set PATH=%OCTAVE_HOME%qt5\bin;%OCTAVE_HOME%bin;%PATH%
-set TERM=cygwin
-set GS=gs.exe
-set GNUTERM=wxt
-
 Rem set home if not already set
 if "%HOME%"=="" set HOME=%USERPROFILE%
 if "%HOME%"=="" set HOME=%HOMEDRIVE%%HOMEPATH%
@@ -29,5 +21,15 @@
 if EXIST %OCTAVE_HOME%\mingw32\bin\octave-cli.exe set MSYSTEM=MINGW32
 if EXIST %OCTAVE_HOME%\mingw64\bin\octave-cli.exe set MSYSTEM=MINGW64
 
+if EXIST %OCTAVE_HOME%\mingw32\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%\mingw32
+if EXIST %OCTAVE_HOME%\mingw64\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%\mingw64
+
+Rem   Set up PATH. Make sure the octave bin dir
+Rem   comes first.
+set PATH=%OCTAVE_HOME%qt5\bin;%OCTAVE_HOME%bin;%PATH%
+set TERM=cygwin
+set GS=gs.exe
+set GNUTERM=wxt
+
 %MSYSDIR%\bin\bash.exe --login -i