Mercurial > mxe-octave
annotate installer-files/octave-firsttime.vbs @ 5504:9f9ed6a325bd
Build SUNDIALS IDA for Linux with KLU (bug #58795).
* src/suitesparse.mk: Create symlinks to libraries without version suffix.
* src/sundials-ida.mk: Unify build rules for all other platforms.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 31 Jul 2020 14:59:35 +0200 |
parents | dace3d372190 |
children | cf7adc238c0c |
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) |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
8 |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
9 ' ctavePath is now the root of the install folder, but for msys2, |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
10 ' OctavePath should be OctavePath/mingw64 or OctavePath/ming32 |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
11 MSysType = "MSYS" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
12 MSysPath = OctavePath |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
13 Set objFSO = CreateObject("Scripting.FileSystemObject") |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
14 If objFSO.FileExists(OctavePath & "\mingw64\bin\octave-cli.exe") Then |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
15 MSysPath = OctavePath & "\usr" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
16 MSysType = "MINGW64" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
17 OctavePath = OctavePath & "\mingw64" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
18 ElseIf objFSO.FileExists(OctavePath & "\mingw32\bin\octave-cli.exe") Then |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
19 MSysPath = OctavePath & "\usr" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
20 MSysType = "MINGW32" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
21 OctavePath = OctavePath & "\mingw32" |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
22 End If |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
23 |
4258 | 24 ' get path as a 8.3 path |
25 Set fo = fso.GetFolder(OctavePath) | |
26 OctavePath = fo.ShortPath | |
27 Set fo = Nothing | |
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 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
|
30 Set wshSystemEnv = wshShell.Environment( "PROCESS" ) |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
31 if OctavePath <> MSysPath Then |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
32 wshSystemEnv("PATH") = MSysPath & "\bin;" & wshSystemEnv("PATH") |
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
33 End If |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
34 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
|
35 |
4793
202fa20cf559
add msys2 environment/tools option, use seprate post-install script to finalize install
John Donoghue
parents:
4644
diff
changeset
|
36 wshSystemEnv("MSYSTEM") = MSysType |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
37 ' set terminal type |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
38 wshSystemEnv("TERM") = "cygwin" |
4472
0fdeee4cfe11
gnuplot: enable Qt terminal and set default to wxt
Mike Miller <mtmiller@octave.org>
parents:
4276
diff
changeset
|
39 wshSystemEnv("GNUTERM") = "wxt" |
4183 | 40 |
41 wshSystemEnv("GS") = "gs.exe" | |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
42 |
4276 | 43 If wshShell.ExpandEnvironmentStrings("%HOME%") = "%HOME%" Then |
44 Home = wshSystemEnv("USERPROFILE") | |
45 Set fo = fso.GetFolder(Home) | |
46 wshSystemEnv("HOME") = fo.ShortPath | |
47 Set fo = Nothing | |
48 End If | |
49 | |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
50 ' set Qt plugin directory and path |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
51 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
|
52 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
|
53 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
|
54 Else |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
55 wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins" |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4183
diff
changeset
|
56 End If |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
57 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
58 ' set directory to users |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
59 startpath = wshShell.ExpandEnvironmentStrings("%UserProfile%") |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
60 wshShell.CurrentDirectory = startpath |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
61 |
4644
c3950e2b4066
Fix vbs scripts to launch with '--gui' option (bug #53369).
Rik <rik@octave.org>
parents:
4643
diff
changeset
|
62 GUIArg = " " & chr(34) & "--gui" & chr(34) |
c3950e2b4066
Fix vbs scripts to launch with '--gui' option (bug #53369).
Rik <rik@octave.org>
parents:
4643
diff
changeset
|
63 wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & GUIArg, 0 |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
64 |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
65 ' free our objects |
4276 | 66 Set fso = Nothing |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
67 Set wshShell = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
68 Set wshSystemEnv = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
69 Set wshArgs = Nothing |
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
diff
changeset
|
70 |