author | Dan |
Tue, 08 Dec 2009 02:25:33 -0500 | |
changeset 6 | 6016fd9e848f |
parent 5 | 85800cb04cc5 |
child 7 | 37824b18ff73 |
permissions | -rwxr-xr-x |
0 | 1 |
; Script generated by the HM NIS Edit Script Wizard. |
2 |
||
3 |
; HM NIS Edit Wizard helper defines |
|
4 |
!define PRODUCT_NAME "Enano CMS" |
|
6
6016fd9e848f
A couple minor fixes: more flexible version numbering; added a CreateDirectory before uninstaller generation (whoops)
Dan
parents:
5
diff
changeset
|
5 |
!ifndef PRODUCT_VERSION |
0 | 6 |
!define PRODUCT_VERSION "1.1.6" |
6
6016fd9e848f
A couple minor fixes: more flexible version numbering; added a CreateDirectory before uninstaller generation (whoops)
Dan
parents:
5
diff
changeset
|
7 |
!endif |
0 | 8 |
!define PRODUCT_PUBLISHER "Enano CMS Project" |
9 |
!define PRODUCT_WEB_SITE "http://enanocms.org" |
|
10 |
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" |
|
11 |
!define PRODUCT_UNINST_ROOT_KEY "HKLM" |
|
12 |
!define PRODUCT_SHORTNAME "enanocms" |
|
3 | 13 |
; !define UNINSTALL_DEBUG |
0 | 14 |
|
15 |
!ifndef ENANO_ROOT |
|
16 |
!define ENANO_ROOT "Q:\enano-1.1\repo" |
|
17 |
!endif |
|
18 |
||
19 |
SetCompressor /FINAL /SOLID lzma |
|
20 |
CRCCheck force |
|
21 |
||
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
22 |
!include "WinMessages.nsh" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
23 |
|
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
24 |
; ExperienceUI 1.3.1 compatible |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
25 |
!ifndef XPUI_SYSDIR |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
26 |
!define XPUI_SYSDIR "P:\exui\Contrib\ExperienceUI" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
27 |
!endif |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
28 |
!include "${XPUI_SYSDIR}\XPUI.nsh" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
29 |
|
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
30 |
; ExperienceUI GUI parameters |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
31 |
!define XPUI_BGIMAGE |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
32 |
!define XPUI_BGIMAGE_BMP "gfx\enano-bg.bmp" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
33 |
!define XPUI_TEXT_COLOR "F2F2F2" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
34 |
!define XPUI_TEXT_BGCOLOR "202020" ; irrelevant but still |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
35 |
!define XPUI_TEXT_LIGHTCOLOR "B4C3EA" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
36 |
!define XPUI_ABORTWARNING |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
37 |
!define XPUI_BRANDINGTEXT "NSIS Installer ${NSIS_VERSION}" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
38 |
!define XPUI_BRANDINGTEXT_COLOR_FG "b6d9ff" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
39 |
!define XPUI_BRANDINGTEXT_COLOR_BG "4c5b6b" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
40 |
!define XPUI_FASTERSKINNING |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
41 |
!define XPUI_UNINSTALLER |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
42 |
|
0 | 43 |
Var wampstack_installed |
44 |
Var wappstack_installed |
|
45 |
Var stack_type |
|
46 |
Var stack_instdir |
|
47 |
Var stack_portbit |
|
48 |
Var db_dbmsname |
|
49 |
Var db_rootuser |
|
50 |
Var db_rootpass |
|
51 |
Var db_needroot |
|
52 |
Var db_driver |
|
53 |
Var db_port |
|
54 |
Var db_user |
|
55 |
Var db_password |
|
56 |
Var db_name |
|
57 |
Var enano_user |
|
58 |
Var enano_password |
|
59 |
Var admin_email |
|
60 |
Var site_name |
|
61 |
Var site_desc |
|
62 |
Var site_copyright |
|
63 |
Var url_scheme |
|
64 |
Var start_with |
|
3 | 65 |
Var skip_install |
0 | 66 |
|
67 |
!include "inst-resources\bitnamiutils.nsh" |
|
68 |
!include "inst-resources\dbal.nsh" |
|
69 |
!include "inst-resources\mysql.nsh" |
|
70 |
!include "inst-resources\postgresql.nsh" |
|
71 |
!include "inst-resources\str_replace.nsh" |
|
72 |
!include "inst-resources\kickstart.nsh" |
|
73 |
!include "inst-resources\apacheconfig.nsh" |
|
74 |
!include "inst-resources\applist.nsh" |
|
75 |
||
3 | 76 |
; |
77 |
; INSTALL PAGES |
|
78 |
; |
|
79 |
||
0 | 80 |
; Welcome page |
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
81 |
${Page} Welcome2 |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
82 |
|
0 | 83 |
; License page |
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
84 |
${LicensePage} "licenses\GPL.txt" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
85 |
|
0 | 86 |
; Stack selection - automatic unless both stacks are installed |
87 |
!include "pages\StackSelect.nsi" |
|
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
88 |
|
0 | 89 |
; Database credentials entry |
90 |
!include "pages\DatabaseConfig.nsi" |
|
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
91 |
|
0 | 92 |
; Site config page |
93 |
!include "pages\SiteConfig.nsi" |
|
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
94 |
|
0 | 95 |
; User credentials page |
96 |
!include "pages\Login.nsi" |
|
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
97 |
|
0 | 98 |
; Components page |
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
99 |
${Page} Components |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
100 |
|
0 | 101 |
; Instfiles page |
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
102 |
${Page} InstFiles |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
103 |
|
0 | 104 |
; Finish page |
105 |
!define XPUI_FINISHPAGE_RUN |
|
106 |
!define XPUI_FINISHPAGE_CHECKBOX_RUN "Go to my new $(^Name) website now" |
|
107 |
!define XPUI_FINISHPAGE_RUN_FUNCTION OpenBitnamiWebsite |
|
108 |
Function OpenBitnamiWebsite |
|
109 |
ExecShell open "http://localhost$stack_portbit/${PRODUCT_SHORTNAME}/" |
|
110 |
FunctionEnd |
|
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
111 |
${Page} Finish |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
112 |
${Page} Abort |
0 | 113 |
|
3 | 114 |
; |
115 |
; UNINSTALL PAGES |
|
116 |
; |
|
117 |
||
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
118 |
${UnPage} Welcome2 |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
119 |
${UnPage} InstFiles |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
120 |
${UnPage} Finish |
0 | 121 |
|
122 |
; Reserve files |
|
123 |
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS |
|
124 |
||
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
125 |
; Language files |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
126 |
${Language} "English" |
0 | 127 |
|
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
128 |
; MUI end ------ |
0 | 129 |
|
130 |
Name "${PRODUCT_NAME}" |
|
131 |
Caption "${PRODUCT_NAME} ${PRODUCT_VERSION} Bitnami installer" |
|
6
6016fd9e848f
A couple minor fixes: more flexible version numbering; added a CreateDirectory before uninstaller generation (whoops)
Dan
parents:
5
diff
changeset
|
132 |
OutFile "enano-${PRODUCT_VERSION}-bitnami-setup.exe" |
0 | 133 |
InstallDir "$PROGRAMFILES\Enano CMS" |
134 |
ShowInstDetails show |
|
135 |
ShowUnInstDetails show |
|
136 |
||
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
137 |
; File lists |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
138 |
!include "inst-resources\core-files.nsh" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
139 |
; End file lists |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
140 |
|
0 | 141 |
Section "-pre" |
142 |
StrCpy $INSTDIR "$stack_instdir" |
|
3 | 143 |
StrCpy $skip_install 0 |
144 |
||
145 |
StrCmp $db_needroot 0 0 SkipManualCheck |
|
146 |
; If we were given our own DB credentials and there's already a config, the installation needs to be skipped |
|
147 |
IfFileExists "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php" 0 SkipManualCheck |
|
148 |
StrCpy $skip_install 1 |
|
149 |
Return |
|
150 |
||
151 |
SkipManualCheck: |
|
152 |
||
0 | 153 |
IfFileExists "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php" 0 +2 |
154 |
Delete "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php" |
|
155 |
SectionEnd |
|
156 |
||
157 |
Section "-DatabaseSetup" |
|
158 |
StrCmp $db_needroot 1 +2 |
|
159 |
Return |
|
160 |
||
161 |
; Create database |
|
162 |
${db_create} $R0 "$db_rootuser" "$db_rootpass" "$db_name" "$db_user" "$db_password" |
|
163 |
IntCmp $R0 0 DatabaseCreateSuccess |
|
164 |
!insertmacro XPUI_HEADER_TEXT "Installation failed" "Could not create the database." |
|
165 |
DetailPrint "Database creation failed." |
|
166 |
MessageBox MB_OK|MB_ICONEXCLAMATION "Setup failed to create the database for $(^Name).$\r$\n\ |
|
167 |
$\r$\n\ |
|
168 |
It's possible that your authentication details were rejected or that there \ |
|
169 |
is a bug in the installer. Try removing any special characters (especially \ |
|
170 |
quote symbols and backslashes) from your password. Make sure to use only \ |
|
171 |
letters, numbers, and underscores in the database name and username." |
|
172 |
Abort |
|
173 |
DatabaseCreateSuccess: |
|
174 |
SectionEnd |
|
175 |
||
176 |
Section "Enano Core" SEC01 |
|
177 |
SectionIn RO |
|
6
6016fd9e848f
A couple minor fixes: more flexible version numbering; added a CreateDirectory before uninstaller generation (whoops)
Dan
parents:
5
diff
changeset
|
178 |
CreateDirectory "$INSTDIR\apps\${PRODUCT_SHORTNAME}" |
3 | 179 |
WriteUninstaller "$INSTDIR\apps\${PRODUCT_SHORTNAME}\uninstall.exe" |
0 | 180 |
!insertmacro Core_Install |
181 |
SectionEnd |
|
182 |
||
183 |
Section "Enable GMP in PHP" SecGMP |
|
184 |
ClearErrors |
|
3 | 185 |
IfFileExists "$stack_instdir\php\ext\php_gmp.dll" +3 |
186 |
||
187 |
; No GMP |
|
188 |
MessageBox MB_OK|MB_ICONEXCLAMATION "The stack you selected does not contain the GMP extension, so it cannot be enabled. Logins will be several seconds slower. Please consider upgrading your stack." |
|
189 |
Return |
|
190 |
||
0 | 191 |
WriteINIStr "$stack_instdir\php\php.ini" "GMP" "extension" "php_gmp.dll" |
192 |
IfErrors 0 +2 |
|
193 |
MessageBox MB_OK|MB_ICONEXCLAMATION "GMP was not automatically enabled in PHP. Logins will be several seconds slower." |
|
194 |
SectionEnd |
|
195 |
||
196 |
Section "YubiKey auth plugin" SEC02 |
|
197 |
SectionEnd |
|
198 |
||
199 |
Section "AjIM2" SEC03 |
|
200 |
SectionEnd |
|
201 |
||
202 |
Section "Admin Alerts" SEC04 |
|
203 |
SectionEnd |
|
204 |
||
205 |
Section "RSS Feeds" SEC06 |
|
206 |
SectionEnd |
|
207 |
||
208 |
Section "News Portal" SEC08 |
|
209 |
SectionEnd |
|
210 |
||
211 |
Section "Code syntax highlighting" SEC11 |
|
212 |
SectionEnd |
|
213 |
||
214 |
Section "Wiki functionality extensions" SEC12 |
|
215 |
SectionEnd |
|
216 |
||
217 |
Section -ConfigureApache |
|
218 |
DetailPrint "Configuring Apache web server" |
|
219 |
Call write_apache_config |
|
220 |
DetailPrint "Restarting Apache" |
|
221 |
nsExec::Exec '"$SYSDIR\net.exe" stop "$stack_typestackApache"' |
|
222 |
nsExec::Exec '"$SYSDIR\net.exe" start "$stack_typestackApache"' |
|
3 | 223 |
StrCmp $skip_install 1 0 +2 |
224 |
Return |
|
225 |
||
0 | 226 |
Call enano_write_kickstart_script |
227 |
Call enano_run_kickstart_script |
|
3 | 228 |
|
229 |
SetOutPath "$INSTDIR\apps\${PRODUCT_SHORTNAME}\scripts" |
|
230 |
File "inst-resources\selfdestruct.php" |
|
0 | 231 |
SectionEnd |
232 |
||
233 |
Section -InsertApplistEntry |
|
1
ac5bcb4e5284
PostgreSQL: skip applications.html stage (not supported in upstream wappstack)
Dan
parents:
0
diff
changeset
|
234 |
; Skip if this is WAPPStack, it doesn't have an applications.html. (!) |
ac5bcb4e5284
PostgreSQL: skip applications.html stage (not supported in upstream wappstack)
Dan
parents:
0
diff
changeset
|
235 |
StrCmp $stack_type "WAPP" 0 +2 |
ac5bcb4e5284
PostgreSQL: skip applications.html stage (not supported in upstream wappstack)
Dan
parents:
0
diff
changeset
|
236 |
Return |
ac5bcb4e5284
PostgreSQL: skip applications.html stage (not supported in upstream wappstack)
Dan
parents:
0
diff
changeset
|
237 |
|
0 | 238 |
Call enano_add_to_applist |
239 |
SectionEnd |
|
240 |
||
241 |
Section -AdditionalIcons |
|
242 |
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" |
|
243 |
CreateDirectory "$SMPROGRAMS\Enano CMS" |
|
244 |
CreateShortCut "$SMPROGRAMS\Enano CMS\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" |
|
3 | 245 |
CreateShortCut "$SMPROGRAMS\Enano CMS\Uninstall.lnk" "$INSTDIR\apps\${PRODUCT_SHORTNAME}\uninstall.exe" |
0 | 246 |
SectionEnd |
247 |
||
248 |
Section -Post |
|
249 |
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" |
|
3 | 250 |
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\apps\${PRODUCT_SHORTNAME}\uninstall.exe" |
0 | 251 |
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" |
252 |
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" |
|
253 |
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" |
|
254 |
SectionEnd |
|
255 |
||
256 |
; Section descriptions |
|
257 |
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
|
258 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Core components of Enano CMS, necessary to run Enano" |
|
259 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Adds support for Yubikey authentication" |
|
260 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "An AJAX chatbox sidebar gadget for Enano" |
|
261 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Provides a sidebar block that alerts you about unapproved comments, inactive users, and pages with requested deletion." |
|
262 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "Provides the ability to generate RSS feeds based on the latest page edits and comments. It also has a plugin API so plugins can add their own feeds." |
|
263 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC08} "Provides a portal with news and static content combined onto one page." |
|
264 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC11} "Parser extension that adds syntax highlighting support using the GeSHi highlighting engine." |
|
265 |
!insertmacro MUI_DESCRIPTION_TEXT ${SEC12} "Adds several parser extensions that provide MediaWiki-like behavior, including references (footnotes) and Table of Contents support." |
|
266 |
!insertmacro MUI_DESCRIPTION_TEXT ${SecGMP} "Enables PHP's GMP extension, which speeds up cryptographic operations." |
|
267 |
!insertmacro MUI_FUNCTION_DESCRIPTION_END |
|
268 |
||
5
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
269 |
Function .onInit |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
270 |
!ifdef UNINSTALL_DEBUG |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
271 |
WriteUninstaller "$EXEDIR\uninstall.exe" |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
272 |
MessageBox MB_OKCANCEL "Uninstaller written. OK to run installer, Cancel to quit" IDOK +2 |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
273 |
Abort |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
274 |
!endif |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
275 |
Call BNSetWAMPInstalledFlag |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
276 |
Call BNSetWAPPInstalledFlag |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
277 |
|
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
278 |
; If neither WAMP nor WAPP is installed, die |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
279 |
StrCmp $wampstack_installed 0 "" FoundStack |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
280 |
StrCmp $wampstack_installed 0 "" FoundStack |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
281 |
|
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
282 |
MessageBox MB_OK|MB_ICONEXCLAMATION "Setup could not find any BitNami stacks on your server.$\r$\n\ |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
283 |
$\r$\n\ |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
284 |
Please install a BitNami stack and re-run setup. You can download a BitNami stack for free from http://www.bitnami.org." |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
285 |
Abort |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
286 |
|
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
287 |
FoundStack: |
85800cb04cc5
Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents:
3
diff
changeset
|
288 |
FunctionEnd |
0 | 289 |
|
290 |
Function un.onInit |
|
3 | 291 |
|
292 |
StrCpy $stack_instdir "$INSTDIR\..\.." |
|
293 |
; this is probably a bad way to determine the stack type |
|
294 |
ClearErrors |
|
295 |
StrCpy $stack_type "wamp" |
|
296 |
ReadINIStr $0 "$stack_instdir\properties.ini" "MySQL" "mysql_port" |
|
297 |
IfErrors 0 +2 |
|
298 |
StrCpy $stack_type "wapp" |
|
299 |
||
0 | 300 |
FunctionEnd |
301 |
||
302 |
Section Uninstall |
|
3 | 303 |
|
304 |
; Confirm uninstall |
|
305 |
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you really sure you want to uninstall ${PRODUCT_NAME}?$\r$\n\ |
|
306 |
$\r$\n\ |
|
307 |
Removing ${PRODUCT_NAME} will delete everything that it installed, including your database. If you do not want to \ |
|
308 |
lose data, cancel this uninstaller and back up your database before uninstalling.$\r$\n\ |
|
309 |
$\r$\n\ |
|
310 |
The ${PRODUCT_NAME} uninstaller also deletes any uploaded files, plugins and themes that you may have installed." IDYES +2 |
|
311 |
Abort |
|
312 |
||
0 | 313 |
Delete "$INSTDIR\apps\${PRODUCT_SHORTNAME}\${PRODUCT_NAME}.url" |
314 |
||
3 | 315 |
; Remove from Apache config |
316 |
DetailPrint "Removing ${PRODUCT_NAME} from Apache configuration" |
|
317 |
Call un.disable_in_apache_config |
|
318 |
||
319 |
; Remove from applications.html |
|
320 |
; SON OF A BITCH. BitNami, please, PLEASE make applications.html a PHP script that includes all files in a directory. |
|
321 |
DetailPrint "Removing ${PRODUCT_NAME} from applications.html" |
|
322 |
Call un.disable_in_applications_html |
|
323 |
||
324 |
; Restart Apache |
|
325 |
DetailPrint "Restarting Apache" |
|
326 |
nsExec::Exec '"$SYSDIR\net.exe" stop "$stack_typestackApache"' |
|
327 |
nsExec::Exec '"$SYSDIR\net.exe" start "$stack_typestackApache"' |
|
328 |
||
329 |
DetailPrint "Uninstalling database" |
|
330 |
nsExec::ExecToLog '"$stack_instdir\php\php.exe" "$INSTDIR\scripts\selfdestruct.php"' |
|
331 |
||
332 |
DetailPrint "Deleting files..." |
|
333 |
SetDetailsPrint listonly |
|
0 | 334 |
!insertmacro Core_Uninstall |
3 | 335 |
SetDetailsPrint both |
0 | 336 |
|
337 |
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" |
|
338 |
SetAutoClose true |
|
339 |
SectionEnd |
|
340 |
||
341 |
; Version Information |
|
342 |
||
6
6016fd9e848f
A couple minor fixes: more flexible version numbering; added a CreateDirectory before uninstaller generation (whoops)
Dan
parents:
5
diff
changeset
|
343 |
VIProductVersion "${PRODUCT_VERSION}.0" |
0 | 344 |
VIAddVersionKey /LANG=1033 "ProductName" "Enano CMS" |
345 |
VIAddVersionKey /LANG=1033 "Setup Information" "Enano CMS installer module for Windows Apache stacks" |
|
346 |
VIAddVersionKey /LANG=1033 "Comments" "This installer contains a beta build of Enano CMS, use with caution!" |
|
347 |
VIAddVersionKey /LANG=1033 "Publisher Name" "Neal Gompa (King InuYasha), Enano CMS Project" |
|
348 |
VIAddVersionKey /LANG=1033 "LegalCopyright" "©2009 Enano CMS Project" |
|
349 |
VIAddVersionKey /LANG=1033 "FileDescription" "Enano - The CMS that focuses on what matters most: content." |
|
350 |
VIAddVersionKey /LANG=1033 "FileVersion" "${PRODUCT_VERSION}" |