Mercurial > mxe-octave
annotate installer-files/octave-firsttime.vbs @ 4253:32a7bea19bb1
msys-gzip: add .bat wrappers to shellscripts
* tools/gen-bat-wrapper: new file
* dist-files.mk: add gen-bat-wrapper
* src/msys-gzip.mk: add find of shell script and create .bat file
author | John D |
---|---|
date | Mon, 21 Nov 2016 17:11:21 -0500 |
parents | 44b1a9b2193e |
children | a45374f7d9a3 |
rev | line source |
---|---|
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
1 ' script to run octave in gui/command mode |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
2 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
3 Set wshShell = CreateObject( "WScript.Shell" ) |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
4 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
5 ' get the directory that script resides in |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
6 Set fso = CreateObject("Scripting.FileSystemObject") |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
7 OctavePath = fso.GetParentFolderName(WScript.ScriptFullName) |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
8 Set fso = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
9 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
10 ' set up path to ensure octave bin comes first |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
11 Set wshSystemEnv = wshShell.Environment( "PROCESS" ) |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
12 wshSystemEnv("PATH") = OctavePath & "\bin;" & wshSystemEnv("PATH") |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
13 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
14 ' set terminal type |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
15 wshSystemEnv("TERM") = "cygwin" |
4183 | 16 wshSystemEnv("GNUTERM") = "windows" |
17 | |
18 wshSystemEnv("GS") = "gs.exe" | |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
19 |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
20 ' set Qt plugin directory and path |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
21 Set objFSO = CreateObject("Scripting.FileSystemObject") |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
22 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
|
23 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
|
24 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
|
25 Else |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
26 wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins" |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
27 End If |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
28 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
29 ' set directory to users |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
30 startpath = wshShell.ExpandEnvironmentStrings("%UserProfile%") |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
31 wshShell.CurrentDirectory = startpath |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
32 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
33 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34), 0 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
34 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
35 ' free our objects |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
36 Set wshShell = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
37 Set wshSystemEnv = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
38 Set wshArgs = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
39 |