Mercurial > mxe-octave
annotate tools/makeinst-script.sh.in @ 4759:e76d54c038ef
Don't run JRE check during install if Octave was built with --disable-java (bug #54427).
* tools/makeinst-script.sh.in: Check configure variable ENABLE_JAVA before
having installer check for JRE.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 05 Jul 2018 08:57:16 -0700 |
parents | e839056b9a65 |
children | a800e350d88b |
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 |
4658 | 4 if [ $# != 3 ]; then |
5 echo "usage: makeinst-script.sh dist-dir installer-name output-script-name" 1>&2 | |
3431
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 |
4658 | 9 INSTALLER_NAME="$2" |
10 OUTFILE="$3" | |
4124
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
11 TOPDIR=@abs_top_srcdir@ |
4173
1d86cb0348ff
nsis: install all files to BUILD_PREFIX (Bug #48530)
John Donoghue <john.donoghue@ieee.org>
parents:
4158
diff
changeset
|
12 TOP_BUILD_DIR=@abs_top_builddir@ |
1d86cb0348ff
nsis: install all files to BUILD_PREFIX (Bug #48530)
John Donoghue <john.donoghue@ieee.org>
parents:
4158
diff
changeset
|
13 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
14 OCTAVE_SOURCE=`basename $1` |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
15 |
4066 | 16 cd `dirname $1` |
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 |
3570
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
19 if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
20 DEFAULT_BLAS="OpenBLAS" |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
21 else |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
22 DEFAULT_BLAS="Reference BLAS" |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
23 fi |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
24 |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
25 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
26 # find octave shortcut icon |
3760
1f870f80ed71
makeinst-script: add \n to found icon file list (Bug #43909)
John Donoghue <john.donoghue@ieee.org>
parents:
3757
diff
changeset
|
27 ICON=`find $OCTAVE_SOURCE -name octave-logo.ico -printf "%P\n" | head -1 | sed 's,/,\\\\,g'` |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
28 |
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
|
29 # extract version number |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
30 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
|
31 VERSION=`echo $OCTAVE_VERSION | sed -n 's,\([0-9\.]*\).*,\1,p'` |
4752
e839056b9a65
Allow building of unreleased stable branch (4.4.0x) (bug #54176).
Rik <rik@octave.org>
parents:
4725
diff
changeset
|
32 if [ `echo $VERSION | grep -o '\.' | wc -l` -le 2 ]; then |
e839056b9a65
Allow building of unreleased stable branch (4.4.0x) (bug #54176).
Rik <rik@octave.org>
parents:
4725
diff
changeset
|
33 INSTALLER_VERSION="$VERSION.0" |
e839056b9a65
Allow building of unreleased stable branch (4.4.0x) (bug #54176).
Rik <rik@octave.org>
parents:
4725
diff
changeset
|
34 else |
e839056b9a65
Allow building of unreleased stable branch (4.4.0x) (bug #54176).
Rik <rik@octave.org>
parents:
4725
diff
changeset
|
35 INSTALLER_VERSION=$VERSION |
e839056b9a65
Allow building of unreleased stable branch (4.4.0x) (bug #54176).
Rik <rik@octave.org>
parents:
4725
diff
changeset
|
36 fi |
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
|
37 |
3818
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
38 # estimated size of installed files |
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
39 SIZE=`du -slk $OCTAVE_SOURCE | awk '{print \$1}'` |
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
40 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
41 # create installer script |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
42 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
|
43 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
44 # installer settings |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
45 cat >> $OUTFILE << EOF |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
46 !define APP_NAME "GNU Octave" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
47 !define COMP_NAME "GNU Project" |
4650
1d9448607538
Use https in links whenever possible (Bug #53555).
Rik <rik@octave.org>
parents:
4648
diff
changeset
|
48 !define WEB_SITE "https://www.octave.org" |
4752
e839056b9a65
Allow building of unreleased stable branch (4.4.0x) (bug #54176).
Rik <rik@octave.org>
parents:
4725
diff
changeset
|
49 !define VERSION "$INSTALLER_VERSION" |
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
|
50 !define OCTAVE_VERSION "$OCTAVE_VERSION" |
4652 | 51 !define COPYRIGHT "Copyright © 2013-2018 John W. Eaton and others." |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
52 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations." |
4066 | 53 !define INSTALLER_FILES "$TOPDIR/installer-files" |
4658 | 54 !define INSTALLER_NAME "$INSTALLER_NAME" |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
3963
diff
changeset
|
55 !define MAIN_APP_EXE "octave-firsttime.vbs" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
56 !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
|
57 !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
|
58 !define PRODUCT_KEY "Software\\Octave-$VERSION" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
59 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
60 ###################################################################### |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
61 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
62 VIProductVersion "\${VERSION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
63 VIAddVersionKey "ProductName" "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
64 VIAddVersionKey "CompanyName" "\${COMP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
65 VIAddVersionKey "LegalCopyright" "\${COPYRIGHT}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
66 VIAddVersionKey "FileDescription" "\${DESCRIPTION}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
67 VIAddVersionKey "FileVersion" "\${VERSION}" |
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 ###################################################################### |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
70 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
71 SetCompressor /SOLID Lzma |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
72 Name "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
73 Caption "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
74 OutFile "\${INSTALLER_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
75 BrandingText "\${APP_NAME}" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
76 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
|
77 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
|
78 Icon "\${INSTALLER_FILES}/octave-logo.ico" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
79 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
80 ###################################################################### |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
81 ; StrFunc usage |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
82 !include "StrFunc.nsh" |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
83 \${StrRep} |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
84 ###################################################################### |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
85 ; MUI settings |
4608 | 86 !include "MUI2.nsh" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
87 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
88 ; 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
|
89 !include nsDialogs.nsh |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
90 !macro __DropList_GetCurSel CONTROL VAR |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
91 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
|
92 !macroend |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
93 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
94 !define DropList_GetCurSel \`!insertmacro __DropList_GetCurSel\` |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
95 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
96 ; 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
|
97 !include LogicLib.nsh |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
98 ; File funcs |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
99 !include FileFunc.nsh |
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 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
101 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
102 !define MUI_ABORTWARNING |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
103 !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
|
104 !define MUI_HEADERIMAGE |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
105 |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
106 ; Theme |
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
107 !define MUI_ICON "\${INSTALLER_FILES}/octave-logo.ico" |
4173
1d86cb0348ff
nsis: install all files to BUILD_PREFIX (Bug #48530)
John Donoghue <john.donoghue@ieee.org>
parents:
4158
diff
changeset
|
108 !define MUI_UNICON "$TOP_BUILD_DIR/usr/share/nsis/Contrib/Graphics/Icons/orange-uninstall.ico" |
3363
b89f15801606
Added Octave images in welcome page, headers, and finish page of installer.
Anirudha Bose <ani07nov@gmail.com>
parents:
3362
diff
changeset
|
109 !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
|
110 !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
|
111 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
112 !insertmacro MUI_PAGE_WELCOME |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
113 |
3360
cbaab92e1174
makeinst-script.sh: Removed 'I Agree' in GPL license page
Anirudha Bose <ani07nov@gmail.com>
parents:
3359
diff
changeset
|
114 !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
|
115 !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
|
116 !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
|
117 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
118 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
|
119 |
3728
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
120 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckPrevInstallAndDest |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
121 !insertmacro MUI_PAGE_DIRECTORY |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
122 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
123 !insertmacro MUI_PAGE_INSTFILES |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
124 |
3757
7a6637aa3aae
installer: ran octave through explorer when running at end of install (Bug 43824)
John Donoghue
parents:
3728
diff
changeset
|
125 !define MUI_FINISHPAGE_RUN "\$WINDIR\\explorer.exe" |
7a6637aa3aae
installer: ran octave through explorer when running at end of install (Bug 43824)
John Donoghue
parents:
3728
diff
changeset
|
126 !define MUI_FINISHPAGE_RUN_PARAMETERS "\$INSTDIR\\\${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
|
127 !define MUI_FINISHPAGE_SHOWREADME "\$INSTDIR\\README.html" |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
128 !insertmacro MUI_PAGE_FINISH |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
129 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
130 !insertmacro MUI_UNPAGE_CONFIRM |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
131 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
132 !insertmacro MUI_UNPAGE_INSTFILES |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
133 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
134 !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
|
135 |
3355
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
136 !insertmacro MUI_LANGUAGE "English" |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
137 |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
138 ###################################################################### |
bc7e18e12dcc
makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents:
3350
diff
changeset
|
139 |
3331
71171ba8bebd
Update installer script for admin level and single icon file
John Donoghue <john.donoghue@ieee.org>
parents:
3010
diff
changeset
|
140 RequestExecutionLevel admin |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
141 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
142 ###################################################################### |
3552
b82ff8ba6a8a
nsis-installer: check for win8 version and set -i --line-editing in shortcuts
John Donoghue <john.donoghue@ieee.org>
parents:
3545
diff
changeset
|
143 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
144 ; 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
|
145 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
146 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
|
147 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
|
148 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
|
149 Var InstallShortcutsCtrl |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
150 Var RegisterOctaveFileType |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
151 Var RegisterOctaveFileTypeCtrl |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
152 Var InstallBlasLibCtrl |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
153 Var InstallBlasLib |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
154 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
155 Function octaveOptionsPage |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
156 Push \$0 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
157 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
|
158 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
|
159 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
160 \${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
|
161 Abort |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
162 \${EndIf} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
163 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
164 \${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
|
165 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
|
166 \${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
|
167 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
168 \${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
|
169 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
|
170 \${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
|
171 |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
172 \${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
|
173 Pop \$RegisterOctaveFileTypeCtrl |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
174 \${NSD_SetState} \$RegisterOctaveFileTypeCtrl \${BST_CHECKED} |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
175 |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
176 \${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
|
177 Pop \$0 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
178 |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
179 \${NSD_CreateDropList} 120u 70 100u 80u "" |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
180 Pop \$InstallBlasLibCtrl |
3545
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
181 EOF |
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
182 # add option to install libopenblas if we have the dll present |
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
183 if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then |
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
184 cat >> $OUTFILE << EOF |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
185 \${NSD_CB_AddString} \$InstallBlasLibCtrl "OpenBLAS" |
3545
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
186 EOF |
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
187 fi |
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3471
diff
changeset
|
188 cat >> $OUTFILE << EOF |
3570
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
189 \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS" |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
190 EOF |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
191 |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
192 cat >> $OUTFILE << EOF |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
193 \${NSD_CB_SelectString} \$InstallBlasLibCtrl "$DEFAULT_BLAS" |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
194 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
195 !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
|
196 nsDialogs::Show |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
197 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
|
198 FunctionEnd |
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 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
|
201 \${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
|
202 \${NSD_GetState} \$InstallShortcutsCtrl \$InstallShortcuts |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
203 \${NSD_GetState} \$RegisterOctaveFileTypeCtrl \$RegisterOctaveFileType |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
204 \${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
|
205 FunctionEnd |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
206 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
207 ###################################################################### |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
208 |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
209 Function .onInit |
4120
f2d7bb7777da
installer: dont warn on experimental for win10 (Bug #47576)
John Donoghue
parents:
4075
diff
changeset
|
210 Call CheckWinVer |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
211 Call CheckCurrVersion |
4759
e76d54c038ef
Don't run JRE check during install if Octave was built with --disable-java (bug #54427).
Rik <rik@octave.org>
parents:
4752
diff
changeset
|
212 \${If} @ENABLE_JAVA@ == yes |
e76d54c038ef
Don't run JRE check during install if Octave was built with --disable-java (bug #54427).
Rik <rik@octave.org>
parents:
4752
diff
changeset
|
213 Call CheckJRE |
e76d54c038ef
Don't run JRE check during install if Octave was built with --disable-java (bug #54427).
Rik <rik@octave.org>
parents:
4752
diff
changeset
|
214 \${EndIf} |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
215 InitPluginsDir |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
216 FunctionEnd |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
217 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
218 ; file section |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
219 Section "MainFiles" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
220 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
221 ; 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
|
222 \${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
|
223 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
|
224 \${Else} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
225 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
|
226 \${Endif} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
227 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
228 ; 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
|
229 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
|
230 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
|
231 |
3717
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3686
diff
changeset
|
232 ; include the octave.bat file |
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3686
diff
changeset
|
233 SetOutPath "\$INSTDIR" |
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3686
diff
changeset
|
234 File "$OCTAVE_SOURCE/octave.bat" |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
3784
diff
changeset
|
235 File "$OCTAVE_SOURCE/octave.vbs" |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
3963
diff
changeset
|
236 File "$OCTAVE_SOURCE/octave-firsttime.vbs" |
3717
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3686
diff
changeset
|
237 |
4254
7f2d5c8c4491
installer: update fc cache during install (Bug #45458)
John D
parents:
4186
diff
changeset
|
238 File "$OCTAVE_SOURCE/fc_update.bat" |
7f2d5c8c4491
installer: update fc cache during install (Bug #45458)
John D
parents:
4186
diff
changeset
|
239 |
4602
a487b12dc08f
* tools/makeinst-script.sh.in: include HG-ID in installed files
John Donoghue
parents:
4471
diff
changeset
|
240 File "$OCTAVE_SOURCE/HG-ID" |
a487b12dc08f
* tools/makeinst-script.sh.in: include HG-ID in installed files
John Donoghue
parents:
4471
diff
changeset
|
241 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
242 ; distro files |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
243 EOF |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3956
diff
changeset
|
244 if [ -f $OCTAVE_SOURCE/cmdshell.bat ]; then |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3956
diff
changeset
|
245 echo "File '$OCTAVE_SOURCE/cmdshell.bat'" >> $OUTFILE |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3956
diff
changeset
|
246 fi |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
247 |
4254
7f2d5c8c4491
installer: update fc cache during install (Bug #45458)
John D
parents:
4186
diff
changeset
|
248 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
249 # insert the files |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
250 IFS=$'\n' |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
251 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
|
252 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
|
253 echo " CreateDirectory \"\$INSTDIR\\$winf\"" >> $OUTFILE |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
254 echo " SetOutPath \"\$INSTDIR\\$winf\"" >> $OUTFILE |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
255 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
|
256 done |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
257 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
258 cat >> $OUTFILE << EOF |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
259 |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
260 ; add qt.conf |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
261 Push \$0 |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
262 \${StrRep} '\$0' '\$INSTDIR' '\\' '/' |
3423
c8e055d83b9f
Set start directory to user home (Bug #41220)
John D <john.donoghue@ieee.org>
parents:
3422
diff
changeset
|
263 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
|
264 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
|
265 Pop \$0 |
4254
7f2d5c8c4491
installer: update fc cache during install (Bug #45458)
John D
parents:
4186
diff
changeset
|
266 |
7f2d5c8c4491
installer: update fc cache during install (Bug #45458)
John D
parents:
4186
diff
changeset
|
267 ; run fc-cache updater |
4258 | 268 GetFullPathName /SHORT \$1 \$INSTDIR |
4254
7f2d5c8c4491
installer: update fc cache during install (Bug #45458)
John D
parents:
4186
diff
changeset
|
269 DetailPrint "Building font cache (may take a while)" |
4258 | 270 ExecWait "\$1\\fc_update.bat" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
271 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
272 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
273 Section make_uninstaller |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
274 ; Write the uninstall keys for Windows |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
275 SetOutPath "\$INSTDIR" |
3818
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
276 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "DisplayName" "Octave $VERSION" |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
277 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "DisplayVersion" "$VERSION" |
3818
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
278 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "DisplayIcon" "\$INSTDIR\\$ICON" |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
279 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
|
280 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
|
281 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "NoRepair" 1 |
3818
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
282 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "Publisher" "\${APP_NAME}" |
9b033c5323db
nsis installer: expand uninstall information
John Donoghue
parents:
3817
diff
changeset
|
283 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "EstimatedSize" $SIZE |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
284 \${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
|
285 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
|
286 \${EndIf} |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
287 WriteUninstaller "uninstall.exe" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
288 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
289 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
290 ; start menu (currently hardcoded) |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
291 Section "Shortcuts" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
292 |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
293 CreateDirectory "\$SMPROGRAMS\\GNU Octave $VERSION" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
294 CreateShortCut "\$SMPROGRAMS\\GNU 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
|
295 SetOutPath "%USERPROFILE%" |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
296 CreateShortCut "\$SMPROGRAMS\\GNU Octave $VERSION\\Octave-$VERSION (CLI).lnk" "\$INSTDIR\\octave.vbs" "--no-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
297 CreateShortCut "\$SMPROGRAMS\\GNU Octave $VERSION\\Octave-$VERSION (GUI).lnk" "\$INSTDIR\\octave.vbs" "--force-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED |
3384
0de28586712a
installer: Change gui shortcut path to libexec installed path
John Donoghue <john.donoghue@ieee.org>
parents:
3367
diff
changeset
|
298 SetOutPath "\$INSTDIR" |
4176
a543952ed731
set usermodelappid for octave-gui shortcut (Bug #47527)
John Donoghue
parents:
4173
diff
changeset
|
299 |
a543952ed731
set usermodelappid for octave-gui shortcut (Bug #47527)
John Donoghue
parents:
4173
diff
changeset
|
300 ; fix the shortcuts for appid |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
301 ExecWait '"\$INSTDIR\\bin\\win7appid.exe" "\$SMPROGRAMS\\GNU Octave $VERSION\\Octave-$VERSION (GUI).lnk" "gnu.octave.$VERSION"' |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
302 EOF |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3956
diff
changeset
|
303 # shortcut for cmd win |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3956
diff
changeset
|
304 if [ -f $OCTAVE_SOURCE/cmdshell.bat ]; then |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
305 echo "CreateShortCut '\$SMPROGRAMS\\GNU Octave $VERSION\\Bash Shell.lnk' '\$INSTDIR\\cmdshell.bat' '' '' 0" >> $OUTFILE |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3956
diff
changeset
|
306 fi |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
307 # 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
|
308 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
|
309 cat >> $OUTFILE << EOF |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
310 CreateDirectory "\$SMPROGRAMS\\GNU Octave $VERSION\\Documentation" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
311 CreateShortCut "\$SMPROGRAMS\\GNU Octave $VERSION\\Documentation\\Octave C++ Classes (PDF).lnk" "\$INSTDIR\\share\\doc\\octave\\liboctave.pdf" "" "" 0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
312 CreateShortCut "\$SMPROGRAMS\\GNU Octave $VERSION\\Documentation\\Octave C++ Classes (HTML).lnk" "\$INSTDIR\\share\\doc\\octave\\liboctave.html\\index.html" "" "" 0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
313 CreateShortCut "\$SMPROGRAMS\\GNU Octave $VERSION\\Documentation\\Octave (PDF).lnk" "\$INSTDIR\\share\\doc\\octave\\octave.pdf" "" "" 0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
314 CreateShortCut "\$SMPROGRAMS\\GNU 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
|
315 EOF |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
316 fi |
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
317 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
318 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
|
319 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
320 \${If} \$InstallShortcuts == \${BST_CHECKED} |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
321 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
322 ; get latest octave and create shortcuts to it |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
323 Push \$R0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
324 Push \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
325 Push \$R2 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
326 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
327 Call GetLatestOctave |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
328 Pop \$R1 ; Ver |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
329 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
330 ; if no version found - need set INST DIR and VER will use |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
331 StrCmp \$R1 "" set_ver_str |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
332 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
333 ; valid install found - get info from registry |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
334 ReadRegStr \$R0 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-\$R1" "UninstallString" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
335 \${GetParent} \$R0 \$R0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
336 ReadRegStr \$R2 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-\$R1" "DisplayIcon" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
337 GoTo have_ver_str |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
338 set_ver_str: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
339 StrCpy \$R1 "$VERSION" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
340 StrCpy \$R0 "\$INSTDIR" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
341 StrCpy \$R2 "\$INSTDIR\\$ICON" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
342 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
343 have_ver_str: |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
344 SetOutPath "%USERPROFILE%" |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
345 CreateShortCut "\$desktop\\GNU Octave (CLI).lnk" "\$R0\\octave.vbs" "--no-gui" "\$R2" 0 SW_SHOWMINIMIZED |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
346 CreateShortCut "\$desktop\\GNU Octave (GUI).lnk" "\$R0\\octave.vbs" "--force-gui" "\$R2" 0 SW_SHOWMINIMIZED |
4186
393571034f24
* tools/makeinst-script.sh.in: set appid of desktop (GUI).lnk
John D
parents:
4176
diff
changeset
|
347 |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
348 ExecWait '"\$INSTDIR\\bin\\win7appid.exe" "\$desktop\\GNU Octave (GUI).lnk" "gnu.octave.\$R1"' |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
349 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
350 Pop \$R2 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
351 Pop \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
352 Pop \$R0 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
353 \${Endif} |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
354 |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
355 ; BLAS set up |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
356 \${If} \$InstallBlasLib == 1 |
3570
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
357 ; Reference BLAS |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
358 CopyFiles /SILENT "\$INSTDIR\\bin\\librefblas.dll" "\$INSTDIR\\bin\\libblas.dll" |
c7725f722155
NSIS installer: use Open BLAS by default
John W. Eaton <jwe@octave.org>
parents:
3552
diff
changeset
|
359 \${Else} |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
360 ; OpenBLAS |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
361 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
|
362 \${EndIf} |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3458
diff
changeset
|
363 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
364 SectionEnd |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
365 |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
366 Section "FileTypeRego" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
367 ; Octave document |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
368 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
|
369 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
|
370 ; document actions |
3831
1191cff7f132
nsis installer: change file registrations to use octave.vbs
John D
parents:
3818
diff
changeset
|
371 WriteRegStr HKCR "Octave.Document.$VERSION\\shell\\open\\command" "" "wscript \$\\"\$INSTDIR\\octave.vbs\$\\" --force-gui --persist --eval \$\\"edit '%1'\$\\"" |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
372 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
373 \${If} \$RegisterOctaveFileType == \${BST_CHECKED} |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
374 ReadRegStr \$0 HKCR ".m" "" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
375 StrCmp "\$0" "" no_back_type |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
376 WriteRegStr HKCR ".m" "backup_val" "\$0" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
377 no_back_type: |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
378 WriteRegStr HKCR ".m" "" "Octave.Document.$VERSION" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
379 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
|
380 \${EndIf} |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
381 SectionEnd |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
382 |
4075 | 383 Section "InstallPackages" |
384 ; fix the installed packages (if any) | |
4258 | 385 GetFullPathName /SHORT \$1 \$INSTDIR |
386 SetOutPath "\$1" | |
387 ExecWait '"\$1\\bin\\octave-cli.exe" --no-gui -W -H -f -q --eval "pkg rebuild"' \$0 | |
4075 | 388 SectionEnd |
389 | |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
390 Section "Uninstall" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
391 |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
392 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
|
393 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
|
394 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
395 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
|
396 |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3431
diff
changeset
|
397 not_all_users: |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
398 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
|
399 IfErrors not_registered_file |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
400 |
4255
ee1ae5d1fd88
installer: dont remove file association if is not for installed octave
John D
parents:
4254
diff
changeset
|
401 ; only try remove if is set to our version of octave |
ee1ae5d1fd88
installer: dont remove file association if is not for installed octave
John D
parents:
4254
diff
changeset
|
402 ReadRegStr \$0 HKCR ".m" "" |
ee1ae5d1fd88
installer: dont remove file association if is not for installed octave
John D
parents:
4254
diff
changeset
|
403 StrCmp \$0 "Octave.Document.$VERSION" 0 not_registered_file |
ee1ae5d1fd88
installer: dont remove file association if is not for installed octave
John D
parents:
4254
diff
changeset
|
404 |
3458
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
405 ReadRegStr \$0 HKCR ".m" "backup_val" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
406 IfErrors not_backup_file |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
407 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
408 # retore backup |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
409 WriteRegStr HKCR ".m" "" "\$0" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
410 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
411 DeleteRegValue HKCR ".m" "backup_val" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
412 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
413 ; dont delete .m if just restored backup |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
414 Goto not_registered_file |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
415 not_backup_file: |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
416 DeleteRegKey HKCR ".m" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
417 |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
418 not_registered_file: |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
419 ; delete file type |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
420 DeleteRegKey HKCR "Octave.Document.$VERSION" |
608931797a53
installer: Add .m association to Octave
John Donoghue <john.donoghue@ieee.org>
parents:
3453
diff
changeset
|
421 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
422 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
|
423 DeleteRegKey HKLM "Software\\Octave-$VERSION" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
424 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
425 ; Remove shortcuts |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
426 Delete "\$SMPROGRAMS\\GNU Octave $VERSION\\Documentation\\*.*" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
427 RMDir "\$SMPROGRAMS\\GNU Octave $VERSION\\Documentation" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
428 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
429 Delete "\$SMPROGRAMS\\GNU Octave $VERSION\\*.*" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
430 RMDir "\$SMPROGRAMS\\GNU Octave $VERSION" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
431 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
432 ; TODO: only delete if no other version of octave available |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
433 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
434 Push \$R0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
435 Push \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
436 Push \$R2 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
437 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
438 Call un.GetLatestOctave |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
439 Pop \$R1 ; Ver |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
440 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
441 ; no installs detected - remove shortcuts |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
442 StrCmp \$R1 "" remove_desktop_shortcuts |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
443 |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
444 ; if install detected, get the path and icon |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
445 ReadRegStr \$R0 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-\$R1" "UninstallString" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
446 \${GetParent} \$R0 \$R0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
447 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
448 ReadRegStr \$R2 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-\$R1" "DisplayIcon" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
449 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
450 IfFileExists "\$desktop\\GNU Octave (CLI).lnk" 0 check_gui_shortcut |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
451 SetOutPath "%USERPROFILE%" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
452 CreateShortCut "\$desktop\\GNU Octave (CLI).lnk" "\$R0\\octave.vbs" "--no-gui" "\$R2" 0 SW_SHOWMINIMIZED |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
453 |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
454 check_gui_shortcut: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
455 IfFileExists "\$desktop\\GNU Octave (GUI).lnk" 0 done_remove_desktop_shortcuts |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
456 SetOutPath "%USERPROFILE%" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
457 CreateShortCut "\$desktop\\GNU Octave (GUI).lnk" "\$R0\\octave.vbs" "--force-gui" "\$R2" 0 SW_SHOWMINIMIZED |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
458 ExecWait '"\$INSTDIR\\bin\\win7appid.exe" "\$desktop\\GNU Octave (GUI).lnk" "gnu.octave.\$R1"' |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
459 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
460 GoTo done_remove_desktop_shortcuts |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
461 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
462 remove_desktop_shortcuts: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
463 Delete "\$desktop\\GNU Octave (CLI).lnk" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
464 Delete "\$desktop\\GNU Octave (GUI).lnk" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
465 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
466 done_remove_desktop_shortcuts: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
467 Pop \$R2 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
468 Pop \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
469 Pop \$R0 |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
470 |
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
471 ; 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
|
472 Delete "\$INSTDIR\\bin\\qt.conf" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
473 EOF |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
474 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
475 # 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
|
476 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
|
477 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
|
478 echo " Delete \"\$INSTDIR\\$winf\\*.*\"" >> $OUTFILE |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
479 echo " RmDir \"\$INSTDIR\\$winf\"" >> $OUTFILE |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
480 done |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
481 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
482 # last bit of the uninstaller |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
3430
diff
changeset
|
483 cat >> $OUTFILE << EOF |
3409
5e77c5fc91ed
qt: build translations in cross build and install
John Donoghue <john.donoghue@ieee.org>
parents:
3406
diff
changeset
|
484 Delete "\$INSTDIR\\*.*" |
4725
12bfaba26c8d
* tools/makeinst-script.sh.in: clear erros before doing RMDir INSTDIR
John Donoghue
parents:
4658
diff
changeset
|
485 ClearErrors |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
486 RmDir "\$INSTDIR" |
3954
14ad478dc07b
Installer: prompt to unstill additional files (Bug #45188)
John D
parents:
3831
diff
changeset
|
487 |
14ad478dc07b
Installer: prompt to unstill additional files (Bug #45188)
John D
parents:
3831
diff
changeset
|
488 ; didnt remove directory ? most likely from not all files removed |
14ad478dc07b
Installer: prompt to unstill additional files (Bug #45188)
John D
parents:
3831
diff
changeset
|
489 IfErrors 0 uninstall_done |
4385 | 490 MessageBox MB_YESNO "One or more folders were not uninstalled because they contain extra files. Try to delete them?" /SD IDYES IDNO uninstall_done |
3954
14ad478dc07b
Installer: prompt to unstill additional files (Bug #45188)
John D
parents:
3831
diff
changeset
|
491 RMDir /r "\$INSTDIR" |
3956 | 492 |
493 IfErrors 0 uninstall_done | |
4385 | 494 MessageBox MB_YESNO "One of more files were still not uninstalled. Do you want to delete them on the next reboot?" /SD IDYES IDNO uninstall_done |
3956 | 495 RMDir /r /REBOOTOK "\$INSTDIR" |
3954
14ad478dc07b
Installer: prompt to unstill additional files (Bug #45188)
John D
parents:
3831
diff
changeset
|
496 uninstall_done: |
14ad478dc07b
Installer: prompt to unstill additional files (Bug #45188)
John D
parents:
3831
diff
changeset
|
497 |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
498 SectionEnd |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
499 |
4471
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
500 ; function to get latest version of octave installed |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
501 !macro GET_LATEST_OCTAVE un |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
502 Function \${un}GetLatestOctave |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
503 Push \$R0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
504 Push \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
505 Push \$R2 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
506 Push \$R3 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
507 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
508 StrCpy \$R0 "" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
509 StrCpy \$R1 0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
510 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
511 ; loop through installed programs to find octave installs |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
512 octave_ver_loop: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
513 EnumRegKey \$R2 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
514 StrCmp \$R2 "" latest_octave_done |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
515 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
516 ; len(octave) = 6 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
517 StrCpy \$R3 \$R2 6 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
518 StrCmp \$R3 "Octave" +1 next_ver_loop |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
519 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
520 ; to verify the install check with the installer exists have uninstaller |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
521 ReadRegStr \$R3 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\$R2" "UninstallString" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
522 ifFileExists \$R3 0 next_ver_loop |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
523 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
524 ; grab version part of octave |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
525 StrCpy \$R0 \$R2 "" 7 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
526 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
527 next_ver_loop: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
528 IntOp \$R1 \$R1 + 1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
529 GoTo octave_ver_loop |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
530 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
531 latest_octave_done: |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
532 Pop \$R3 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
533 Pop \$R2 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
534 Pop \$R1 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
535 Exch \$R0 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
536 ; stack now has octave version on top |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
537 FunctionEnd |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
538 !macroend |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
539 |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
540 !insertmacro GET_LATEST_OCTAVE "" |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
541 !insertmacro GET_LATEST_OCTAVE "un." |
1a3deda73484
nsis installer: include version links in startmenu (Bug #51878)
John D
parents:
4458
diff
changeset
|
542 |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
543 ; Function to detect Windows version and abort if Octave is unsupported in the current platform |
4120
f2d7bb7777da
installer: dont warn on experimental for win10 (Bug #47576)
John Donoghue
parents:
4075
diff
changeset
|
544 Function CheckWinVer |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
545 Push \$0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
546 Push \$1 |
3552
b82ff8ba6a8a
nsis-installer: check for win8 version and set -i --line-editing in shortcuts
John Donoghue <john.donoghue@ieee.org>
parents:
3545
diff
changeset
|
547 |
4387
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
548 ; try read new way of getting version |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
549 ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentMajorVersionNumber |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
550 ; since is DWORD reg value, error will be set, however will be "" if no value read |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
551 StrCmp \$0 "" is_less_than_win10 |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
552 ReadRegStr \$1 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentMinorVersionNumber |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
553 StrCmp \$1 "" is_less_than_win10 |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
554 |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
555 StrCpy \$0 "\$0.\$1" |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
556 Goto is_winnt |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
557 |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
558 is_less_than_win10: |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
559 ClearErrors |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
560 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
|
561 IfErrors is_error is_winnt |
4387
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
562 |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
563 is_winnt: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
564 StrCpy \$1 \$0 1 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
565 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
|
566 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
|
567 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
|
568 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
|
569 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
|
570 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
|
571 StrCmp \$0 "6.2" is_winnt_8 |
4387
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
572 StrCmp \$0 "6.3" is_winnt_8 ; win 8.1 |
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
573 StrCmp \$0 "10.0" is_winnt_10 |
4120
f2d7bb7777da
installer: dont warn on experimental for win10 (Bug #47576)
John Donoghue
parents:
4075
diff
changeset
|
574 StrCmp \$1 6 is_winnt_10 ; Checking for future versions of Windows 10+ |
4387
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
575 StrCmp \$1 1 is_winnt_10 ; Checking for future versions of Windows 10+ |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
576 Goto is_error |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
577 |
4120
f2d7bb7777da
installer: dont warn on experimental for win10 (Bug #47576)
John Donoghue
parents:
4075
diff
changeset
|
578 is_winnt_10: |
3552
b82ff8ba6a8a
nsis-installer: check for win8 version and set -i --line-editing in shortcuts
John Donoghue <john.donoghue@ieee.org>
parents:
3545
diff
changeset
|
579 |
4385 | 580 MessageBox MB_YESNO|MB_ICONEXCLAMATION "Setup has detected Windows 10 installed on your system. Octave is currently not fully tested on Windows 10. Testers are welcome to provide feedback. Do you want to proceed with the installation anyway?" /SD IDYES IDYES done IDNO 0 |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
581 Abort |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
582 is_winnt_XP: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
583 is_winnt_2003: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
584 is_winnt_vista: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
585 is_winnt_7: |
4120
f2d7bb7777da
installer: dont warn on experimental for win10 (Bug #47576)
John Donoghue
parents:
4075
diff
changeset
|
586 is_winnt_8: |
3362
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
587 Goto done |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
588 is_error: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
589 StrCpy \$1 \$0 |
4387
05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
John D
parents:
4385
diff
changeset
|
590 ClearErrors |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
591 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
|
592 IfErrors 0 +4 |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
593 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
|
594 IfErrors 0 +2 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
595 StrCpy \$0 "Unknown" |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
596 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
|
597 Abort |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
598 done: |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
599 Pop \$1 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
600 Pop \$0 |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
601 FunctionEnd |
0f2a5e218359
makeinst-script.sh: Added checking of Windows version
Anirudha Bose <ani07nov@gmail.com>
parents:
3361
diff
changeset
|
602 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
603 ; 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
|
604 Function CheckCurrVersion |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
605 Push \$0 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
606 ClearErrors |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
607 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
|
608 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
|
609 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
|
610 Abort |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
611 curr_check_ok: |
4124
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
612 pop \$0 |
3358
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
613 FunctionEnd |
8708b7d07795
makeinst-script.sh: Added checking for previous installation of Octave
Anirudha Bose <ani07nov@gmail.com>
parents:
3357
diff
changeset
|
614 |
3728
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
615 ; Check whether prev install is here and no spaces in dest name |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
616 Function CheckPrevInstallAndDest |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
617 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
|
618 inst_exists: |
4385 | 619 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?" /SD IDYES IDYES inst_none IDNO 0 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
620 Abort |
3728
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
621 GoTo inst_end |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
622 inst_none: |
3728
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
623 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
624 ; check for spaces in dest filename |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
625 Push \$R0 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
626 Push \$R1 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
627 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
628 StrCpy \$R1 0 # r1 = counter |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
629 space_loop: |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
630 StrCpy \$R0 \$INSTDIR 1 \$R1 # R0 = character in string to check |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
631 StrCmp \$R0 "" space_end # end of string |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
632 StrCmp \$R0 " " space_found |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
633 IntOp \$R1 \$R1 + 1 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
634 GoTo space_loop |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
635 space_found: |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
636 MessageBox MB_OK|MB_ICONEXCLAMATION "Octave should not be installed to a destination folder containing spaces. Please select another destination." |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
637 Abort |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
638 space_end: |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
639 Pop \$R1 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
640 Pop \$R0 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
641 |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
642 inst_end: |
8c11c5a1a939
Prevent octave install to path with spaces
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
643 |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
644 FunctionEnd |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
645 |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
646 ; 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
|
647 Function CheckJRE |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
648 ; looks in: |
3359
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
649 ; 1 - JAVA_HOME environment variable |
40ae138b38a6
Removed checking of JRE locally
Anirudha Bose <ani07nov@gmail.com>
parents:
3358
diff
changeset
|
650 ; 2 - the registry |
4124
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
651 EOF |
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
652 cat >> $OUTFILE << EOF |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
653 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
654 Push \$R0 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
655 Push \$R1 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
656 |
4648
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
657 # get the version |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
658 ClearErrors |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
659 ReadEnvStr \$R1 "JAVA_VERSION" |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
660 StrCmp \$R1 "" 0 have_java_version |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
661 ClearErrors |
4648
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
662 ReadRegStr \$R1 HKLM "SOFTWARE\\JavaSoft\\JRE" "CurrentVersion" |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
663 IfErrors 0 have_java_version |
3367
cfcbe03c9160
installer: Enable documentation build and add to installer.
John Donoghue <john.donoghue@ieee.org>
parents:
3366
diff
changeset
|
664 ReadRegStr \$R1 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment" "CurrentVersion" |
4648
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
665 IfErrors JRE_Error have_java_version |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
666 |
4648
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
667 have_java_version: |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
668 ClearErrors |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
669 ReadRegStr \$R0 HKLM "SOFTWARE\\JavaSoft\\JRE\\\$R1" "RuntimeLib" |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
670 IfErrors 0 have_java_runtime |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
671 ReadRegStr \$R0 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment\\\$R1" "RuntimeLib" |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
672 IfErrors JRE_Error have_java_runtime |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
673 |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
674 have_java_runtime: |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
675 # have runtime in R0 - check actual file is there |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
676 StrCmp \$R0 "" JRE_Error 0 |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
677 ClearErrors |
982484a78b75
nsis-installer: check for java using same tests of octave uses (Bug #53572)
John Donoghue
parents:
4613
diff
changeset
|
678 IfFileExists \$R0 continue JRE_Error |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
679 |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
680 JRE_Error: |
4385 | 681 MessageBox MB_ICONEXCLAMATION|MB_YESNO "Octave has the capability to call Java libraries, but the installer was unable to find a Java Runtime Environment (JRE) on this system. Octave will still function without a JRE, only certain specific functions will be disabled. If a JRE is installed later, Octave should be able to detect and use it automatically. Continue with installation?" /SD IDYES IDYES continue |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
682 Abort |
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
683 continue: |
3403
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
684 Pop \$R1 |
f79780bcc843
installer: check destination path later in install (Bug #41069)
John Donoghue <john.donoghue@ieee.org>
parents:
3391
diff
changeset
|
685 Pop \$R0 |
4124
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
686 EOF |
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
687 cat >> $OUTFILE << EOF |
5ae69991eaa1
installer: detect win64/win32 java depending on octave 32/64 (Bug #47606)
John Donoghue
parents:
4121
diff
changeset
|
688 |
3357
456b6e533054
makeinst-script.sh: Added checking for Java Runtime Environment
Anirudha Bose <ani07nov@gmail.com>
parents:
3356
diff
changeset
|
689 FunctionEnd |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
690 EOF |