changeset 16783:58904374db06

Fix some installer issues (#416, #433)
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 02 May 2007 05:03:47 +0000
parents d7ad8013b914
children 9b74ac7ea9c7
files pidgin/win32/nsis/pidgin-installer.nsi
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/win32/nsis/pidgin-installer.nsi	Wed May 02 04:42:06 2007 +0000
+++ b/pidgin/win32/nsis/pidgin-installer.nsi	Wed May 02 05:03:47 2007 +0000
@@ -260,7 +260,7 @@
   ReadRegStr $STARTUP_RUN_KEY HKCU "${STARTUP_RUN_KEY}" $R7
   IfErrors +3
   StrCpy $STARTUP_RUN_KEY "HKCU"
-  Goto +4
+  Goto +5
   ClearErrors
   ReadRegStr $STARTUP_RUN_KEY HKLM "${STARTUP_RUN_KEY}" $R7
   IfErrors +2
@@ -282,7 +282,7 @@
 
   ; If a previous version exists, remove it
   try_uninstall:
-    StrCmp $R1 "" done
+    StrCmp $R1 "" no_version_found
       ; Version key started with 0.60a3. Prior versions can't be
       ; automatically uninstalled.
       StrCmp $R2 "" uninstall_problem
@@ -306,16 +306,18 @@
               Delete "$TEMP\$R6"
               Goto uninstall_problem
 
-        uninstall_problem:
+        no_version_found:
+          ;We've already tried to fallback to an old gaim instance
+          StrCmp $R7 "Gaim" done
           ; If we couldn't uninstall Pidgin, try to uninstall Gaim
-          StrCmp $R4 ${PIDGIN_REG_KEY} cannot_uninstall
+          StrCpy $STARTUP_RUN_KEY "NONE"
           StrCpy $R4 ${OLD_GAIM_REG_KEY}
           StrCpy $R5 ${OLD_GAIM_UNINSTALL_KEY}
           StrCpy $R6 ${OLD_GAIM_UNINST_EXE}
           StrCpy $R7 "Gaim"
           Goto start_comparison
 
-          cannot_uninstall:
+        uninstall_problem:
           ; We can't uninstall.  Either the user must manually uninstall or we ignore and reinstall over it.
           MessageBox MB_OKCANCEL $(PIDGIN_PROMPT_CONTINUE_WITHOUT_UNINSTALL) /SD IDOK IDOK done
           Quit