Mercurial > mxe-octave
annotate makeinst-script.sh @ 3515:a551b373abc4
build-python: no depeancy on build-gcc if using system gcc.
* src/build-python.mk: only add build-gcc as a dependancy if not using system gcc.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Wed, 12 Feb 2014 18:23:02 -0500 |
parents | 6a97f4d1dedb |
children | c21ca79d7980 |
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 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
4 if [ $# != 2 ]; then |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
5 echo "usage: makeinst-script.sh dist-dir output-script-name" 1>&2 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
6 exit 1 |
2992
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 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
9 OUTFILE="$2" |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
10 TOPDIR=`dirname $1` |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
11 OCTAVE_SOURCE=`basename $1` |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
12 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
13 echo "Generating installer script ... " |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
14 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
15 cd $TOPDIR |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
16 MXEDIR=`cd ..; pwd` |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
17 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
18 # 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
|
19 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
|
20 |
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
|
21 # extract version number |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
22 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
|
23 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
|
24 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
25 # create installer script |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
26 echo "; octave setup script $OCTAVE_SOURCE" > $OUTFILE |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
27 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
28 # installer settings |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
29 cat >> $OUTFILE << EOF |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
30 !define APP_NAME "GNU Octave" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
31 !define COMP_NAME "GNU Project" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
32 !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
|
33 !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
|
34 !define OCTAVE_VERSION "$OCTAVE_VERSION" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
35 !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
|
36 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations." |
3430
2183ac663bcb
* installer-files: Rename from installer_files.
John W. Eaton <jwe@octave.org>
parents:
3423
diff
changeset
|
37 !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
|
38 !define INSTALLER_NAME "octave-$OCTAVE_VERSION-installer.exe" |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
39 !define MAIN_APP_EXE "octave-gui.exe" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
40 !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
|
41 !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
|
42 !define PRODUCT_KEY "Software\\Octave-$VERSION" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
43 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
44 ###################################################################### |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
45 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
46 VIProductVersion "\${VERSION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
47 VIAddVersionKey "ProductName" "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
48 VIAddVersionKey "CompanyName" "\${COMP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
49 VIAddVersionKey "LegalCopyright" "\${COPYRIGHT}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
50 VIAddVersionKey "FileDescription" "\${DESCRIPTION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
51 VIAddVersionKey "FileVersion" "\${VERSION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
52 |
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 SetCompressor /SOLID Lzma |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
56 Name "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
57 Caption "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
58 OutFile "\${INSTALLER_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
59 BrandingText "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
60 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
|
61 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
|
62 Icon "\${INSTALLER_FILES}/octave-logo.ico" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
63 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
64 ###################################################################### |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
65 ; StrFunc usage |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
66 !include "StrFunc.nsh" |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
67 \${StrRep} |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
68 ###################################################################### |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
69 ; MUI settings |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
70 !include "MUI.nsh" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
71 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
72 ; custom dialogs |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
73 !include nsDialogs.nsh |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
74 !macro __DropList_GetCurSel CONTROL VAR |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
75 SendMessage \${CONTROL} \${CB_GETCURSEL} 0 0 \${VAR} |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
76 !macroend |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
77 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
78 !define DropList_GetCurSel \`!insertmacro __DropList_GetCurSel\` |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
79 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
80 ; additional logic |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
81 !include LogicLib.nsh |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
82 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
83 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
84 !define MUI_ABORTWARNING |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
85 !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
|
86 !define MUI_HEADERIMAGE |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
87 |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
88 ; Theme |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
89 !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
|
90 !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
|
91 !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
|
92 !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
|
93 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
94 !insertmacro MUI_PAGE_WELCOME |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
95 |
3360
cbaab92e1174
makeinst-script.sh: Removed 'I Agree' in GPL license page
Anirudha Bose <ani07nov@gmail.com>
parents:
3359
diff
changeset
|
96 !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
|
97 !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
|
98 !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
|
99 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
100 Page custom octaveOptionsPage octaveOptionsLeave |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
101 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
102 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckPrevInstall |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
103 !insertmacro MUI_PAGE_DIRECTORY |
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_PAGE_INSTFILES |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
106 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
107 !define MUI_FINISHPAGE_RUN "\$INSTDIR\\bin\\\${MAIN_APP_EXE}" |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
108 !define MUI_FINISHPAGE_SHOWREADME "\$INSTDIR\\README.html" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
109 !insertmacro MUI_PAGE_FINISH |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
110 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
111 !insertmacro MUI_UNPAGE_CONFIRM |
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 !insertmacro MUI_UNPAGE_INSTFILES |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
114 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
115 !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
|
116 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
117 !insertmacro MUI_LANGUAGE "English" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
118 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
119 ###################################################################### |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
120 |
3331
71171ba8bebd
Update installer script for admin level and single icon file
John Donoghue <john.donoghue@ieee.org>
parents:
3010
diff
changeset
|
121 RequestExecutionLevel admin |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
122 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
123 ###################################################################### |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
124 ; custom options page functions |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
125 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
126 Var InstallAllUsers |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
127 Var InstallAllUsersCtrl |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
128 Var InstallShortcuts |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
129 Var InstallShortcutsCtrl |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
130 Var RegisterOctaveFileType |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
131 Var RegisterOctaveFileTypeCtrl |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
132 Var InstallBlasLibCtrl |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
133 Var InstallBlasLib |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
134 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
135 Function octaveOptionsPage |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
136 Push \$0 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
137 nsDialogs::Create 1018 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
138 Pop \$0 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
139 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
140 \${If} \$0 == error |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
141 Abort |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
142 \${EndIf} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
143 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
144 \${NSD_CreateCheckBox} 0 0 100% 12u "Install for all users" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
145 Pop \$InstallAllUsersCtrl |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
146 \${NSD_SetState} \$InstallAllUsersCtrl \${BST_CHECKED} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
147 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
148 \${NSD_CreateCheckBox} 0 20 100% 12u "Create desktop shortcuts" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
149 Pop \$InstallShortcutsCtrl |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
150 \${NSD_SetState} \$InstallShortcutsCtrl \${BST_CHECKED} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
151 |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
152 \${NSD_CreateCheckBox} 0 40 100% 12u "Register .m file type with Octave" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
153 Pop \$RegisterOctaveFileTypeCtrl |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
154 \${NSD_SetState} \$RegisterOctaveFileTypeCtrl \${BST_CHECKED} |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
155 |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
156 \${NSD_CreateLabel} 0 70 110u 12u "BLAS library implementation:" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
157 Pop \$0 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
158 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
159 \${NSD_CreateDropList} 120u 70 100u 80u "" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
160 Pop \$InstallBlasLibCtrl |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
161 \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
162 \${NSD_CB_AddString} \$InstallBlasLibCtrl "OpenBLAS" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
163 \${NSD_CB_SelectString} \$InstallBlasLibCtrl "Reference BLAS" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
164 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
165 !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
166 nsDialogs::Show |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
167 Pop \$0 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
168 FunctionEnd |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
169 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
170 Function octaveOptionsLeave |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
171 \${NSD_GetState} \$InstallAllUsersCtrl \$InstallAllUsers |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
172 \${NSD_GetState} \$InstallShortcutsCtrl \$InstallShortcuts |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
173 \${NSD_GetState} \$RegisterOctaveFileTypeCtrl \$RegisterOctaveFileType |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
174 \${DropList_GetCurSel} \$InstallBlasLibCtrl \$InstallBlasLib |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
175 FunctionEnd |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
176 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
177 ###################################################################### |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
178 |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
179 Function .onInit |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
180 Call DetectWinVer |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
181 Call CheckCurrVersion |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
182 Call CheckJRE |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
183 InitPluginsDir |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
184 FunctionEnd |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
185 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
186 ; file section |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
187 Section "MainFiles" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
188 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
189 ; set context based on whether installing for user or all |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
190 \${If} \$InstallAllUsers == \${BST_CHECKED} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
191 SetShellVarContext all |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
192 \${Else} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
193 SetShellVarContext current |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
194 \${Endif} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
195 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
196 ; include the README |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
197 SetOutPath "\$INSTDIR" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
198 File "$OCTAVE_SOURCE/README.html" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
199 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
200 ; distro files |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
201 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
202 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
203 # insert the files |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
204 IFS=$'\n' |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
205 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
|
206 winf=`echo $f | sed 's,/,\\\\,g'` |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
207 echo " CreateDirectory \"\$INSTDIR\\$winf\"" >> $OUTFILE |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
208 echo " SetOutPath \"\$INSTDIR\\$winf\"" >> $OUTFILE |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
209 find "$OCTAVE_SOURCE/$f" -maxdepth 1 -type f -printf " File \"%p\"\n" >> $OUTFILE |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
210 done |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
211 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
212 cat >> $OUTFILE << EOF |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
213 |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
214 ; add qt.conf |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
215 Push \$0 |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
216 \${StrRep} '\$0' '\$INSTDIR' '\\' '/' |
3423
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
217 WriteINIStr "\$INSTDIR\\bin\\qt.conf" "Paths" "Prefix" "\$0" |
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
218 WriteINIStr "\$INSTDIR\\bin\\qt.conf" "Paths" "Translations" "translations" |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
219 Pop \$0 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
220 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
221 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
222 Section make_uninstaller |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
223 ; Write the uninstall keys for Windows |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
224 SetOutPath "\$INSTDIR" |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
225 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
|
226 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
|
227 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
|
228 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
|
229 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "NoRepair" 1 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
230 \${If} \$InstallAllUsers == \${BST_CHECKED} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
231 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "AllUsers" 1 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
232 \${EndIf} |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
233 WriteUninstaller "uninstall.exe" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
234 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
235 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
236 ; start menu (currently hardcoded) |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
237 Section "Shortcuts" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
238 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
239 CreateDirectory "\$SMPROGRAMS\\Octave-$VERSION" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
240 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0 |
3423
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
241 SetOutPath "%USERPROFILE%" |
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
242 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Command Line).lnk" "\$INSTDIR\\bin\\octave-cli.exe" "" "\$INSTDIR\\$ICON" 0 |
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
243 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Experimental GUI).lnk" "\$INSTDIR\\bin\\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
|
244 SetOutPath "\$INSTDIR" |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
245 EOF |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
246 # 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
|
247 if [ -d $OCTAVE_SOURCE/share/doc/octave ]; then |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
248 cat >> $OUTFILE << EOF |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
249 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
|
250 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
|
251 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
|
252 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
|
253 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
|
254 EOF |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
255 fi |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
256 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
257 cat >> $OUTFILE << EOF |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
258 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
259 \${If} \$InstallShortcuts == \${BST_CHECKED} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
260 SetOutPath "%USERPROFILE%" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
261 CreateShortCut "\$desktop\\Octave-$VERSION (Command Line).lnk" "\$INSTDIR\\bin\\octave-cli.exe" "" "\$INSTDIR\\$ICON" 0 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
262 CreateShortCut "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" "\$INSTDIR\\bin\\octave-gui.exe" "" "\$INSTDIR\\$ICON" 0 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
263 \${Endif} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
264 |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
265 ; BLAS set up |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
266 \${If} \$InstallBlasLib == 1 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
267 ; OpenBLAS |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
268 CopyFiles /SILENT "\$INSTDIR\\bin\\libopenblas.dll" "\$INSTDIR\\bin\\libblas.dll" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
269 \${Else} |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
270 ; Reference BLAS |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
271 CopyFiles /SILENT "\$INSTDIR\\bin\\librefblas.dll" "\$INSTDIR\\bin\\libblas.dll" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
272 \${EndIf} |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
273 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
274 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
275 |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
276 Section "FileTypeRego" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
277 ; Octave document |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
278 WriteRegStr HKCR "Octave.Document.$VERSION" "" "GNU Octave Script" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
279 WriteRegStr HKCR "Octave.Document.$VERSION\\DefaultIcon" "" "\$INSTDIR\\$ICON" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
280 ; document actions |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
281 WriteRegStr HKCR "Octave.Document.$VERSION\\shell\\open\\command" "" '"\$INSTDIR\\bin\\octave-gui.exe" --force-gui --persist --eval "edit %1"' |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
282 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
283 \${If} \$RegisterOctaveFileType == \${BST_CHECKED} |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
284 ReadRegStr \$0 HKCR ".m" "" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
285 StrCmp "\$0" "" no_back_type |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
286 WriteRegStr HKCR ".m" "backup_val" "\$0" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
287 no_back_type: |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
288 WriteRegStr HKCR ".m" "" "Octave.Document.$VERSION" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
289 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "RegisteredFileType" 1 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
290 \${EndIf} |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
291 SectionEnd |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
292 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
293 Section "Uninstall" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
294 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
295 ReadRegDWORD \$0 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "AllUsers" |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
296 IfErrors not_all_users |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
297 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
298 SetShellVarContext all |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
299 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
300 not_all_users: |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
301 ReadRegDWORD \$0 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "RegisteredFileType" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
302 IfErrors not_registered_file |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
303 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
304 ReadRegStr \$0 HKCR ".m" "backup_val" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
305 IfErrors not_backup_file |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
306 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
307 # retore backup |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
308 WriteRegStr HKCR ".m" "" "\$0" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
309 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
310 DeleteRegValue HKCR ".m" "backup_val" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
311 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
312 ; dont delete .m if just restored backup |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
313 Goto not_registered_file |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
314 not_backup_file: |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
315 DeleteRegKey HKCR ".m" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
316 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
317 not_registered_file: |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
318 ; delete file type |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
319 DeleteRegKey HKCR "Octave.Document.$VERSION" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
320 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
321 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
|
322 DeleteRegKey HKLM "Software\\Octave-$VERSION" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
323 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
324 ; Remove shortcuts |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
325 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
|
326 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
|
327 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
328 Delete "\$SMPROGRAMS\\Octave-$VERSION\\*.*" |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
329 RMDir "\$SMPROGRAMS\\Octave-$VERSION" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
330 |
3422
2a0e9378056c
installer: make gui and command line shortcut naming obvious
John Donoghue <john.donoghue@ieee.org>
parents:
3409
diff
changeset
|
331 Delete "\$desktop\\Octave-$VERSION (Command Line).lnk" |
3387
0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
John Donoghue <john.donoghue@ieee.org>
parents:
3384
diff
changeset
|
332 Delete "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
333 |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
334 ; delete generated qt.conf file |
3423
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
335 Delete "\$INSTDIR\\bin\\qt.conf" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
336 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
337 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
338 # 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
|
339 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
|
340 winf=`echo $f | sed 's,/,\\\\,g'` |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
341 echo " Delete \"\$INSTDIR\\$winf\\*.*\"" >> $OUTFILE |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
342 echo " RmDir \"\$INSTDIR\\$winf\"" >> $OUTFILE |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
343 done |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
344 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
345 # last bit of the uninstaller |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
346 cat >> $OUTFILE << EOF |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
347 Delete "\$INSTDIR\\*.*" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
348 RmDir "\$INSTDIR" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
349 SectionEnd |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
350 |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
351 ; 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
|
352 Function DetectWinVer |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
353 Push \$0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
354 Push \$1 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
355 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
|
356 IfErrors is_error is_winnt |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
357 is_winnt: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
358 StrCpy \$1 \$0 1 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
359 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
|
360 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
|
361 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
|
362 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
|
363 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
|
364 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
|
365 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
|
366 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
|
367 Goto is_error |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
368 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
369 is_winnt_8: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
370 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
|
371 Abort |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
372 is_winnt_XP: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
373 is_winnt_2003: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
374 is_winnt_vista: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
375 is_winnt_7: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
376 Goto done |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
377 is_error: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
378 StrCpy \$1 \$0 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
379 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
|
380 IfErrors 0 +4 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
381 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
|
382 IfErrors 0 +2 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
383 StrCpy \$0 "Unknown" |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
384 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
|
385 Abort |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
386 done: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
387 Pop \$1 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
388 Pop \$0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
389 FunctionEnd |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
390 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
391 ; 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
|
392 Function CheckCurrVersion |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
393 Push \$0 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
394 ClearErrors |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
395 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
|
396 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
|
397 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
|
398 Abort |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
399 curr_check_ok: |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
400 Pop \$0 |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
401 FunctionEnd |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
402 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
403 ; 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
|
404 Function CheckPrevInstall |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
405 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
|
406 inst_exists: |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
407 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
|
408 Abort |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
409 inst_none: |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
410 FunctionEnd |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
411 |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
412 ; 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
|
413 Function CheckJRE |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
414 ; looks in: |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
415 ; 1 - JAVA_HOME environment variable |
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
416 ; 2 - the registry |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
417 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
418 Push \$R0 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
419 Push \$R1 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
420 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
421 ; 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
|
422 ; 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
|
423 !define JAVAEXE "javaw.exe" |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
424 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
425 ClearErrors |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
426 ReadEnvStr \$R0 "JAVA_HOME" |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
427 StrCpy \$R0 "\$R0\\bin\\\${JAVAEXE}" |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
428 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
|
429 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
430 ClearErrors |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
431 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
|
432 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
|
433 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
|
434 |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
435 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
|
436 IfErrors JRE_Error |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
437 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
438 JRE_Error: |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
439 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
|
440 Abort |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
441 continue: |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
442 Pop \$R1 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
443 Pop \$R0 |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
444 FunctionEnd |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
445 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
446 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
447 echo "Generation Completed" |