Mercurial > mxe-octave
annotate installer-files/cmdshell.bat @ 6001:88762923aa9a release
octave-launch: Attach to console of parent process if applicable.
* installer-files/octave-launch.c: If parent process has a console, attach to
it.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 05 Dec 2021 18:26:51 +0100 |
parents | 27b4f385c45d |
children | cf7adc238c0c |
rev | line source |
---|---|
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
diff
changeset
|
1 @echo off |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
diff
changeset
|
2 |
4062
57bc5d4ff660
cmdshell: use OCTAVE_HOME variable instead of OCT_HOME
John D
parents:
3963
diff
changeset
|
3 set OCTAVE_HOME=%~dp0 |
5459
f146714a73c3
* installer-files/cmdshell.bat: allow path set in .bat file ti teh transfers through to bash
John Donoghue <john.donoghue@ieee.org>
parents:
5301
diff
changeset
|
4 Rem NOTE: OCTAVE_HOME has a end \ |
4257
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
5 Rem convert to 8.3 format |
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
6 for %%I in ("%OCTAVE_HOME%") do set OCTAVE_HOME=%%~sI |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
diff
changeset
|
7 |
4257
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
8 Rem set home if not already set |
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
9 if "%HOME%"=="" set HOME=%USERPROFILE% |
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
10 if "%HOME%"=="" set HOME=%HOMEDRIVE%%HOMEPATH% |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
diff
changeset
|
11 |
4257
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
12 Rem set HOME to 8.3 format |
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
13 for %%I in ("%HOME%") do set HOME=%%~sI |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
diff
changeset
|
14 |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
15 set MSYSDIR=%OCTAVE_HOME% |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
16 set MSYSTEM=MSYS |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
17 |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
18 Rem if no msys-1.0, must be msys2 |
5649
27b4f385c45d
cmdshell.bat: Use double-quotes to allow for spaces in path (bug #59923).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5459
diff
changeset
|
19 if NOT EXIST "%OCTAVE_HOME%bin\msys-1.0.dll" set MSYSDIR=%OCTAVE_HOME%usr |
4257
8f71549f53b9
cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765)
John D
parents:
4232
diff
changeset
|
20 |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
21 Rem 32 or 64 bit |
5649
27b4f385c45d
cmdshell.bat: Use double-quotes to allow for spaces in path (bug #59923).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5459
diff
changeset
|
22 if EXIST "%OCTAVE_HOME%mingw32\bin\octave-cli.exe" set MSYSTEM=MINGW32 |
27b4f385c45d
cmdshell.bat: Use double-quotes to allow for spaces in path (bug #59923).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5459
diff
changeset
|
23 if EXIST "%OCTAVE_HOME%mingw64\bin\octave-cli.exe" set MSYSTEM=MINGW64 |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
24 |
5649
27b4f385c45d
cmdshell.bat: Use double-quotes to allow for spaces in path (bug #59923).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5459
diff
changeset
|
25 if EXIST "%OCTAVE_HOME%mingw32\bin\octave-cli.exe" set OCTAVE_HOME=%OCTAVE_HOME%mingw32\ |
27b4f385c45d
cmdshell.bat: Use double-quotes to allow for spaces in path (bug #59923).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5459
diff
changeset
|
26 if EXIST "%OCTAVE_HOME%mingw64\bin\octave-cli.exe" set OCTAVE_HOME=%OCTAVE_HOME%mingw64\ |
4953
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
27 |
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
28 Rem Set up PATH. Make sure the octave bin dir |
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
29 Rem comes first. |
5301 | 30 set PATH=%OCTAVE_HOME%qt5\bin;%OCTAVE_HOME%bin;%OCTAVE_HOME%python;%PATH% |
4953
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
31 set TERM=cygwin |
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
32 set GS=gs.exe |
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
33 set GNUTERM=wxt |
cbf69a7357d9
* installer-files/cmdshell.bat: fix OCTAVE_HOME and PATH when is using msys2 mingw32 or mingw64
John Donoghue
parents:
4793
diff
changeset
|
34 |
5459
f146714a73c3
* installer-files/cmdshell.bat: allow path set in .bat file ti teh transfers through to bash
John Donoghue <john.donoghue@ieee.org>
parents:
5301
diff
changeset
|
35 Rem tell msys2 to use the paths we set here which matches what octave would do |
f146714a73c3
* installer-files/cmdshell.bat: allow path set in .bat file ti teh transfers through to bash
John Donoghue <john.donoghue@ieee.org>
parents:
5301
diff
changeset
|
36 set MSYS2_PATH_TYPE=inherit |
f146714a73c3
* installer-files/cmdshell.bat: allow path set in .bat file ti teh transfers through to bash
John Donoghue <john.donoghue@ieee.org>
parents:
5301
diff
changeset
|
37 |
5649
27b4f385c45d
cmdshell.bat: Use double-quotes to allow for spaces in path (bug #59923).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5459
diff
changeset
|
38 "%MSYSDIR%\bin\bash.exe" --login -i |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4472
diff
changeset
|
39 |