11 # Contributors: |
11 # Contributors: |
12 # |
12 # |
13 # Description: |
13 # Description: |
14 # Raptor installer/uninstaller script |
14 # Raptor installer/uninstaller script |
15 |
15 |
|
16 # Set compression type - the advice in the NSIS user manual |
|
17 # is to have this at the top of the main .nsi file. |
|
18 SetCompressor /SOLID lzma |
|
19 |
16 # Standard NSIS Library includes |
20 # Standard NSIS Library includes |
17 !include "MUI2.nsh" |
21 !include "MUI2.nsh" |
18 !include "LogicLib.nsh" |
22 !include "LogicLib.nsh" |
19 !include "WinMessages.nsh" |
23 !include "WinMessages.nsh" |
20 |
24 |
75 !define MUI_FINISHPAGE_NOAUTOCLOSE |
79 !define MUI_FINISHPAGE_NOAUTOCLOSE |
76 # Show installer details |
80 # Show installer details |
77 ShowInstDetails show |
81 ShowInstDetails show |
78 |
82 |
79 ##################### Pages in the installer ##################### |
83 ##################### Pages in the installer ##################### |
|
84 !define MUI_WELCOMEPAGE_TITLE_3LINES |
80 !insertmacro MUI_PAGE_WELCOME |
85 !insertmacro MUI_PAGE_WELCOME |
81 !insertmacro MUI_PAGE_LICENSE ${RAPTOR_LOCATION}\license.txt |
86 !insertmacro MUI_PAGE_LICENSE ${RAPTOR_LOCATION}\license.txt |
82 !define MUI_PAGE_HEADER_TEXT "Installation type" |
87 !define MUI_PAGE_HEADER_TEXT "Installation type" |
83 Page custom UserOrSysInstall UserOrSysInstallLeave |
88 Page custom UserOrSysInstall UserOrSysInstallLeave |
84 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirLeave # Directory page exit function - disallow spaces in $INSTDIR |
89 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirLeave # Directory page exit function - disallow spaces in $INSTDIR |
85 !insertmacro MUI_PAGE_DIRECTORY |
90 !insertmacro MUI_PAGE_DIRECTORY |
86 !insertmacro MUI_PAGE_INSTFILES |
91 !insertmacro MUI_PAGE_INSTFILES |
|
92 !define MUI_FINISHPAGE_TITLE_3LINES |
87 !insertmacro MUI_PAGE_FINISH |
93 !insertmacro MUI_PAGE_FINISH |
88 |
94 |
89 ######################## .onInit function ######################## |
95 ######################## .onInit function ######################## |
90 Function .onInit |
96 Function .onInit |
91 StrCpy $INSTDIR "C:\Apps\Raptor" |
97 StrCpy $INSTDIR "C:\Apps\Raptor" |
105 SetOutPath "$INSTDIR\examples" |
111 SetOutPath "$INSTDIR\examples" |
106 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\examples\*.* |
112 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\examples\*.* |
107 SetOutPath "$INSTDIR\lib" |
113 SetOutPath "$INSTDIR\lib" |
108 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\lib\*.* |
114 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\lib\*.* |
109 SetOutPath "$INSTDIR\python" |
115 SetOutPath "$INSTDIR\python" |
110 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\python\*.* |
116 File /r /x distribution.policy.s60 /x *.pyc /x *.pydevproject /x *.project ${RAPTOR_LOCATION}\python\*.* |
111 SetOutPath "$INSTDIR\schema" |
117 SetOutPath "$INSTDIR\schema" |
112 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\schema\*.* |
118 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\schema\*.* |
|
119 SetOutPath "$INSTDIR\style" |
|
120 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\style\*.* |
113 SetOutPath "$INSTDIR\win32\bin" |
121 SetOutPath "$INSTDIR\win32\bin" |
114 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\win32\bin\*.* |
122 File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\win32\bin\*.* |
115 SetOutPath "$INSTDIR\win32\bv" |
123 SetOutPath "$INSTDIR\win32\bv" |
116 File /r /x distribution.policy.s60 /x .hg ${BV_LOCATION}\*.* |
124 File /r /x distribution.policy.s60 /x .hg ${BV_LOCATION}\*.* |
117 SetOutPath "$INSTDIR\win32\cygwin" |
125 SetOutPath "$INSTDIR\win32\cygwin" |
198 # Refresh environment to get changes for SBS_HOME and PATH |
206 # Refresh environment to get changes for SBS_HOME and PATH |
199 !insertmacro RefreshEnv |
207 !insertmacro RefreshEnv |
200 ${EndUnless} |
208 ${EndUnless} |
201 |
209 |
202 # Write the uninstaller |
210 # Write the uninstaller |
203 # WriteUninstaller "$INSTDIR\${UNINSTALLER_FILENAME}" |
|
204 WriteUninstaller "$INSTDIR\${UNINSTALLER_FILENAME}" |
211 WriteUninstaller "$INSTDIR\${UNINSTALLER_FILENAME}" |
205 # Unload registry plug in |
212 # Unload registry plug in |
206 ${registry::Unload} |
213 ${registry::Unload} |
207 SectionEnd |
214 SectionEnd |
208 |
215 |
318 !define MUI_UNFINISHPAGE_NOAUTOCLOSE |
325 !define MUI_UNFINISHPAGE_NOAUTOCLOSE |
319 # Show uninstaller details |
326 # Show uninstaller details |
320 ShowUninstDetails show |
327 ShowUninstDetails show |
321 |
328 |
322 #################### Pages in the uninstaller #################### |
329 #################### Pages in the uninstaller #################### |
|
330 !define MUI_WELCOMEPAGE_TITLE_3LINES |
323 !insertmacro MUI_UNPAGE_WELCOME |
331 !insertmacro MUI_UNPAGE_WELCOME |
324 !insertmacro MUI_UNPAGE_CONFIRM |
332 !insertmacro MUI_UNPAGE_CONFIRM |
325 !insertmacro MUI_UNPAGE_INSTFILES |
333 !insertmacro MUI_UNPAGE_INSTFILES |
|
334 !define MUI_FINISHPAGE_TITLE_3LINES |
326 !insertmacro MUI_UNPAGE_FINISH |
335 !insertmacro MUI_UNPAGE_FINISH |
327 |
336 |
328 ################## Sections in the uninstaller ################## |
337 ################## Sections in the uninstaller ################## |
329 # There is only one section in the uninstaller. |
338 # There is only one section in the uninstaller. |
330 Section "Uninstall" |
339 Section "Uninstall" |
332 RmDir /r $INSTDIR\bin |
341 RmDir /r $INSTDIR\bin |
333 RmDir /r $INSTDIR\examples |
342 RmDir /r $INSTDIR\examples |
334 RmDir /r $INSTDIR\lib |
343 RmDir /r $INSTDIR\lib |
335 RmDir /r $INSTDIR\python |
344 RmDir /r $INSTDIR\python |
336 RmDir /r $INSTDIR\schema |
345 RmDir /r $INSTDIR\schema |
|
346 RmDir /r $INSTDIR\style |
337 RmDir /r $INSTDIR\win32 |
347 RmDir /r $INSTDIR\win32 |
338 Delete $INSTDIR\RELEASE-NOTES.html |
348 Delete $INSTDIR\RELEASE-NOTES.html |
339 RmDir /r $INSTDIR\notes |
349 RmDir /r $INSTDIR\notes |
340 Delete $INSTDIR\RaptorEnv.bat |
350 Delete $INSTDIR\RaptorEnv.bat |
341 Delete $INSTDIR\${UNINSTALLER_FILENAME} |
351 Delete $INSTDIR\${UNINSTALLER_FILENAME} |