# HG changeset patch # User Daniel Atallah # Date 1180495076 0 # Node ID a3e68bb05594cf3297c009f53e178e9cef001fe8 # Parent 93ecfed58d7d265a6a8d5f7b6ee30fefcb19b038 Patch from Amir Szekely to make the installer start up faster and use NSIS' built-in Windows version checking. Fixes #1289 (Thanks, Amir) diff -r 93ecfed58d7d -r a3e68bb05594 COPYRIGHT --- a/COPYRIGHT Wed May 30 03:02:21 2007 +0000 +++ b/COPYRIGHT Wed May 30 03:17:56 2007 +0000 @@ -336,6 +336,7 @@ David Stoddard Sun Microsystems MÃ¥rten Svantesson (fursten) +Amir Szekely (kichik) Robert T. Greg Taeger Peter Tang diff -r 93ecfed58d7d -r a3e68bb05594 pidgin/win32/nsis/pidgin-installer.nsi --- a/pidgin/win32/nsis/pidgin-installer.nsi Wed May 30 03:02:21 2007 +0000 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Wed May 30 03:17:56 2007 +0000 @@ -2,7 +2,7 @@ ; Original Author: Herman Bloggs ; Updated By: Daniel Atallah -; NOTE: this .NSI script is intended for NSIS 2.08 +; NOTE: this .NSI script is intended for NSIS 2.27 ; ;-------------------------------- @@ -38,6 +38,8 @@ !include "MUI.nsh" !include "Sections.nsh" +!include "WinVer.nsh" +!include "LogicLib.nsh" !include "FileFunc.nsh" !insertmacro GetParameters @@ -94,6 +96,13 @@ !endif ;-------------------------------- +;Reserve files used in .onInit +;for faster start-up +ReserveFile "${NSISDIR}\Plugins\System.dll" +!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS +!insertmacro MUI_RESERVEFILE_LANGDLL + +;-------------------------------- ;Modern UI Configuration !define MUI_ICON ".\pixmaps\pidgin-install.ico" @@ -481,12 +490,12 @@ ; If this is under NT4, delete the SILC support stuff ; there is a bug that will prevent any account from connecting ; See https://lists.silcnet.org/pipermail/silc-devel/2005-January/001588.html - Call GetWindowsVersion - Pop $R2 - StrCmp $R2 "NT 4.0" +1 +4 - Delete "$INSTDIR\plugins\libsilc.dll" - Delete "$INSTDIR\silcclient.dll" - Delete "$INSTDIR\silc.dll" + ${If} ${IsNT} + ${AndIf} ${IsWinNT4} + Delete "$INSTDIR\plugins\libsilc.dll" + Delete "$INSTDIR\silcclient.dll" + Delete "$INSTDIR\silc.dll" + ${EndIf} SetOutPath "$INSTDIR" @@ -1310,19 +1319,13 @@ gtk_not_mandatory: ; If on Win95/98/ME warn them that the GTK+ version wont work - Call GetWindowsVersion - Pop $R1 - StrCmp $R1 "95" win_ver_bad - StrCmp $R1 "98" win_ver_bad - StrCmp $R1 "ME" win_ver_bad - Goto done - - win_ver_bad: + ${Unless} ${IsNT} !insertmacro UnselectSection ${SecGtk} !insertmacro SetSectionFlag ${SecGtk} ${SF_RO} MessageBox MB_OK $(GTK_WINDOWS_INCOMPATIBLE) /SD IDOK IntCmp $R0 1 done done ; Upgrade isn't optional - abort if we don't have a suitable version Quit + ${EndIf} done: Pop $R2 @@ -1385,98 +1388,6 @@ FunctionEnd !endif -; GetWindowsVersion -; -; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ -; Updated by Joost Verburg -; -; Returns on top of stack -; -; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, Vista) -; or -; '' (Unknown Windows Version) -; -; Usage: -; Call GetWindowsVersion -; Pop $R0 -; -; at this point $R0 is "NT 4.0" or whatnot -Function GetWindowsVersion - - Push $R0 - Push $R1 - - ClearErrors - ReadRegStr $R0 HKLM \ - "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion - - IfErrors 0 lbl_winnt - - ; we are not NT - ReadRegStr $R0 HKLM \ - "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber - - StrCpy $R1 $R0 1 - StrCmp $R1 '4' 0 lbl_error - - StrCpy $R1 $R0 3 - - StrCmp $R1 '4.0' lbl_win32_95 - StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 - - lbl_win32_95: - StrCpy $R0 '95' - Goto lbl_done - - lbl_win32_98: - StrCpy $R0 '98' - Goto lbl_done - - lbl_win32_ME: - StrCpy $R0 'ME' - Goto lbl_done - - lbl_winnt: - StrCpy $R1 $R0 1 - - StrCmp $R1 '3' lbl_winnt_x - StrCmp $R1 '4' lbl_winnt_x - - StrCpy $R1 $R0 3 - - StrCmp $R1 '5.0' lbl_winnt_2000 - StrCmp $R1 '5.1' lbl_winnt_XP - StrCmp $R1 '5.2' lbl_winnt_2003 - StrCmp $R1 '6.0' lbl_winnt_vista lbl_error - - lbl_winnt_x: - StrCpy $R0 "NT $R0" 6 - Goto lbl_done - - lbl_winnt_2000: - Strcpy $R0 '2000' - Goto lbl_done - - lbl_winnt_XP: - Strcpy $R0 'XP' - Goto lbl_done - - lbl_winnt_2003: - Strcpy $R0 '2003' - Goto lbl_done - - lbl_winnt_vista: - Strcpy $R0 'Vista' - Goto lbl_done - - lbl_error: - Strcpy $R0 '' - lbl_done: - - Pop $R1 - Exch $R0 -FunctionEnd - ; SpellChecker Related Functions ;-------------------------------