changeset 4897:65a0a360e8c4

[gaim-migrate @ 5229] GTK+ runtime dlls no longer installed by Gaim installer committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Thu, 27 Mar 2003 18:32:22 +0000
parents 3c649fe22e2c
children bd37db7531e4
files Makefile.mingw gaim-installer.nsi
diffstat 2 files changed, 103 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.mingw	Thu Mar 27 17:07:21 2003 +0000
+++ b/Makefile.mingw	Thu Mar 27 18:32:22 2003 +0000
@@ -11,9 +11,6 @@
 GAIM_PIXMAPS = ./pixmaps
 GAIM_SOUNDS = ./sounds
 GAIM_INSTALL_DIR = ./win32-install-dir
-GTK_TOP = ../win32-dev/gtk_2_0
-GTK_LIBS = $(GTK_TOP)/lib
-GTK_BIN = $(GTK_TOP)/bin
 PERL_TOP = ../win32-dev/perl56
 GTKSPELL_TOP = ../win32-dev/gtkspell-2.0.4/gtkspell
 IDLETRACK_TOP = $(GAIM_SRC)/win32/IdleTracker
@@ -30,39 +27,10 @@
 
 VERSION := $(shell cat ./VERSION)
 
-NEEDED_DLLS = 		$(GTK_BIN)/libgdk-win32-2.0-0.dll \
-			$(GTK_BIN)/libglib-2.0-0.dll \
-			$(GTK_BIN)/libintl-1.dll \
-			$(GTK_BIN)/iconv.dll \
-			$(GTK_BIN)/libgmodule-2.0-0.dll \
-			$(GTK_BIN)/libgtk-win32-2.0-0.dll \
-			$(GTK_BIN)/libgdk_pixbuf-2.0-0.dll \
-			$(GTK_BIN)/libgobject-2.0-0.dll \
-			$(GTK_BIN)/libgthread-2.0-0.dll \
-			$(GTK_BIN)/libjpeg.dll \
-			$(GTK_BIN)/libpng.dll \
-			$(GTK_BIN)/libtiff.dll \
-			$(GTK_BIN)/zlib.dll \
-			$(GTK_BIN)/libpango-1.0-0.dll \
-			$(GTK_BIN)/libpangoft2-1.0-0.dll \
-			$(GTK_BIN)/libpangowin32-1.0-0.dll \
-			$(GTK_BIN)/libatk-1.0-0.dll \
-			$(PERL_TOP)/perl56.dll \
+NEEDED_DLLS =		$(PERL_TOP)/perl56.dll \
 			$(GTKSPELL_TOP)/libgtkspell.dll \
 			$(IDLETRACK_TOP)/idletrack.dll 
 
-# For Gtk 2.0.3
-#			$(GTK_BIN)/libjpeg6b.dll \
-#			$(GTK_BIN)/libpng-3.dll \
-#			$(GTK_BIN)/libtiff.dll \
-#			$(GTK_BIN)/libz.dll \
-
-# For Gtk 2.0.6
-#			$(GTK_BIN)/libjpeg.dll \
-#			$(GTK_BIN)/libpng.dll \
-#			$(GTK_BIN)/libtiff.dll \
-#			$(GTK_BIN)/zlib.dll \
-
 
 SOUNDS =		$(GAIM_SOUNDS)/leave.wav \
 			$(GAIM_SOUNDS)/redalert.wav \
@@ -114,11 +82,6 @@
 	$(MAKE) TYPE='$(GG_TYPE)' -C $(GG) -f Makefile.mingw install
 	cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR)
 	cp $(SOUNDS) $(GAIM_INSTALL_DIR)/sounds/gaim
-	mkdir -p $(GAIM_INSTALL_DIR)/lib/gtk-2.0
-	cp -R $(GTK_LIBS)/gtk-2.0/2.2.0 $(GAIM_INSTALL_DIR)/lib/gtk-2.0
-	cp -R $(GTK_LIBS)/pango $(GAIM_INSTALL_DIR)/lib
-	cp -R $(GTK_TOP)/etc $(GAIM_INSTALL_DIR)
-	cp $(GAIM_SRC)/win32/themes/gtkrc $(GAIM_INSTALL_DIR)/etc/gtk-2.0
 
 installer:
 	makensis.exe /DGAIM_VERSION="$(VERSION)" gaim-installer.nsi
--- a/gaim-installer.nsi	Thu Mar 27 17:07:21 2003 +0000
+++ b/gaim-installer.nsi	Thu Mar 27 18:32:22 2003 +0000
@@ -1,39 +1,105 @@
 ; Installer script for win32 Gaim
 ; Herman Bloggs <hermanator12002@yahoo.com>
 
-; NOTE: this .NSI script is designed for NSIS v2.0b0+
+; NOTE: this .NSI script is designed for NSIS v2.0b3+
+
+!define MUI_PRODUCT "Gaim" ;Define your own software name here
+!define MUI_VERSION ${GAIM_VERSION} ;Define your own software version here
+
+!include "MUI.nsh"
+
+;--------------------------------
+;Configuration
 
-Name "Gaim ${GAIM_VERSION} (Win32)"
-OutFile "gaim-${GAIM_VERSION}.exe"
-Icon .\pixmaps\gaim-install.ico
-UninstallIcon .\pixmaps\gaim-install.ico
+  ;General
+  OutFile "gaim-${GAIM_VERSION}.exe"
+
+  ;Folder selection page
+  InstallDir "$PROGRAMFILES\Gaim"
+  
+  ;Remember install folder
+  InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" ""
+
+  !define MUI_ICON .\pixmaps\gaim-install.ico
+  !define MUI_UNICON .\pixmaps\gaim-install.ico
+
 
-; Some default compiler settings (uncomment and change at will):
-; SetCompress auto ; (can be off or force)
-; SetDatablockOptimize on ; (can be off)
-; CRCCheck on ; (can be off)
-; AutoCloseWindow false ; (can be true for the window go away automatically at end)
-; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
-; SetDateSave off ; (can be on to have files restored to their orginal date)
+;--------------------------------
+;Modern UI Configuration
+
+  !define MUI_WELCOMEPAGE
+  !define MUI_LICENSEPAGE
+  !define MUI_DIRECTORYPAGE
+  !define MUI_FINISHPAGE
+  
+  !define MUI_ABORTWARNING
 
-InstallDir "$PROGRAMFILES\Gaim"
-InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" ""
-DirShow show ; (make this hide to not let the user change it)
-DirText "Select the directory to install Gaim in:"
+  !define MUI_UNINSTALLER
+  !define MUI_UNCONFIRMPAGE
+  
+;--------------------------------
+;Languages
+ 
+  !insertmacro MUI_LANGUAGE "English"
+  
+;--------------------------------
+;Data
+  
+  LicenseData "./COPYING"
+
+;--------------------------------
+;Installer Sections
 
 Section "" ; (default section)
   ; Check if previous intallation exists
   ReadRegStr $R0 HKEY_LOCAL_MACHINE "SOFTWARE\gaim" ""
   StrCmp $R0 "" cont_install
+    ; Previous version found
     ReadRegStr $R1 HKEY_LOCAL_MACHINE "SOFTWARE\gaim" "Version"
-    StrCmp $R1 "" no_version
-      ; Gaim found, so exit Intallation
-      MessageBox MB_OK "Gaim (v$R1) already exists on this machine. Uninstall first then try again." IDOK
+    ; Version key started with 0.60a3. Prior versions can't be 
+    ; automaticlly uninstalled.
+    StrCmp $R1 "" uninstall_first_no_ver
+      ; Version found - Read in uninstall string.
+      ReadRegStr $R2 HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString"
+      StrCmp $R2 "" uninstall_first_no_ver
+        ; Have uninstall string.. go ahead and uninstall.
+	ExecWait '$R2 /S _?=$R0'
+	IfErrors "" cont_install
+        ; Errors occured
+        MessageBox MB_OK "Errors encountered while trying to uninstall previous version of Gaim, continuing installation.." IDOK
+	Goto cont_install
+
+      uninstall_first_no_ver:
+        MessageBox MB_OK "Gaim already exists on this machine. Uninstall first then try again." IDOK
+        Quit
+
+  cont_install:
+  ; Check to see if GTK+ Runtime is installed.
+  ReadRegStr $R0 HKEY_LOCAL_MACHINE "SOFTWARE\GTK\2.0" "Version"
+  StrCmp $R0 "" no_gtk have_gtk
+  no_gtk:
+    ; Instruct user to install GTK+ runtime first.
+    MessageBox MB_OK "Could not find GTK+ runtime environment. Visit http://www.dropline.net/gtk/ to download and install GTK+ v2.2.1" IDOK
+    Quit
+  have_gtk:
+    ; Check GTK+ version
+    StrLen $R3 $R0 ; Expecting 5 char length version string
+    IntCmp $R3 5 check_version bad_version check_version ; if greater or equal to 5... good
+    check_version:
+    StrCpy $R4 $R0 1   ;Major
+    StrCpy $R1 $R0 1 2 ;Minor
+    StrCpy $R2 $R0 1 4 ;Micro
+    IntCmp $R4 2 to_minor bad_version
+    to_minor:
+      IntCmp $R1 2 to_micro bad_version
+    to_micro: ; If greator or equal to one.. good
+      IntCmp $R2 1 good_version bad_version good_version
+    bad_version:
+      MessageBox MB_OK "Found GTK+ verison $R0. Make sure that you have version 2.2.1 or higher installed, before installing Gaim." IDOK
       Quit
-      no_version: 
-      MessageBox MB_OK "Gaim already exists on this machine. Uninstall first then try again." IDOK
-      Quit
-  cont_install:
+  
+  ; Continue
+  good_version:
   SetOutPath "$INSTDIR"
   ; Gaim files
   File /r .\win32-install-dir\*.*
@@ -43,10 +109,16 @@
   WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "Version" "${GAIM_VERSION}"
   WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "DisplayName" "Gaim (remove only)"
   WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString" '"$INSTDIR\gaim-uninst.exe"'
+  ; Set App path to include GTK+ lib dir
+  WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "" "$INSTDIR\gaim.exe"
+  ; Concat GTK+ path and lib dir
+  ReadRegStr $R5 HKEY_LOCAL_MACHINE "SOFTWARE\GTK\2.0" "Path"
+  StrCpy $R5 "$R5\lib"
+  WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "Path" $R5
 
   ; Set Start Menu icons
   SetShellVarContext "all"
-  SetOutPath "$SMPROGRAMS\Gaim"
+  CreateDirectory "$SMPROGRAMS\Gaim"
   CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \
                  "$INSTDIR\gaim.exe"
   CreateShortCut "$SMPROGRAMS\Gaim\Unistall.lnk" \
@@ -59,8 +131,8 @@
   WriteUninstaller "$INSTDIR\gaim-uninst.exe"
 SectionEnd ; end of default section
 
-; begin uninstall settings/section
-UninstallText "This will uninstall Gaim from your system"
+;--------------------------------
+;Uninstaller Section
 
 Section Uninstall
   ; Delete Gaim Dir
@@ -74,8 +146,9 @@
   ; Delete Gaim Registry Settings
   DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim"
   DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim"
+  DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe"
+
+  ;Display the Finish header
+  !insertmacro MUI_UNFINISHHEADER
 
 SectionEnd ; end of uninstall section
-
-; eof
-