--- a/gaim-installer.nsi Sun Jul 31 11:41:19 2005 -0400
+++ b/gaim-installer.nsi Mon Aug 01 19:34:44 2005 -0400
@@ -1,7 +1,7 @@
; Installer script for win32 Gaim
; Herman Bloggs <hermanator12002@yahoo.com>
-; NOTE: this .NSI script is intended for NSIS 2.0 (final release).
+; NOTE: this .NSI script is intended for NSIS 2.08 ;--------------------------------
@@ -87,7 +87,9 @@
;--------------------------------
!define MUI_PAGE_CUSTOMFUNCTION_PRE preWelcomePage
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "./COPYING"
!insertmacro MUI_PAGE_COMPONENTS
@@ -450,13 +452,11 @@
; See https://lists.silcnet.org/pipermail/silc-devel/2005-January/001588.html
- StrCmp $R2 "NT 4.0" 0 nt4_done
+ StrCmp $R2 "NT 4.0" +1 +4 Delete "$INSTDIR\plugins\libsilc.dll"
Delete "$INSTDIR\silcclient.dll"
Delete "$INSTDIR\silc.dll"
; If we don't have install rights.. we're done
@@ -755,6 +755,8 @@
Function CheckUserInstallRights
@@ -782,10 +784,14 @@
Function un.CheckUserInstallRights
@@ -813,7 +819,9 @@
@@ -823,7 +831,9 @@
; Pop $0 ; 0 - Bad path 1 - Good path
IfFileExists $0 dir_exists
@@ -864,7 +874,7 @@
@@ -872,15 +882,24 @@
+ Exch 3 ; The top of the stack contains the output variable Function .onVerifyInstDir
@@ -917,7 +936,7 @@
; be equal and the minor value needs to be greater or equal.
-; Push "2.1.0" ; Refrence version
+; Push "2.1.0" ; Reference version ; Push "2.2.1" ; Version to check
@@ -925,33 +944,39 @@
; Version we want to check
; Check that the string to check is at least 5 chars long (i.e. x.x.x)
- IntCmp $7 5 0 bad_version
+ IntCmp $R2 5 0 bad_version
- IntCmp $7 $9 check_minor bad_version bad_version
+ IntCmp $R2 $R3 check_minor bad_version bad_version
- IntCmp $7 $9 good_version bad_version good_version
+ IntCmp $R2 $R3 good_version bad_version good_version
@@ -978,6 +1003,11 @@
; - If HKLM ver exists but old, return as if no ver exits.
Call CheckUserInstallRights
@@ -996,8 +1026,7 @@
; GTK+ is already installed.. check version.
- StrCpy $1 ${GTK_VERSION} ; Minimum GTK+ version needed
+ Push ${GTK_VERSION} ; Minimum GTK+ version needed @@ -1038,22 +1067,34 @@
+ ; The top two items on the stack are what we want to return System::Call 'kernel32::OpenMutex(i 2031617, b 0, t "gaim_is_running") i .R0'
MessageBox MB_OK|MB_ICONEXCLAMATION $(GAIM_IS_RUNNING) IDOK
System::Call 'kernel32::OpenMutex(i 2031617, b 0, t "gaim_is_running") i .R0'
MessageBox MB_OK|MB_ICONEXCLAMATION $(GAIM_IS_RUNNING) IDOK
@@ -1065,6 +1106,11 @@
StrCpy $name "Gaim ${GAIM_VERSION}"
StrCpy $GTK_THEME_SEL ${SecGtkWimp}
+ !insertmacro SetSectionFlag ${SecGtkThemes} ${SF_RO} + !insertmacro UnselectSection ${SecGtkThemes} + !insertmacro SelectSection $GTK_THEME_SEL ; GTK installer has two silent states.. one with Message boxes, one without
@@ -1094,21 +1140,19 @@
StrCmp $INSTDIR "" 0 instdir_done
Call CheckUserInstallRights
- StrCmp $0 "HKLM" 0 user_dir
+ StrCmp $R0 "HKLM" 0 user_dir StrCpy $INSTDIR "$PROGRAMFILES\Gaim"
- StrCpy $2 "$SMPROGRAMS"
- StrCpy $INSTDIR "$2\Gaim"
+ StrCpy $INSTDIR "$R2\Gaim"
@@ -1131,34 +1175,38 @@
; Page enter and exit functions..
; If this installer dosn't have GTK, check whether we need it.
; We do this here an not in .onInit because language change in
; .onInit doesn't take effect until it is finished.
- StrCmp $0 "0" have_gtk need_gtk
+ StrCmp $R0 "0" have_gtk need_gtk MessageBox MB_OK $(GTK_INSTALLER_NEEDED) IDOK
- StrCmp $0 "1" upgrade_gtk
- StrCmp $0 "2" no_gtk no_gtk
+ StrCmp $R0 "0" have_gtk + StrCmp $R0 "1" upgrade_gtk + StrCmp $R0 "2" no_gtk no_gtk ; Don't show dir selector.. Upgrades are done to existing path..
@@ -1166,38 +1214,42 @@
- StrCmp $1 "NONE" 0 no_gtk_cont
+ StrCmp $R1 "NONE" 0 no_gtk_cont ; Got no install rights..
- StrCmp $1 "HKCU" 0 hklm1
- StrCpy $2 "$SMPROGRAMS"
+ StrCmp $R1 "HKCU" 0 hklm1 + StrCpy $R0 "$SMPROGRAMS"
+ StrCpy $R0 "$R0\GTK\2.0" - StrCpy $2 "${GTK_DEFAULT_INSTALL_PATH}"
+ StrCpy $R0 "${GTK_DEFAULT_INSTALL_PATH}" StrCpy $name "GTK+ ${GTK_VERSION}"
StrCpy $name "Gaim ${GAIM_VERSION}"
MessageBox MB_OK $(GTK_BAD_INSTALL_PATH) IDOK
@@ -1291,18 +1343,20 @@
; /L=Language e.g.: /L=1033
- StrCpy $R1 $R1 4 2 ; Strip first 2 chars of string
+ StrCpy $R0 $R0 4 2 ; Strip first 2 chars of string