Mercurial > pidgin
comparison gaim-installer.nsi @ 14376:b2d0b4ca2cf3
[gaim-migrate @ 17082]
It really isn't smart for us to blow away the previous install directory (we do ask nicely, but it still isn't good) if the uninstaller for the previous version fails, so now we offer the choice between "continue regardless" or "cancel installing".
It would really be ideal if we could get these translations done through gettext or something.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 30 Aug 2006 02:40:56 +0000 |
parents | d10386bc5bc9 |
children | f5f2c3948b48 |
comparison
equal
deleted
inserted
replaced
14375:f597127368de | 14376:b2d0b4ca2cf3 |
---|---|
222 ClearErrors | 222 ClearErrors |
223 ReadRegStr $STARTUP_RUN_KEY HKCU "${GAIM_STARTUP_RUN_KEY}" "Gaim" | 223 ReadRegStr $STARTUP_RUN_KEY HKCU "${GAIM_STARTUP_RUN_KEY}" "Gaim" |
224 IfErrors +3 | 224 IfErrors +3 |
225 StrCpy $STARTUP_RUN_KEY "HKCU" | 225 StrCpy $STARTUP_RUN_KEY "HKCU" |
226 Goto +4 | 226 Goto +4 |
227 ClearErrors | |
227 ReadRegStr $STARTUP_RUN_KEY HKLM "${GAIM_STARTUP_RUN_KEY}" "Gaim" | 228 ReadRegStr $STARTUP_RUN_KEY HKLM "${GAIM_STARTUP_RUN_KEY}" "Gaim" |
228 IfErrors +2 | 229 IfErrors +2 |
229 StrCpy $STARTUP_RUN_KEY "HKLM" | 230 StrCpy $STARTUP_RUN_KEY "HKLM" |
230 | 231 |
231 StrCmp $R0 "HKLM" gaim_hklm | 232 StrCmp $R0 "HKLM" gaim_hklm |
267 exec_error: | 268 exec_error: |
268 Delete "$TEMP\${GAIM_UNINST_EXE}" | 269 Delete "$TEMP\${GAIM_UNINST_EXE}" |
269 Goto uninstall_problem | 270 Goto uninstall_problem |
270 | 271 |
271 uninstall_problem: | 272 uninstall_problem: |
272 ; In this case just wipe out previous Gaim install dir.. | 273 ; We can't uninstall. Either the user must manually uninstall or we ignore and reinstall over it. |
273 ; We get here because versions 0.60a1 and 0.60a2 don't have versions set in the registry | 274 MessageBox MB_OKCANCEL $(GAIM_PROMPT_CONTINUE_WITHOUT_UNINSTALL) /SD IDOK IDOK done |
274 ; and versions 0.60 and lower did not correctly set the uninstall reg string | 275 Quit |
275 ; (the string was set in quotes) | |
276 IfSilent do_wipeout | |
277 MessageBox MB_YESNO $(GAIM_PROMPT_WIPEOUT) IDYES do_wipeout IDNO cancel_install | |
278 cancel_install: | |
279 Quit | |
280 | |
281 do_wipeout: | |
282 StrCmp $R0 "HKLM" gaim_del_lm_reg gaim_del_cu_reg | |
283 gaim_del_cu_reg: | |
284 DeleteRegKey HKCU ${GAIM_REG_KEY} | |
285 Goto uninstall_prob_cont | |
286 gaim_del_lm_reg: | |
287 DeleteRegKey HKLM ${GAIM_REG_KEY} | |
288 | |
289 uninstall_prob_cont: | |
290 RMDir /r "$R1" | |
291 | |
292 done: | 276 done: |
293 SectionEnd | 277 SectionEnd |
294 | 278 |
295 | 279 |
296 ;-------------------------------- | 280 ;-------------------------------- |
325 ExecWait '"$TEMP\gtk-runtime.exe" /L=$LANGUAGE $ISSILENT /D=$GTK_FOLDER' | 309 ExecWait '"$TEMP\gtk-runtime.exe" /L=$LANGUAGE $ISSILENT /D=$GTK_FOLDER' |
326 Goto gtk_install_cont | 310 Goto gtk_install_cont |
327 | 311 |
328 upgrade_gtk: | 312 upgrade_gtk: |
329 StrCpy $GTK_FOLDER $R6 | 313 StrCpy $GTK_FOLDER $R6 |
330 IfSilent skip_mb | 314 MessageBox MB_YESNO $(GTK_UPGRADE_PROMPT) /SD IDYES IDNO done |
331 MessageBox MB_YESNO $(GTK_UPGRADE_PROMPT) IDNO done | |
332 skip_mb: | |
333 ClearErrors | 315 ClearErrors |
334 ExecWait '"$TEMP\gtk-runtime.exe" /L=$LANGUAGE $ISSILENT' | 316 ExecWait '"$TEMP\gtk-runtime.exe" /L=$LANGUAGE $ISSILENT' |
335 Goto gtk_install_cont | 317 Goto gtk_install_cont |
336 | 318 |
337 gtk_install_cont: | 319 gtk_install_cont: |
339 StrCpy $R5 "1" ; marker that says we installed... | 321 StrCpy $R5 "1" ; marker that says we installed... |
340 Goto done | 322 Goto done |
341 | 323 |
342 gtk_install_error: | 324 gtk_install_error: |
343 Delete "$TEMP\gtk-runtime.exe" | 325 Delete "$TEMP\gtk-runtime.exe" |
344 IfSilent skip_mb1 | 326 MessageBox MB_OK $(GTK_INSTALL_ERROR) /SD IDOK |
345 MessageBox MB_OK $(GTK_INSTALL_ERROR) IDOK | |
346 skip_mb1: | |
347 Quit | 327 Quit |
348 | 328 |
349 have_gtk: | 329 have_gtk: |
350 StrCpy $GTK_FOLDER $R6 | 330 StrCpy $GTK_FOLDER $R6 |
351 StrCmp $R1 "NONE" done ; If we have no rights.. can't re-install.. | 331 StrCmp $R1 "NONE" done ; If we have no rights.. can't re-install.. |
769 Delete "$DESKTOP\Gaim.lnk" | 749 Delete "$DESKTOP\Gaim.lnk" |
770 | 750 |
771 Goto done | 751 Goto done |
772 | 752 |
773 cant_uninstall: | 753 cant_uninstall: |
774 IfSilent skip_mb | 754 MessageBox MB_OK $(un.GAIM_UNINSTALL_ERROR_1) /SD IDOK |
775 MessageBox MB_OK $(un.GAIM_UNINSTALL_ERROR_1) IDOK | |
776 skip_mb: | |
777 Quit | 755 Quit |
778 | 756 |
779 no_rights: | 757 no_rights: |
780 IfSilent skip_mb1 | 758 MessageBox MB_OK $(un.GAIM_UNINSTALL_ERROR_2) /SD IDOK |
781 MessageBox MB_OK $(un.GAIM_UNINSTALL_ERROR_2) IDOK | |
782 skip_mb1: | |
783 Quit | 759 Quit |
784 | 760 |
785 done: | 761 done: |
786 SectionEnd ; end of uninstall section | 762 SectionEnd ; end of uninstall section |
787 | 763 |
899 hklm: | 875 hklm: |
900 ReadRegStr $1 HKLM ${GTK_REG_KEY} "Path" | 876 ReadRegStr $1 HKLM ${GTK_REG_KEY} "Path" |
901 Goto done | 877 Goto done |
902 | 878 |
903 no_rights: | 879 no_rights: |
904 IfSilent skip_mb | 880 MessageBox MB_OK $(GTK_NO_THEME_INSTALL_RIGHTS) /SD IDOK |
905 MessageBox MB_OK $(GTK_NO_THEME_INSTALL_RIGHTS) IDOK | |
906 skip_mb: | |
907 StrCpy $1 "" | 881 StrCpy $1 "" |
908 | 882 |
909 done: | 883 done: |
910 Pop $0 | 884 Pop $0 |
911 Exch $1 | 885 Exch $1 |
1207 !macro RunCheckMacro UN | 1181 !macro RunCheckMacro UN |
1208 Function ${UN}RunCheck | 1182 Function ${UN}RunCheck |
1209 Push $R0 | 1183 Push $R0 |
1210 System::Call 'kernel32::OpenMutex(i 2031617, b 0, t "gaim_is_running") i .R0' | 1184 System::Call 'kernel32::OpenMutex(i 2031617, b 0, t "gaim_is_running") i .R0' |
1211 IntCmp $R0 0 done | 1185 IntCmp $R0 0 done |
1212 MessageBox MB_OK|MB_ICONEXCLAMATION $(GAIM_IS_RUNNING) IDOK | 1186 MessageBox MB_OK|MB_ICONEXCLAMATION $(GAIM_IS_RUNNING) /SD IDOK |
1213 Abort | 1187 Abort |
1214 done: | 1188 done: |
1215 Pop $R0 | 1189 Pop $R0 |
1216 FunctionEnd | 1190 FunctionEnd |
1217 !macroend | 1191 !macroend |
1221 Function .onInit | 1195 Function .onInit |
1222 Push $R0 | 1196 Push $R0 |
1223 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "gaim_installer_running") i .r1 ?e' | 1197 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "gaim_installer_running") i .r1 ?e' |
1224 Pop $R0 | 1198 Pop $R0 |
1225 StrCmp $R0 0 +3 | 1199 StrCmp $R0 0 +3 |
1226 MessageBox MB_OK|MB_ICONEXCLAMATION $(INSTALLER_IS_RUNNING) | 1200 MessageBox MB_OK|MB_ICONEXCLAMATION $(INSTALLER_IS_RUNNING) /SD IDOK |
1227 Abort | 1201 Abort |
1228 Call RunCheck | 1202 Call RunCheck |
1229 StrCpy $name "Gaim ${GAIM_VERSION}" | 1203 StrCpy $name "Gaim ${GAIM_VERSION}" |
1230 StrCpy $GTK_THEME_SEL ${SecGtkWimp} | 1204 StrCpy $GTK_THEME_SEL ${SecGtkWimp} |
1231 StrCpy $SPELLCHECK_SEL "" | 1205 StrCpy $SPELLCHECK_SEL "" |
1261 ; If gaim is currently intalled, we should default to where it is currently installed | 1235 ; If gaim is currently intalled, we should default to where it is currently installed |
1262 ClearErrors | 1236 ClearErrors |
1263 ReadRegStr $INSTDIR HKCU "${GAIM_REG_KEY}" "" | 1237 ReadRegStr $INSTDIR HKCU "${GAIM_REG_KEY}" "" |
1264 IfErrors +2 | 1238 IfErrors +2 |
1265 StrCmp $INSTDIR "" 0 instdir_done | 1239 StrCmp $INSTDIR "" 0 instdir_done |
1240 ClearErrors | |
1266 ReadRegStr $INSTDIR HKLM "${GAIM_REG_KEY}" "" | 1241 ReadRegStr $INSTDIR HKLM "${GAIM_REG_KEY}" "" |
1267 IfErrors +2 | 1242 IfErrors +2 |
1268 StrCmp $INSTDIR "" 0 instdir_done | 1243 StrCmp $INSTDIR "" 0 instdir_done |
1269 | 1244 |
1270 Call CheckUserInstallRights | 1245 Call CheckUserInstallRights |
1373 Pop $R0 | 1348 Pop $R0 |
1374 Pop $GTK_FOLDER | 1349 Pop $GTK_FOLDER |
1375 | 1350 |
1376 StrCmp $R0 "0" have_gtk need_gtk | 1351 StrCmp $R0 "0" have_gtk need_gtk |
1377 need_gtk: | 1352 need_gtk: |
1378 IfSilent skip_mb | 1353 MessageBox MB_OK $(GTK_INSTALLER_NEEDED) /SD IDOK |
1379 MessageBox MB_OK $(GTK_INSTALLER_NEEDED) IDOK | |
1380 skip_mb: | |
1381 Quit | 1354 Quit |
1382 have_gtk: | 1355 have_gtk: |
1383 Pop $R0 | 1356 Pop $R0 |
1384 FunctionEnd | 1357 FunctionEnd |
1385 !endif | 1358 !endif |
1430 StrCpy $name "Gaim ${GAIM_VERSION}" | 1403 StrCpy $name "Gaim ${GAIM_VERSION}" |
1431 Push $GTK_FOLDER | 1404 Push $GTK_FOLDER |
1432 Call VerifyDir | 1405 Call VerifyDir |
1433 Pop $R0 | 1406 Pop $R0 |
1434 StrCmp $R0 "0" 0 done | 1407 StrCmp $R0 "0" 0 done |
1435 IfSilent skip_mb | 1408 MessageBox MB_OK $(GTK_BAD_INSTALL_PATH) /SD IDOK |
1436 MessageBox MB_OK $(GTK_BAD_INSTALL_PATH) IDOK | |
1437 skip_mb: | |
1438 Abort | 1409 Abort |
1439 done: | 1410 done: |
1440 Pop $R0 | 1411 Pop $R0 |
1441 FunctionEnd | 1412 FunctionEnd |
1442 !endif | 1413 !endif |
1766 retry: | 1737 retry: |
1767 Call InstallAspell | 1738 Call InstallAspell |
1768 Pop $R1 | 1739 Pop $R1 |
1769 StrCmp $R1 "" +3 | 1740 StrCmp $R1 "" +3 |
1770 StrCmp $R1 "cancel" done | 1741 StrCmp $R1 "cancel" done |
1771 MessageBox MB_RETRYCANCEL "$(GAIM_SPELLCHECK_ERROR) : $R1" IDRETRY retry IDCANCEL done | 1742 MessageBox MB_RETRYCANCEL "$(GAIM_SPELLCHECK_ERROR) : $R1" /SD IDCANCEL IDRETRY retry IDCANCEL done |
1772 | 1743 |
1773 retry_dict: | 1744 retry_dict: |
1774 Push $R0 | 1745 Push $R0 |
1775 Call InstallAspellDictionary | 1746 Call InstallAspellDictionary |
1776 Pop $R1 | 1747 Pop $R1 |
1777 StrCmp $R1 "" +3 | 1748 StrCmp $R1 "" +3 |
1778 StrCmp $R1 "cancel" done | 1749 StrCmp $R1 "cancel" done |
1779 MessageBox MB_RETRYCANCEL "$(GAIM_SPELLCHECK_DICT_ERROR) : $R1" IDRETRY retry_dict | 1750 MessageBox MB_RETRYCANCEL "$(GAIM_SPELLCHECK_DICT_ERROR) : $R1" /SD IDCANCEL IDRETRY retry_dict |
1780 | 1751 |
1781 done: | 1752 done: |
1782 | 1753 |
1783 Pop $R1 | 1754 Pop $R1 |
1784 Pop $R0 | 1755 Pop $R0 |