Mercurial > mxe-octave
annotate makeinst-script.sh @ 3406:c0fe8d735baf
installer: backout changeset b5abbada6616 (set SW_SHOWMINIMIZED on GUI shortcuts)
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Wed, 08 Jan 2014 00:35:18 -0500 |
parents | f79780bcc843 |
children | 5e77c5fc91ed |
rev | line source |
---|---|
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
1 #! /bin/bash |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
2 set -e |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
3 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
4 if [ $# != 1 ]; then |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
5 echo "Expected octave folder" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
6 exit |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
7 fi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
8 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
9 ARG1=$1 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
10 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
11 TOPDIR=`dirname $ARG1` |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
12 OCTAVE_SOURCE=`basename $ARG1` |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
13 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
14 echo "Generating installer script ... " |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
15 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
16 cd $TOPDIR |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
17 MXEDIR=`cd ..; pwd` |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
18 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
19 # find octave shortcut icon |
3331
71171ba8bebd
Update installer script for admin level and single icon file
John Donoghue <john.donoghue@ieee.org>
parents:
3010
diff
changeset
|
20 ICON=`find $OCTAVE_SOURCE -name octave-logo.ico -printf "%P" | head -1 | sed 's,/,\\\\,g'` |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
21 |
3366
ab6116aa1039
installer: update mk-dist to use make-installer installer file name and use octave-version
John Donoghue <john.donoghue@ieee.org>
parents:
3364
diff
changeset
|
22 # extract version number |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
23 OCTAVE_VERSION=`head -1 $MXEDIR/octave/octave-version` |
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
24 VERSION=`echo $OCTAVE_VERSION | sed -n 's,\([0-9\.]*\).*,\1,p'` |
3366
ab6116aa1039
installer: update mk-dist to use make-installer installer file name and use octave-version
John Donoghue <john.donoghue@ieee.org>
parents:
3364
diff
changeset
|
25 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
26 # create installer script |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
27 echo "; octave setup script $OCTAVE_SOURCE" > octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
28 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
29 # installer settings |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
30 cat >> octave.nsi << EOF |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
31 !define APP_NAME "GNU Octave" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
32 !define COMP_NAME "GNU Project" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
33 !define WEB_SITE "http://www.octave.org" |
3366
ab6116aa1039
installer: update mk-dist to use make-installer installer file name and use octave-version
John Donoghue <john.donoghue@ieee.org>
parents:
3364
diff
changeset
|
34 !define VERSION "$VERSION.0" |
ab6116aa1039
installer: update mk-dist to use make-installer installer file name and use octave-version
John Donoghue <john.donoghue@ieee.org>
parents:
3364
diff
changeset
|
35 !define OCTAVE_VERSION "$OCTAVE_VERSION" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
36 !define COPYRIGHT "Copyright © 2013 John W. Eaton and others." |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
37 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations." |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
38 !define INSTALLER_FILES "../installer_files" |
3387
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
39 !define INSTALLER_NAME "octave-$OCTAVE_VERSION-installer.exe" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
40 !define MAIN_APP_EXE "octave.exe" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
41 !define INSTALL_TYPE "SetShellVarContext current" |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
42 !define PRODUCT_ROOT_KEY "HKLM" |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
43 !define PRODUCT_KEY "Software\\Octave-$VERSION" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
44 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
45 ###################################################################### |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
46 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
47 VIProductVersion "\${VERSION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
48 VIAddVersionKey "ProductName" "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
49 VIAddVersionKey "CompanyName" "\${COMP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
50 VIAddVersionKey "LegalCopyright" "\${COPYRIGHT}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
51 VIAddVersionKey "FileDescription" "\${DESCRIPTION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
52 VIAddVersionKey "FileVersion" "\${VERSION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
53 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
54 ###################################################################### |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
55 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
56 SetCompressor /SOLID Lzma |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
57 Name "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
58 Caption "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
59 OutFile "\${INSTALLER_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
60 BrandingText "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
61 XPStyle on |
3361
9781db518638
makeinst-script.sh: Remove whitespace from installation path and add version number in default installation directory
Anirudha Bose <ani07nov@gmail.com>
parents:
3360
diff
changeset
|
62 InstallDir "C:\\Octave\\Octave-\${OCTAVE_VERSION}" |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
63 Icon "\${INSTALLER_FILES}/octave-logo.ico" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
64 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
65 ###################################################################### |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
66 ; MUI settings |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
67 !include "MUI.nsh" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
68 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
69 !define MUI_ABORTWARNING |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
70 !define MUI_UNABORTWARNING |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
71 !define MUI_HEADERIMAGE |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
72 |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
73 ; Theme |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
74 !define MUI_ICON "\${INSTALLER_FILES}/octave-logo.ico" |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
75 !define MUI_UNICON "./${OCTAVE_SOURCE}/share/nsis/Contrib/Graphics/Icons/orange-uninstall.ico" |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
76 !define MUI_HEADERIMAGE_BITMAP "\${INSTALLER_FILES}/octave-hdr.bmp" |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
77 !define MUI_WELCOMEFINISHPAGE_BITMAP "\${INSTALLER_FILES}/octave.bmp" |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
78 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
79 !insertmacro MUI_PAGE_WELCOME |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
80 |
3360
cbaab92e1174
makeinst-script.sh: Removed 'I Agree' in GPL license page
Anirudha Bose <ani07nov@gmail.com>
parents:
3359
diff
changeset
|
81 !define MUI_LICENSEPAGE_TEXT_BOTTOM "The source code for Octave is freely redistributable under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation." |
cbaab92e1174
makeinst-script.sh: Removed 'I Agree' in GPL license page
Anirudha Bose <ani07nov@gmail.com>
parents:
3359
diff
changeset
|
82 !define MUI_LICENSEPAGE_BUTTON "Next >" |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
83 !insertmacro MUI_PAGE_LICENSE "\${INSTALLER_FILES}/gpl-3.0.txt" |
3356
2e44e8f86cd6
makeinst-script.sh: add license page with GPLv3
Anirudha Bose <ani07nov@gmail.com>
parents:
3355
diff
changeset
|
84 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
85 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckPrevInstall |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
86 !insertmacro MUI_PAGE_DIRECTORY |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
87 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
88 !insertmacro MUI_PAGE_INSTFILES |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
89 |
3387
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
90 ; set up checkbox to create desktop icon |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
91 Function finishpage_desktopshortcut |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
92 SetOutPath "\$INSTDIR\\bin" |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
93 CreateShortCut "\$desktop\\Octave-$VERSION.lnk" "\$INSTDIR\\bin\\octave.exe" "" "\$INSTDIR\\$ICON" 0 |
3406
c0fe8d735baf
installer: backout changeset b5abbada6616 (set SW_SHOWMINIMIZED on GUI shortcuts)
John Donoghue <john.donoghue@ieee.org>
parents:
3403
diff
changeset
|
94 CreateShortCut "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" "\$INSTDIR\\libexec\\octave\\$OCTAVE_VERSION\\exec\\i686-pc-mingw32\\octave-gui.exe" "" "\$INSTDIR\\$ICON" 0 |
3387
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
95 FunctionEnd |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
96 |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
97 !define MUI_FINISHPAGE_SHOWREADME "" |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
98 !define MUI_FINISHPAGE_SHOWREADME_CHECKED |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
99 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut" |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
100 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpage_desktopshortcut |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
101 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
102 !define MUI_FINISHPAGE_RUN "\$INSTDIR\\bin\\\${MAIN_APP_EXE}" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
103 !insertmacro MUI_PAGE_FINISH |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
104 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
105 !insertmacro MUI_UNPAGE_CONFIRM |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
106 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
107 !insertmacro MUI_UNPAGE_INSTFILES |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
108 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
109 !insertmacro MUI_UNPAGE_FINISH |
3331
71171ba8bebd
Update installer script for admin level and single icon file
John Donoghue <john.donoghue@ieee.org>
parents:
3010
diff
changeset
|
110 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
111 !insertmacro MUI_LANGUAGE "English" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
112 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
113 ###################################################################### |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
114 |
3331
71171ba8bebd
Update installer script for admin level and single icon file
John Donoghue <john.donoghue@ieee.org>
parents:
3010
diff
changeset
|
115 RequestExecutionLevel admin |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
116 |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
117 Function .onInit |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
118 Call DetectWinVer |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
119 Call CheckCurrVersion |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
120 Call CheckJRE |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
121 InitPluginsDir |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
122 FunctionEnd |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
123 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
124 ; file section |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
125 Section "MainFiles" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
126 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
127 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
128 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
129 # insert the files |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
130 IFS=$'\n' |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
131 for f in $(find $OCTAVE_SOURCE -type d -printf "%P\n"); do |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
132 winf=`echo $f | sed 's,/,\\\\,g'` |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
133 echo " CreateDirectory \"\$INSTDIR\\$winf\"" >> octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
134 echo " SetOutPath \"\$INSTDIR\\$winf\"" >> octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
135 find "$OCTAVE_SOURCE/$f" -maxdepth 1 -type f -printf " File \"%p\"\n" >> octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
136 done |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
137 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
138 cat >> octave.nsi << EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
139 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
140 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
141 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
142 Section make_uninstaller |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
143 ; Write the uninstall keys for Windows |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
144 SetOutPath "\$INSTDIR" |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
145 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "DisplayName" "Octave" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
146 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "DisplayVersion" "$VERSION" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
147 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "UninstallString" "\$INSTDIR\\uninstall.exe" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
148 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "NoModify" 1 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
149 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "NoRepair" 1 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
150 WriteUninstaller "uninstall.exe" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
151 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
152 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
153 ; start menu (currently hardcoded) |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
154 Section "Shortcuts" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
155 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
156 CreateDirectory "\$SMPROGRAMS\\Octave-$VERSION" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
157 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0 |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
158 SetOutPath "\$INSTDIR\\bin" |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
159 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave.lnk" "\$INSTDIR\\bin\\octave.exe" "" "\$INSTDIR\\$ICON" 0 |
3406
c0fe8d735baf
installer: backout changeset b5abbada6616 (set SW_SHOWMINIMIZED on GUI shortcuts)
John Donoghue <john.donoghue@ieee.org>
parents:
3403
diff
changeset
|
160 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Experimental GUI).lnk" "\$INSTDIR\\libexec\\octave\\$OCTAVE_VERSION\\exec\\i686-pc-mingw32\\octave-gui.exe" "" "\$INSTDIR\\$ICON" 0 |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
161 SetOutPath "\$INSTDIR" |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
162 EOF |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
163 # if we have documentation files, create shortcuts |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
164 if [ -d $OCTAVE_SOURCE/share/doc/octave ]; then |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
165 cat >> octave.nsi << EOF |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
166 CreateDirectory "\$SMPROGRAMS\\Octave-$VERSION\\Documentation" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
167 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Documentation\\Octave C++ Classes (PDF).lnk" "\$INSTDIR\\share\\doc\\octave\\liboctave.pdf" "" "" 0 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
168 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Documentation\\Octave C++ Classes (HTML).lnk" "\$INSTDIR\\share\\doc\\octave\\liboctave.html\\index.html" "" "" 0 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
169 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Documentation\\Octave (PDF).lnk" "\$INSTDIR\\share\\doc\\octave\\octave.pdf" "" "" 0 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
170 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Documentation\\Octave (HTML).lnk" "\$INSTDIR\\share\\doc\\octave\\octave.html\\index.html" "" "" 0 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
171 EOF |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
172 fi |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
173 |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
174 cat >> octave.nsi << EOF |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
175 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
176 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
177 Section "Uninstall" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
178 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
179 DeleteRegKey HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
180 DeleteRegKey HKLM "Software\\Octave-$VERSION" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
181 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
182 ; Remove shortcuts |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
183 Delete "\$SMPROGRAMS\\Octave-$VERSION\\Documentation\\*.*" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
184 RMDir "\$SMPROGRAMS\\Octave-$VERSION\\Documentation" |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
185 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
186 Delete "\$SMPROGRAMS\\Octave-$VERSION\\*.*" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
187 RMDir "\$SMPROGRAMS\\Octave-$VERSION" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
188 |
3387
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
189 Delete "\$desktop\\Octave-$VERSION.lnk" |
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
190 Delete "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
191 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
192 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
193 # insert dir list (backwards order) for uninstall files |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
194 for f in $(find $OCTAVE_SOURCE -depth -type d -printf "%P\n"); do |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
195 winf=`echo $f | sed 's,/,\\\\,g'` |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
196 echo " Delete \"\$INSTDIR\\$winf\\*.*\"" >> octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
197 echo " RmDir \"\$INSTDIR\\$winf\"" >> octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
198 done |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
199 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
200 # last bit of the uninstaller |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
201 cat >> octave.nsi << EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
202 Delete "\$INSTDIR\*.*" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
203 RmDir "\$INSTDIR" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
204 SectionEnd |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
205 |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
206 ; Function to detect Windows version and abort if Octave is unsupported in the current platform |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
207 Function DetectWinVer |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
208 Push \$0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
209 Push \$1 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
210 ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentVersion |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
211 IfErrors is_error is_winnt |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
212 is_winnt: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
213 StrCpy \$1 \$0 1 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
214 StrCmp \$1 4 is_error ; Aborting installation for Windows versions older than Windows 2000 |
3364
4812bade5c85
makeinst-script.sh: Remove Windows 2000 as supported Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3363
diff
changeset
|
215 StrCmp \$0 "5.0" is_error ; Removing Windows 2000 as supported Windows version |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
216 StrCmp \$0 "5.1" is_winnt_XP |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
217 StrCmp \$0 "5.2" is_winnt_2003 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
218 StrCmp \$0 "6.0" is_winnt_vista |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
219 StrCmp \$0 "6.1" is_winnt_7 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
220 StrCmp \$0 "6.2" is_winnt_8 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
221 StrCmp \$1 6 is_winnt_8 ; Checking for future versions of Windows 8 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
222 Goto is_error |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
223 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
224 is_winnt_8: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
225 MessageBox MB_YESNO|MB_ICONEXCLAMATION "Setup has detected Windows 8 installed on your system. Octave is currently not fully supported on Windows 8. If you choose to continue with the installation, you might not be able to access Octave GUI. Do you want to proceed with the installation anyway?" IDYES done IDNO 0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
226 Abort |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
227 is_winnt_XP: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
228 is_winnt_2003: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
229 is_winnt_vista: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
230 is_winnt_7: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
231 Goto done |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
232 is_error: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
233 StrCpy \$1 \$0 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
234 ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" ProductName |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
235 IfErrors 0 +4 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
236 ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows\\CurrentVersion" Version |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
237 IfErrors 0 +2 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
238 StrCpy \$0 "Unknown" |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
239 MessageBox MB_ICONSTOP|MB_OK "This version of Octave cannot be installed on this system. Octave is supported only on Windows NT systems. Current system: \$0 (version: \$1)" |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
240 Abort |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
241 done: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
242 Pop \$1 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
243 Pop \$0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
244 FunctionEnd |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
245 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
246 ; Function to check whether already installed this version |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
247 Function CheckCurrVersion |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
248 Push \$0 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
249 ClearErrors |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
250 ReadRegStr \$0 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "DisplayName" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
251 IfErrors curr_check_ok |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
252 MessageBox MB_OK|MB_ICONSTOP "Another Octave installation (with the same version) has been detected. Please uninstall it first." |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
253 Abort |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
254 curr_check_ok: |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
255 Pop \$0 |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
256 FunctionEnd |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
257 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
258 ; Check whether prev install is here |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
259 Function CheckPrevInstall |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
260 IfFileExists "\$INSTDIR\\bin\\octave.exe" inst_exists inst_none |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
261 inst_exists: |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
262 MessageBox MB_YESNO|MB_ICONEXCLAMATION "Another Octave installation has been detected at that destination. It is recommended to uninstall it if you intend to use the same installation directory. Do you want to proceed with the installation anyway?" IDYES inst_none IDNO 0 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
263 Abort |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
264 inst_none: |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
265 FunctionEnd |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
266 |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
267 ; Function to check Java Runtime Environment |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
268 Function CheckJRE |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
269 ; looks in: |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
270 ; 1 - JAVA_HOME environment variable |
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
271 ; 2 - the registry |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
272 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
273 Push \$R0 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
274 Push \$R1 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
275 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
276 ; use javaw.exe to avoid dosbox. |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
277 ; use java.exe to keep stdout/stderr |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
278 !define JAVAEXE "javaw.exe" |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
279 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
280 ClearErrors |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
281 ReadEnvStr \$R0 "JAVA_HOME" |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
282 StrCpy \$R0 "\$R0\\bin\\\${JAVAEXE}" |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
283 IfErrors 0 continue ;; 1) found it in JAVA_HOME |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
284 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
285 ClearErrors |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
286 ReadRegStr \$R1 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment" "CurrentVersion" |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
287 ReadRegStr \$R0 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment\\\$R1" "JavaHome" |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
288 StrCpy \$R0 "\$R0\\bin\\\${JAVAEXE}" |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
289 |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
290 IfErrors 0 continue ;; 2) found it in the registry |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
291 IfErrors JRE_Error |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
292 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
293 JRE_Error: |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
294 MessageBox MB_ICONEXCLAMATION|MB_YESNO "Octave includes a Java integration component, but it seems Java is not available on this system. This component requires the Java Runtime Environment from Oracle (http://www.java.com) installed on your system. Octave can work without Java available, but the Java integration component will not be functional. Installing those components without Java available might prevent Octave from working correctly. Proceed with installation anyway?" IDYES continue |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
295 Abort |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
296 continue: |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
297 Pop \$R1 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
298 Pop \$R0 |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
299 FunctionEnd |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
300 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
301 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
302 echo "Generation Completed" |