view installer-files/octave-firsttime.vbs @ 4215:136474a59a67

octave: remove old patches * src/octave-1-docinstall.patch: removed patch * src/octave-1-fixes.patch: removed patch * dist-files.mk: removed old patch refs, add octave-1-gnulib.patch * src/octave-1-gnulib.patch: add new patch * src/mingw-octave-1-msys-fixes.patch: removed
author John D
date Mon, 12 Sep 2016 07:53:03 -0400
parents cc549d1865cb
children 44b1a9b2193e
line wrap: on
line source

' script to run octave in gui/command mode

Set wshShell = CreateObject( "WScript.Shell" )

' get the directory that script resides in
Set fso = CreateObject("Scripting.FileSystemObject")
OctavePath = fso.GetParentFolderName(WScript.ScriptFullName)
Set fso = Nothing

' set up path to ensure octave bin comes first
Set wshSystemEnv = wshShell.Environment( "PROCESS" )
wshSystemEnv("PATH") = OctavePath & "\bin;" & wshSystemEnv("PATH")

' set terminal type
wshSystemEnv("TERM") = "cygwin"
wshSystemEnv("GNUTERM") = "windows"

wshSystemEnv("GS") = "gs.exe"

' set Qt plugin directory
wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins"

' set directory to users
startpath = wshShell.ExpandEnvironmentStrings("%UserProfile%")
wshShell.CurrentDirectory = startpath

wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34), 0

' free our objects
Set wshShell = Nothing
Set wshSystemEnv = Nothing
Set wshArgs = Nothing