comparison installer-files/octave.vbs @ 3859:74f53761f74d

GUI: run octave-gui for both gui and non gui options * installer-files/octave.vbs: always run octave-gui
author John Donoghue <john.donoghue@ieee.org>
date Mon, 23 Mar 2015 19:48:56 -0400
parents 1191cff7f132
children 586b26b09042
comparison
equal deleted inserted replaced
3858:9ceedf18871e 3859:74f53761f74d
18 ' and build other args to use 18 ' and build other args to use
19 GUI_MODE=1 19 GUI_MODE=1
20 AllArgs = "" 20 AllArgs = ""
21 Set wshArgs = WScript.Arguments 21 Set wshArgs = WScript.Arguments
22 For I = 0 to wshArgs.Count - 1 22 For I = 0 to wshArgs.Count - 1
23 if wshArgs(I) = "--force-gui" then GUI_MODE=1
24 if wshArgs(I) = "--no-gui" then GUI_MODE=0 23 if wshArgs(I) = "--no-gui" then GUI_MODE=0
25 AllArgs = AllArgs & " " & chr(34) & wshArgs(I) & chr(34) 24 AllArgs = AllArgs & " " & chr(34) & wshArgs(I) & chr(34)
26 Next 25 Next
27 26
28 ' start whatever octave we no want to run 27 ' start octave-gui, either with console shown or hidden
29 If GUI_MODE = 1 then 28 If GUI_MODE = 1 then
30 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 0 29 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 0
31 Else 30 Else
32 wshShell.Run chr(34) & OctavePath & "\bin\octave-cli.exe" & Chr(34) & AllArgs, 1 31 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 1
33 End If 32 End If
34 33
35 ' free our objects 34 ' free our objects
36 Set wshShell = Nothing 35 Set wshShell = Nothing
37 Set wshSystemEnv = Nothing 36 Set wshSystemEnv = Nothing