view installer-files/octave-firsttime.vbs @ 4222:44b1a9b2193e

qt5: add initial qt5 to mxe-octave, based on mxe.cc * src/qt5.mk: new file * src/qtbase-1-fixes.patch: new file * src/qtbase.mk: new file * src/qtimageformats-1.patch: new file * src/qtimageformats.mk: new file * src/qtsvg.mk: new file * src/qttools-1.patch: new file * added src/qttools.mk: new file * changed Makefile.in: added ENABLE_QT5 option * configure.ac: added enable-qt5 option * index.html: added new files to packages * installer-files/octave-firsttime.vbs: added setup of qt5 bin, plugin path * installer-files/octave.vbs: added setup of qt5 bin, plugin path * installer-files/octave.bat: added setup of qt5 bin path * src/default-octave.mk: added settig fot qt5 usage * src/qscintilla.mk: added qt5 path
author John D
date Thu, 29 Sep 2016 11:22:51 -0400
parents cc549d1865cb
children a45374f7d9a3
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 and path 
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(OctavePath & "\qt5\bin") Then
  wshSystemEnv("PATH") = OctavePath & "\qt5\bin;" & wshSystemEnv("PATH")
  wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\qt5\plugins"
Else
  wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins"
End If

' 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