Mercurial > mxe-octave
annotate installer-files/octave.vbs @ 4258:a45374f7d9a3
Use 8.3 format for octave path
* installer-files/octave-firsttime.vbs: convert OctavePath to shortpath
* installer-files/octave.vbs: convert OctavePath to shortpath
* installer-files/octave.bat: convert OCT_HOME to 8.3 path
* tools/makeinst-script.sh.in: call pkg rbuild and fc_cache with 8.3 pathname
author | John D |
---|---|
date | Tue, 06 Dec 2016 02:27:58 -0500 |
parents | 44b1a9b2193e |
children | b73fe78f73c3 |
rev | line source |
---|---|
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
1 ' script to run octave in gui/command mode |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
2 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
3 Set wshShell = CreateObject( "WScript.Shell" ) |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
4 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
5 ' get the directory that script resides in |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
6 Set fso = CreateObject("Scripting.FileSystemObject") |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
7 OctavePath = fso.GetParentFolderName(WScript.ScriptFullName) |
4258 | 8 ' get path as a 8.3 path |
9 Set fo = fso.GetFolder(OctavePath) | |
10 OctavePath = fo.ShortPath | |
11 Set fo = Nothing | |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
12 Set fso = Nothing |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
13 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
14 ' set up path to ensure octave bin comes first |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
15 Set wshSystemEnv = wshShell.Environment( "PROCESS" ) |
3831
1191cff7f132
nsis installer: change file registrations to use octave.vbs
John D
parents:
3817
diff
changeset
|
16 wshSystemEnv("PATH") = OctavePath & "\bin;" & wshSystemEnv("PATH") |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
17 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
18 ' set terminal type |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
19 wshSystemEnv("TERM") = "cygwin" |
4153
908a2a0cf6d6
octave.vbs: set GNUTERM env variable (Bug #47994)
John Donoghue
parents:
3909
diff
changeset
|
20 wshSystemEnv("GNUTERM") = "windows" |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
21 |
4183 | 22 wshSystemEnv("GS") = "gs.exe" |
23 | |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
24 ' set Qt plugin directory and path |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
25 Set objFSO = CreateObject("Scripting.FileSystemObject") |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
26 If objFSO.FolderExists(OctavePath & "\qt5\bin") Then |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
27 wshSystemEnv("PATH") = OctavePath & "\qt5\bin;" & wshSystemEnv("PATH") |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
28 wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\qt5\plugins" |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
29 Else |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
30 wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins" |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
31 End If |
3909
586b26b09042
set QT_PLUGIN_PATH in octave.vbs
John W. Eaton <jwe@octave.org>
parents:
3859
diff
changeset
|
32 |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
33 ' check args to see if told to run gui or command line |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
34 ' and build other args to use |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
35 GUI_MODE=1 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
36 AllArgs = "" |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
37 Set wshArgs = WScript.Arguments |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
38 For I = 0 to wshArgs.Count - 1 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
39 if wshArgs(I) = "--no-gui" then GUI_MODE=0 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
40 AllArgs = AllArgs & " " & chr(34) & wshArgs(I) & chr(34) |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
41 Next |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
42 |
3859
74f53761f74d
GUI: run octave-gui for both gui and non gui options
John Donoghue <john.donoghue@ieee.org>
parents:
3831
diff
changeset
|
43 ' start octave-gui, either with console shown or hidden |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
44 If GUI_MODE = 1 then |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
45 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 0 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
46 Else |
3859
74f53761f74d
GUI: run octave-gui for both gui and non gui options
John Donoghue <john.donoghue@ieee.org>
parents:
3831
diff
changeset
|
47 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 1 |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
48 End If |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
49 |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
50 ' free our objects |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
51 Set wshShell = Nothing |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
52 Set wshSystemEnv = Nothing |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
53 Set wshArgs = Nothing |
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
54 |