comparison installer-files/octave-firsttime.vbs @ 4028:8803dfa40236

nsis installer: set directory to userprofile on startof octave from installer (Bug #45899) * installer-files/octave-firsttime.vbs: new file * binary-dist-rules.mk: copy octave-firsttime.vbs to disy folder * dist-files.mk: add installer-files/octave-firsttime.vbs * makeinst-script.sh: install and then run octave-firsttime.vbs if the run checkbox is selected at end of install.
author John Donoghue
date Wed, 16 Sep 2015 07:51:27 -0400
parents
children cc549d1865cb
comparison
equal deleted inserted replaced
4027:c8c394328c54 4028:8803dfa40236
1 ' script to run octave in gui/command mode
2
3 Set wshShell = CreateObject( "WScript.Shell" )
4
5 ' get the directory that script resides in
6 Set fso = CreateObject("Scripting.FileSystemObject")
7 OctavePath = fso.GetParentFolderName(WScript.ScriptFullName)
8 Set fso = Nothing
9
10 ' set up path to ensure octave bin comes first
11 Set wshSystemEnv = wshShell.Environment( "PROCESS" )
12 wshSystemEnv("PATH") = OctavePath & "\bin;" & wshSystemEnv("PATH")
13
14 ' set terminal type
15 wshSystemEnv("TERM") = "cygwin"
16
17 ' set Qt plugin directory
18 wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins"
19
20 ' set directory to users
21 startpath = wshShell.ExpandEnvironmentStrings("%UserProfile%")
22 wshShell.CurrentDirectory = startpath
23
24 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34), 0
25
26 ' free our objects
27 Set wshShell = Nothing
28 Set wshSystemEnv = Nothing
29 Set wshArgs = Nothing
30