annotate installer-files/octave-firsttime.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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)
4258
a45374f7d9a3 Use 8.3 format for octave path
John D
parents: 4222
diff changeset
8 ' get path as a 8.3 path
a45374f7d9a3 Use 8.3 format for octave path
John D
parents: 4222
diff changeset
9 Set fo = fso.GetFolder(OctavePath)
a45374f7d9a3 Use 8.3 format for octave path
John D
parents: 4222
diff changeset
10 OctavePath = fo.ShortPath
a45374f7d9a3 Use 8.3 format for octave path
John D
parents: 4222
diff changeset
11 Set fo = Nothing
4028
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
12 Set fso = Nothing
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 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
15 Set wshSystemEnv = wshShell.Environment( "PROCESS" )
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
16 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
17
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
18 ' set terminal type
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
19 wshSystemEnv("TERM") = "cygwin"
4183
cc549d1865cb pstoedit: use GS environment var if set in windows
John D
parents: 4028
diff changeset
20 wshSystemEnv("GNUTERM") = "windows"
cc549d1865cb pstoedit: use GS environment var if set in windows
John D
parents: 4028
diff changeset
21
cc549d1865cb pstoedit: use GS environment var if set in windows
John D
parents: 4028
diff changeset
22 wshSystemEnv("GS") = "gs.exe"
4028
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
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
4028
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 ' set directory to users
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
34 startpath = wshShell.ExpandEnvironmentStrings("%UserProfile%")
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
35 wshShell.CurrentDirectory = startpath
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
36
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
37 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
38
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
39 ' free our objects
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
40 Set wshShell = Nothing
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
41 Set wshSystemEnv = Nothing
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
42 Set wshArgs = Nothing
8803dfa40236 nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff changeset
43