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