Mercurial > mxe-octave
comparison installer-files/octave.bat @ 4646:89a9c9a80669
octave.bat: Start CLI by default and don't close terminal window (bug #53419).
* octave.bat: Set GUI_MODE=0 to start CLI by default.
Delete "exit" at end of file so that terminal that executed octave.bat is not
destroyed.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 28 Mar 2018 16:08:06 -0700 |
parents | 56a712112482 |
children | d1d36bdbc1ae |
comparison
equal
deleted
inserted
replaced
4645:56a712112482 | 4646:89a9c9a80669 |
---|---|
29 if "%HOME%"=="" set HOME=%USERPROFILE% | 29 if "%HOME%"=="" set HOME=%USERPROFILE% |
30 if "%HOME%"=="" set HOME=%HOMEDRIVE%%HOMEPATH% | 30 if "%HOME%"=="" set HOME=%HOMEDRIVE%%HOMEPATH% |
31 Rem set HOME to 8.3 format | 31 Rem set HOME to 8.3 format |
32 for %%I in ("%HOME%") do set HOME=%%~sI | 32 for %%I in ("%HOME%") do set HOME=%%~sI |
33 | 33 |
34 Rem Check for args to see if we are told to start GUI (--gui, --force-gui) | 34 Rem Check for args to determine if GUI (--gui, --force-gui) |
35 Rem or not (--no-gui). | 35 Rem or CLI (--no-gui) should be started. |
36 Rem If nothing is specified, start the GUI. | 36 Rem If nothing is specified, start the CLI. |
37 set GUI_MODE=1 | 37 set GUI_MODE=0 |
38 :checkargs | 38 :checkargs |
39 if -%1-==-- goto args_done | 39 if -%1-==-- goto args_done |
40 | 40 |
41 if %1==--gui ( | 41 if %1==--gui ( |
42 set GUI_MODE=1 | 42 set GUI_MODE=1 |
52 shift | 52 shift |
53 goto checkargs | 53 goto checkargs |
54 | 54 |
55 :args_done | 55 :args_done |
56 | 56 |
57 Rem Start Octave (this detaches and immediately returns): | 57 Rem Start Octave (this detaches and immediately returns). |
58 if %GUI_MODE%==1 ( | 58 if %GUI_MODE%==1 ( |
59 start octave-gui.exe --gui %* | 59 start octave-gui.exe --gui %* |
60 ) else ( | 60 ) else ( |
61 start octave-cli.exe %* | 61 start octave-cli.exe %* |
62 ) | 62 ) |
63 | 63 |
64 Rem Close the batch file's cmd.exe window | |
65 exit |