--- a/purple-plugin-pack-installer.nsi Wed Sep 29 22:57:55 2010 -0400
+++ b/purple-plugin-pack-installer.nsi Wed Sep 29 23:05:00 2010 -0400
@@ -14,13 +14,13 @@
;--------------------------------
- Name "Pidgin Guifications ${GUIFICATIONS_VERSION}"
+ Name "Pidgin Guifications ${PLUGINPACK_VERSION}" - OutFile "pidgin-guifications-${GUIFICATIONS_VERSION}.exe"
+ OutFile "purple-plugin-pack-${PLUGINPACK_VERSION}.exe" ;The Default Installation Directory
InstallDir "$PROGRAMFILES\pidgin"
@@ -33,14 +33,14 @@
;Reserve files used in .onInit for faster start-up
!insertmacro MUI_RESERVEFILE_LANGDLL
- !define GUIFICATIONS_UNINST_EXE "pidgin-guifications-uninst.exe"
- !define GUIFICATIONS_DLL "guifications.dll"
- !define GUIFICATIONS_UNINSTALL_LNK "Guifications Uninstall.lnk"
+ !define PLUGINPACK_UNINST_EXE "purple-plugin-pack-uninst.exe" + !define PLUGINPACK_DLL "plugin_pack.dll" + !define PLUGINPACK_UNINSTALL_LNK "Guifications Uninstall.lnk" ;--------------------------------
- !define GUIFICATIONS_REG_KEY "SOFTWARE\pidgin-guifications"
- !define GUIFICATIONS_UNINSTALL_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\pidgin-guifications"
+ !define PLUGINPACK_REG_KEY "SOFTWARE\purple-plugin-pack" + !define PLUGINPACK_UNINSTALL_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\purple-plugin-pack" ;-------------------------------
; Pidgin Plugin installer helper stuff
@@ -53,11 +53,11 @@
!define MUI_UNICON .\nsis\install.ico
!define MUI_HEADERIMAGE_BITMAP "nsis\header.bmp"
- !define MUI_CUSTOMFUNCTION_GUIINIT gf_checkPidginVersion
+ !define MUI_CUSTOMFUNCTION_GUIINIT ppp_checkPidginVersion !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
- !define MUI_LANGDLL_REGISTRY_KEY ${GUIFICATIONS_REG_KEY}
+ !define MUI_LANGDLL_REGISTRY_KEY ${PLUGINPACK_REG_KEY} !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
@@ -108,15 +108,15 @@
StrCmp $R0 "HKCU" rights_hkcu done
- ReadRegStr $R1 HKCU "${GUIFICATIONS_REG_KEY}" ""
- ReadRegStr $R2 HKCU "${GUIFICATIONS_REG_KEY}" "Version"
- ReadRegStr $R3 HKCU "${GUIFICATIONS_UNINSTALL_KEY}" "UninstallString"
+ ReadRegStr $R1 HKCU "${PLUGINPACK_REG_KEY}" "" + ReadRegStr $R2 HKCU "${PLUGINPACK_REG_KEY}" "Version" + ReadRegStr $R3 HKCU "${PLUGINPACK_UNINSTALL_KEY}" "UninstallString" - ReadRegStr $R1 HKLM "${GUIFICATIONS_REG_KEY}" ""
- ReadRegStr $R2 HKLM "${GUIFICATIONS_REG_KEY}" "Version"
- ReadRegStr $R3 HKLM "${GUIFICATIONS_UNINSTALL_KEY}" "UninstallString"
+ ReadRegStr $R1 HKLM "${PLUGINPACK_REG_KEY}" "" + ReadRegStr $R2 HKLM "${PLUGINPACK_REG_KEY}" "Version" + ReadRegStr $R3 HKLM "${PLUGINPACK_UNINSTALL_KEY}" "UninstallString" ; If previous version exists .. remove
@@ -127,39 +127,39 @@
; Need to copy uninstaller outside of the install dir
- CopyFiles /SILENT $R3 "$TEMP\${GUIFICATIONS_UNINST_EXE}"
+ CopyFiles /SILENT $R3 "$TEMP\${PLUGINPACK_UNINST_EXE}" IfErrors uninstall_problem
- ExecWait '"$TEMP\${GUIFICATIONS_UNINST_EXE}" /S _?=$R1'
+ ExecWait '"$TEMP\${PLUGINPACK_UNINST_EXE}" /S _?=$R1' - Delete "$TEMP\${GUIFICATIONS_UNINST_EXE}"
+ Delete "$TEMP\${PLUGINPACK_UNINST_EXE}" - Delete "$TEMP\${GUIFICATIONS_UNINST_EXE}"
+ Delete "$TEMP\${PLUGINPACK_UNINST_EXE}" ; Just delete the plugin and uninstaller, and remove Registry key
- MessageBox MB_YESNO $(GUIFICATIONS_PROMPT_WIPEOUT) IDYES do_wipeout IDNO cancel_install
+ MessageBox MB_YESNO $(PLUGINPACK_PROMPT_WIPEOUT) IDYES do_wipeout IDNO cancel_install StrCmp $R0 "HKLM" del_lm_reg del_cu_reg
- DeleteRegKey HKCU ${GUIFICATIONS_REG_KEY}
+ DeleteRegKey HKCU ${PLUGINPACK_REG_KEY} - DeleteRegKey HKLM ${GUIFICATIONS_REG_KEY}
+ DeleteRegKey HKLM ${PLUGINPACK_REG_KEY} - Delete "$R1\plugins\${GUIFICATIONS_DLL}"
+ Delete "$R1\plugins\${PLUGINPACK_DLL}" - RMDir /r "$R1\pixmaps\pidgin\guifications"
+ RMDir /r "$R1\pixmaps\pidgin\plugin_pack" @@ -167,7 +167,7 @@
SetOutPath "$INSTDIR\locale\${LANG}\LC_MESSAGES"
- File /oname=guifications.mo po\${LANG}.gmo
+ File /oname=plugin_pack.mo po\${LANG}.gmo @@ -179,23 +179,23 @@
; Write the version registry keys:
- WriteRegStr HKLM ${GUIFICATIONS_REG_KEY} "" "$INSTDIR"
- WriteRegStr HKLM ${GUIFICATIONS_REG_KEY} "Version" "${GUIFICATIONS_VERSION}"
+ WriteRegStr HKLM ${PLUGINPACK_REG_KEY} "" "$INSTDIR" + WriteRegStr HKLM ${PLUGINPACK_REG_KEY} "Version" "${PLUGINPACK_VERSION}" ; Write the uninstall keys for Windows
- WriteRegStr HKLM ${GUIFICATIONS_UNINSTALL_KEY} "DisplayName" "$(GUIFICATIONS_UNINSTALL_DESC)"
- WriteRegStr HKLM ${GUIFICATIONS_UNINSTALL_KEY} "UninstallString" "$INSTDIR\${GUIFICATIONS_UNINST_EXE}"
+ WriteRegStr HKLM ${PLUGINPACK_UNINSTALL_KEY} "DisplayName" "$(PLUGINPACK_UNINSTALL_DESC)" + WriteRegStr HKLM ${PLUGINPACK_UNINSTALL_KEY} "UninstallString" "$INSTDIR\${PLUGINPACK_UNINST_EXE}" ; Write the version registry keys:
- WriteRegStr HKCU ${GUIFICATIONS_REG_KEY} "" "$INSTDIR"
- WriteRegStr HKCU ${GUIFICATIONS_REG_KEY} "Version" "${GUIFICATIONS_VERSION}"
+ WriteRegStr HKCU ${PLUGINPACK_REG_KEY} "" "$INSTDIR" + WriteRegStr HKCU ${PLUGINPACK_REG_KEY} "Version" "${PLUGINPACK_VERSION}" ; Write the uninstall keys for Windows
- WriteRegStr HKCU ${GUIFICATIONS_UNINSTALL_KEY} "DisplayName" "$(GUIFICATIONS_UNINSTALL_DESC)"
- WriteRegStr HKCU ${GUIFICATIONS_UNINSTALL_KEY} "UninstallString" "$INSTDIR\${GUIFICATIONS_UNINST_EXE}"
+ WriteRegStr HKCU ${PLUGINPACK_UNINSTALL_KEY} "DisplayName" "$(PLUGINPACK_UNINSTALL_DESC)" + WriteRegStr HKCU ${PLUGINPACK_UNINSTALL_KEY} "UninstallString" "$INSTDIR\${PLUGINPACK_UNINST_EXE}" @@ -205,18 +205,18 @@
SetOutPath "$INSTDIR\plugins"
- File "src\${GUIFICATIONS_DLL}"
+ File "src\${PLUGINPACK_DLL}" - SetOutPath "$INSTDIR\pixmaps\pidgin\guifications\conf"
+ SetOutPath "$INSTDIR\pixmaps\pidgin\plugin_pack\conf" - SetOutPath "$INSTDIR\pixmaps\pidgin\guifications\themes\default"
+ SetOutPath "$INSTDIR\pixmaps\pidgin\plugin_pack\themes\default" File "themes\default\theme.xml"
File "themes\default\background.png"
- SetOutPath "$INSTDIR\pixmaps\pidgin\guifications\themes\mini"
+ SetOutPath "$INSTDIR\pixmaps\pidgin\plugin_pack\themes\mini" File "themes\mini\theme.xml"
File "themes\mini\background.png"
- SetOutPath "$INSTDIR\pixmaps\pidgin\guifications\themes\Penguins"
+ SetOutPath "$INSTDIR\pixmaps\pidgin\plugin_pack\themes\Penguins" File "themes\Penguins\theme.xml"
File "themes\Penguins\penguin.png"
@@ -248,8 +248,8 @@
!insertmacro INSTALL_GMO "zh_TW"
- CreateShortCut "$SMPROGRAMS\Pidgin\${GUIFICATIONS_UNINSTALL_LNK}" "$INSTDIR\${GUIFICATIONS_UNINST_EXE}"
- WriteUninstaller "$INSTDIR\${GUIFICATIONS_UNINST_EXE}"
+ CreateShortCut "$SMPROGRAMS\Pidgin\${PLUGINPACK_UNINSTALL_LNK}" "$INSTDIR\${PLUGINPACK_UNINST_EXE}" + WriteUninstaller "$INSTDIR\${PLUGINPACK_UNINST_EXE}" @@ -262,30 +262,30 @@
StrCmp $R0 "HKCU" try_hkcu try_hklm
- ReadRegStr $R0 HKCU "${GUIFICATIONS_REG_KEY}" ""
+ ReadRegStr $R0 HKCU "${PLUGINPACK_REG_KEY}" "" StrCmp $R0 $INSTDIR 0 cant_uninstall
; HKCU install path matches our INSTDIR.. so uninstall
- DeleteRegKey HKCU "${GUIFICATIONS_REG_KEY}"
- DeleteRegKey HKCU "${GUIFICATIONS_UNINSTALL_KEY}"
+ DeleteRegKey HKCU "${PLUGINPACK_REG_KEY}" + DeleteRegKey HKCU "${PLUGINPACK_UNINSTALL_KEY}" - ReadRegStr $R0 HKLM "${GUIFICATIONS_REG_KEY}" ""
+ ReadRegStr $R0 HKLM "${PLUGINPACK_REG_KEY}" "" StrCmp $R0 $INSTDIR 0 try_hkcu
; HKLM install path matches our INSTDIR.. so uninstall
- DeleteRegKey HKLM "${GUIFICATIONS_REG_KEY}"
- DeleteRegKey HKLM "${GUIFICATIONS_UNINSTALL_KEY}"
+ DeleteRegKey HKLM "${PLUGINPACK_REG_KEY}" + DeleteRegKey HKLM "${PLUGINPACK_UNINSTALL_KEY}" ; Sets start menu and desktop scope to all users..
- Delete "$INSTDIR\plugins\${GUIFICATIONS_DLL}"
+ Delete "$INSTDIR\plugins\${PLUGINPACK_DLL}" - RMDir /r "$INSTDIR\pixmaps\pidgin\guifications"
+ RMDir /r "$INSTDIR\pixmaps\pidgin\plugin_pack" - ; loop through locale dirs and try to delete any guifications translations
+ ; loop through locale dirs and try to delete any plugin_pack translations FindFirst $R1 $R2 "$INSTDIR\locale\*"
IfErrors doneFindingTranslations
@@ -294,8 +294,8 @@
StrCmp $R2 "." readNextTranslationDir
StrCmp $R2 ".." readNextTranslationDir
- IfFileExists "$INSTDIR\locale\$R2\LC_MESSAGES\guifications.mo" +1 readNextTranslationDir
- Delete "$INSTDIR\locale\$R2\LC_MESSAGES\guifications.mo"
+ IfFileExists "$INSTDIR\locale\$R2\LC_MESSAGES\plugin_pack.mo" +1 readNextTranslationDir + Delete "$INSTDIR\locale\$R2\LC_MESSAGES\plugin_pack.mo" RMDir "$INSTDIR\locale\$R2\LC_MESSAGES"
RMDir "$INSTDIR\locale\$R2"
@@ -308,9 +308,9 @@
- Delete "$INSTDIR\${GUIFICATIONS_UNINST_EXE}"
+ Delete "$INSTDIR\${PLUGINPACK_UNINST_EXE}" - Delete "$SMPROGRAMS\Pidgin\${GUIFICATIONS_UNINSTALL_LNK}"
+ Delete "$SMPROGRAMS\Pidgin\${PLUGINPACK_UNINSTALL_LNK}" ; try to delete the Pidgin directories, in case it has already uninstalled
@@ -320,11 +320,11 @@
- MessageBox MB_OK $(un.GUIFICATIONS_UNINSTALL_ERROR_1) IDOK
+ MessageBox MB_OK $(un.PLUGINPACK_UNINSTALL_ERROR_1) IDOK - MessageBox MB_OK $(un.GUIFICATIONS_UNINSTALL_ERROR_2) IDOK
+ MessageBox MB_OK $(un.PLUGINPACK_UNINSTALL_ERROR_2) IDOK @@ -357,15 +357,15 @@
-; Check that the currently installed pidgin version is compatible with the version of guifications we are installing
-Function gf_checkPidginVersion
+; Check that the currently installed pidgin version is compatible with the version of Purple Plugin Pack we are installing +Function ppp_checkPidginVersion - StrCmp $R0 ${PIDGIN_VERSION_OK} gf_checkPidginVersion_OK
+ StrCmp $R0 ${PIDGIN_VERSION_OK} ppp_checkPidginVersion_OK StrCmp $R0 ${PIDGIN_VERSION_INCOMPATIBLE} +1 +6
@@ -375,7 +375,7 @@
MessageBox MB_OK|MB_ICONSTOP "$(NO_PIDGIN_VERSION)"
- gf_checkPidginVersion_OK:
+ ppp_checkPidginVersion_OK: