annotate makeinst-script.sh @ 3175:1c6824ccdc24

makeinst-script.sh: add license page with GPLv3
author Anirudha Bose <ani07nov@gmail.com>
date Tue, 23 Jul 2013 22:50:25 -0400
parents 2a264535ff3a
children a6291cc38ec6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2992
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
1 #! /bin/bash
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
2 set -e
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
3
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
4 if [ $# != 1 ]; then
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
5 echo "Expected octave folder"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
6 exit
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
7 fi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
8
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
9 ARG1=$1
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
10
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
11 TOPDIR=`dirname $ARG1`
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
12 OCTAVE_SOURCE=`basename $ARG1`
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
13
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
14 echo "Generating installer script ... "
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
15
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
16 cd $TOPDIR
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
17
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
18 # find icon
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
19 ICON=`find $OCTAVE_SOURCE -name octave-logo.ico -printf "%P" | sed 's,/,\\\\,g'`
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
20
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
21 # create installer script
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
22 echo "; octave setup script $OCTAVE_SOURCE" > octave.nsi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
23
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
24 # installer settings
2992
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
25 cat >> octave.nsi << EOF
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
26 !define APP_NAME "GNU Octave"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
27 !define COMP_NAME "GNU Project"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
28 !define WEB_SITE "http://www.octave.org"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
29 !define VERSION "3.7.5.0"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
30 !define COPYRIGHT "Copyright © 2013 John W. Eaton and others."
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
31 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations."
3175
1c6824ccdc24 makeinst-script.sh: add license page with GPLv3
Anirudha Bose <ani07nov@gmail.com>
parents: 3174
diff changeset
32 !define LICENSE_TXT "../gpl-3.0.txt"
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
33 !define INSTALLER_NAME "octave-installer.exe"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
34 !define MAIN_APP_EXE "octave.exe"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
35 !define INSTALL_TYPE "SetShellVarContext current"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
36 !define CLASSPATH ".;lib;lib\myJar"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
37 !define CLASS "org.me.myProgram"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
38
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
39 ######################################################################
2992
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
40
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
41 VIProductVersion "\${VERSION}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
42 VIAddVersionKey "ProductName" "\${APP_NAME}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
43 VIAddVersionKey "CompanyName" "\${COMP_NAME}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
44 VIAddVersionKey "LegalCopyright" "\${COPYRIGHT}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
45 VIAddVersionKey "FileDescription" "\${DESCRIPTION}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
46 VIAddVersionKey "FileVersion" "\${VERSION}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
47
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
48 ######################################################################
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
49
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
50 SetCompressor /SOLID Lzma
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
51 Name "\${APP_NAME}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
52 Caption "\${APP_NAME}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
53 OutFile "\${INSTALLER_NAME}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
54 BrandingText "\${APP_NAME}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
55 XPStyle on
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
56 InstallDir "\$PROGRAMFILES\Octave"
3010
8ac67219c241 Updates for nsis build and installer creation
John Donoghue <john.donoghue@ieee.org>
parents: 2992
diff changeset
57 Icon "$OCTAVE_SOURCE\\$ICON"
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
58
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
59 ######################################################################
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
60
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
61 !include "MUI.nsh"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
62
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
63 !define MUI_ABORTWARNING
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
64 !define MUI_UNABORTWARNING
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
65
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
66 !insertmacro MUI_PAGE_WELCOME
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
67
3175
1c6824ccdc24 makeinst-script.sh: add license page with GPLv3
Anirudha Bose <ani07nov@gmail.com>
parents: 3174
diff changeset
68 !ifdef LICENSE_TXT
1c6824ccdc24 makeinst-script.sh: add license page with GPLv3
Anirudha Bose <ani07nov@gmail.com>
parents: 3174
diff changeset
69 !insertmacro MUI_PAGE_LICENSE "\${LICENSE_TXT}"
1c6824ccdc24 makeinst-script.sh: add license page with GPLv3
Anirudha Bose <ani07nov@gmail.com>
parents: 3174
diff changeset
70 !endif
1c6824ccdc24 makeinst-script.sh: add license page with GPLv3
Anirudha Bose <ani07nov@gmail.com>
parents: 3174
diff changeset
71
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
72 !insertmacro MUI_PAGE_DIRECTORY
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
73
2992
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
74
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
75 !insertmacro MUI_PAGE_INSTFILES
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
76
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
77 !define MUI_FINISHPAGE_RUN "\$INSTDIR\bin\\\${MAIN_APP_EXE}"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
78 !insertmacro MUI_PAGE_FINISH
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
79
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
80 !insertmacro MUI_UNPAGE_CONFIRM
2992
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
81
3174
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
82 !insertmacro MUI_UNPAGE_INSTFILES
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
83
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
84 !insertmacro MUI_UNPAGE_FINISH
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
85
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
86 !insertmacro MUI_LANGUAGE "English"
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
87
2a264535ff3a makeinst-script.sh: use MUI interface
Anirudha Bose <ani07nov@gmail.com>
parents: 3010
diff changeset
88 ######################################################################
2992
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
89
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
90 ; file section
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
91 Section "MainFiles"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
92
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
93 EOF
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
94
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
95 # insert the files
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
96 IFS=$'\n'
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
97 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
98 winf=`echo $f | sed 's,/,\\\\,g'`
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
99 echo " CreateDirectory \"\$INSTDIR\\$winf\"" >> octave.nsi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
100 echo " SetOutPath \"\$INSTDIR\\$winf\"" >> octave.nsi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
101 find "$OCTAVE_SOURCE/$f" -maxdepth 1 -type f -printf " File \"%p\"\n" >> octave.nsi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
102 done
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
103
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
104 cat >> octave.nsi << EOF
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
105
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
106 SectionEnd
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
107
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
108 Section make_uninstaller
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
109 ; Write the uninstall keys for Windows
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
110 SetOutPath "\$INSTDIR"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
111 WriteRegStr HKLM "Software\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave" "DisplayName" "Octave"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
112 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave" "UninstallString" "\$INSTDIR\uninstall.exe"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
113 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave" "NoModify" 1
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
114 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave" "NoRepair" 1
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
115 WriteUninstaller "uninstall.exe"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
116 SectionEnd
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
117
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
118 ; start menu (currently hardcoded)
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
119 Section "Shortcuts"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
120
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
121 CreateDirectory "\$SMPROGRAMS\\Octave"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
122 CreateShortCut "\$SMPROGRAMS\\Octave\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
123 CreateShortCut "\$SMPROGRAMS\Octave\\Octave.lnk" "\$INSTDIR\\bin\\octave.exe" "" "\$INSTDIR\\$ICON" 0
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
124 CreateShortCut "\$SMPROGRAMS\Octave\\Octave (No GUI).lnk" "\$INSTDIR\\bin\\octave-cli.exe" "" "\$INSTDIR\\$ICON" 0
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
125
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
126 SectionEnd
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
127
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
128 Section "Uninstall"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
129
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
130 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Octave"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
131 DeleteRegKey HKLM "Software\Octave"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
132
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
133 ; Remove shortcuts
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
134 Delete "\$SMPROGRAMS\Octave\*.*"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
135 RMDir "\$SMPROGRAMS\Octave"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
136
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
137 EOF
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
138
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
139 # 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
140 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
141 winf=`echo $f | sed 's,/,\\\\,g'`
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
142 echo " Delete \"\$INSTDIR\\$winf\\*.*\"" >> octave.nsi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
143 echo " RmDir \"\$INSTDIR\\$winf\"" >> octave.nsi
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
144 done
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
145
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
146 # last bit of the uninstaller
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
147 cat >> octave.nsi << EOF
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
148 Delete "\$INSTDIR\*.*"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
149 RmDir "\$INSTDIR"
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
150 SectionEnd
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
151 EOF
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
152
4b450c162e39 Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
153 echo "Generation Completed"