comparison gaim-installer.nsi @ 6422:468bbb5fbc29

[gaim-migrate @ 6930] Now using GTK+ 2.2.2 committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Mon, 11 Aug 2003 17:44:50 +0000
parents 0da5f6ad3f4d
children 4653c61a1e33
comparison
equal deleted inserted replaced
6421:a6b7e7966862 6422:468bbb5fbc29
45 !define GAIM_UNINSTALL_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" 45 !define GAIM_UNINSTALL_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim"
46 !define HKLM_APP_PATHS_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" 46 !define HKLM_APP_PATHS_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe"
47 !define GAIM_STARTUP_RUN_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 47 !define GAIM_STARTUP_RUN_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
48 !define GAIM_UNINST_EXE "gaim-uninst.exe" 48 !define GAIM_UNINST_EXE "gaim-uninst.exe"
49 49
50 !define GTK_VERSION "2.2.1" 50 !define GTK_VERSION "2.2.2"
51 !define GTK_REG_KEY "SOFTWARE\GTK\2.0" 51 !define GTK_REG_KEY "SOFTWARE\GTK\2.0"
52 !define GTK_DEFAULT_INSTALL_PATH "$PROGRAMFILES\Common Files\GTK\2.0" 52 !define GTK_DEFAULT_INSTALL_PATH "$PROGRAMFILES\Common Files\GTK\2.0"
53 !define GTK_INSTALL_VERIFIER "lib\libgtk-win32-2.0-0.dll"
54 !define GTK_RUNTIME_INSTALLER "..\gtk_installer\gtk-runtime*.exe" 53 !define GTK_RUNTIME_INSTALLER "..\gtk_installer\gtk-runtime*.exe"
55 !define GTK_THEME_DIR "..\gtk_installer\gtk_themes" 54 !define GTK_THEME_DIR "..\gtk_installer\gtk_themes"
56 !define GTK_DEFAULT_THEME_GTKRC_DIR "share\themes\Default\gtk-2.0" 55 !define GTK_DEFAULT_THEME_GTKRC_DIR "share\themes\Default\gtk-2.0"
57 !define GTK_DEFAULT_THEME_ENGINE_DIR "lib\gtk-2.0\2.2.0\engines" 56 !define GTK_DEFAULT_THEME_ENGINE_DIR "lib\gtk-2.0\2.2.0\engines"
58 57
270 ClearErrors 269 ClearErrors
271 ExecWait '"$TEMP\gtk-runtime.exe" /S /D=$INSTDIR' 270 ExecWait '"$TEMP\gtk-runtime.exe" /S /D=$INSTDIR'
272 IfErrors gtk_install_error 271 IfErrors gtk_install_error
273 SetOverwrite on 272 SetOverwrite on
274 ClearErrors 273 ClearErrors
275 CopyFiles /FILESONLY "$INSTDIR\lib\*.dll" $INSTDIR 274 CopyFiles /FILESONLY "$INSTDIR\bin\*.dll" $INSTDIR
276 SetOverwrite off 275 SetOverwrite off
277 IfErrors gtk_install_error 276 IfErrors gtk_install_error
278 Delete "$INSTDIR\lib\*.dll" 277 Delete "$INSTDIR\bin\*.dll"
279 Goto done 278 Goto done
280 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; 279 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
281 ; end gtk_no_install_rights 280 ; end gtk_no_install_rights
282 281
283 done: 282 done:
300 StrCmp $R0 "NONE" gaim_none 299 StrCmp $R0 "NONE" gaim_none
301 StrCmp $R0 "HKLM" gaim_hklm gaim_hkcu 300 StrCmp $R0 "HKLM" gaim_hklm gaim_hkcu
302 301
303 gaim_hklm: 302 gaim_hklm:
304 ReadRegStr $R1 HKLM ${GTK_REG_KEY} "Path" 303 ReadRegStr $R1 HKLM ${GTK_REG_KEY} "Path"
305 WriteRegStr HKLM "${HKLM_APP_PATHS_KEY}" "Path" "$R1\lib" 304 WriteRegStr HKLM "${HKLM_APP_PATHS_KEY}" "Path" "$R1\bin"
306 WriteRegStr HKLM ${GAIM_REG_KEY} "" "$INSTDIR" 305 WriteRegStr HKLM ${GAIM_REG_KEY} "" "$INSTDIR"
307 WriteRegStr HKLM ${GAIM_REG_KEY} "Version" "${GAIM_VERSION}" 306 WriteRegStr HKLM ${GAIM_REG_KEY} "Version" "${GAIM_VERSION}"
308 WriteRegStr HKLM "${GAIM_UNINSTALL_KEY}" "DisplayName" $(GAIM_UNINSTALL_DESC) 307 WriteRegStr HKLM "${GAIM_UNINSTALL_KEY}" "DisplayName" $(GAIM_UNINSTALL_DESC)
309 WriteRegStr HKLM "${GAIM_UNINSTALL_KEY}" "UninstallString" "$INSTDIR\${GAIM_UNINST_EXE}" 308 WriteRegStr HKLM "${GAIM_UNINSTALL_KEY}" "UninstallString" "$INSTDIR\${GAIM_UNINST_EXE}"
310 ; Sets scope of the desktop and Start Menu entries for all users. 309 ; Sets scope of the desktop and Start Menu entries for all users.
333 !ifdef DEBUG 332 !ifdef DEBUG
334 File ..\win32-dev\drmingw\exchndl.dll 333 File ..\win32-dev\drmingw\exchndl.dll
335 !endif 334 !endif
336 335
337 ; If we don't have install rights and no hklm GTK install.. then Start in lnk property should 336 ; If we don't have install rights and no hklm GTK install.. then Start in lnk property should
338 ; remain gaim dir.. otherwise it should be set to the GTK lib dir. (to avoid dll hell) 337 ; remain gaim dir.. otherwise it should be set to the GTK bin dir. (to avoid dll hell)
339 StrCmp $R0 "NONE" 0 startin_gtk 338 StrCmp $R0 "NONE" 0 startin_gtk
340 StrCmp $R1 "" startin_gaim 339 StrCmp $R1 "" startin_gaim
341 startin_gtk: 340 startin_gtk:
342 SetOutPath "$R1\lib" 341 SetOutPath "$R1\bin"
343 startin_gaim: 342 startin_gaim:
344 CreateDirectory "$SMPROGRAMS\Gaim" 343 CreateDirectory "$SMPROGRAMS\Gaim"
345 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" "$INSTDIR\gaim.exe" 344 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" "$INSTDIR\gaim.exe"
346 CreateShortCut "$DESKTOP\Gaim.lnk" "$INSTDIR\gaim.exe" 345 CreateShortCut "$DESKTOP\Gaim.lnk" "$INSTDIR\gaim.exe"
347 SetOutPath "$INSTDIR" 346 SetOutPath "$INSTDIR"
846 Push $5 845 Push $5
847 Push $2 846 Push $2
848 Goto done 847 Goto done
849 848
850 good_version: 849 good_version:
851 ; Just make sure we have it. There was a gtk+ uninstaller that
852 ; left behind reg entries after uninstalling..
853 StrCmp $5 "HKLM" have_hklm_gtk have_hkcu_gtk 850 StrCmp $5 "HKLM" have_hklm_gtk have_hkcu_gtk
854 have_hkcu_gtk: 851 have_hkcu_gtk:
855 ; Have HKCU version 852 ; Have HKCU version
856 ReadRegStr $4 HKCU ${GTK_REG_KEY} "Path" 853 ReadRegStr $4 HKCU ${GTK_REG_KEY} "Path"
857 StrCpy $1 "$4\${GTK_INSTALL_VERIFIER}" 854 Goto good_version_cont
858 IfFileExists $1 good_version_verified
859 DeleteRegKey HKCU ${GTK_REG_KEY}
860 Goto no_gtk
861 855
862 have_hklm_gtk: 856 have_hklm_gtk:
863 ReadRegStr $4 HKLM ${GTK_REG_KEY} "Path" 857 ReadRegStr $4 HKLM ${GTK_REG_KEY} "Path"
864 StrCpy $1 "$4\${GTK_INSTALL_VERIFIER}" 858 Goto good_version_cont
865 IfFileExists $1 good_version_verified 859
866 DeleteRegKey HKLM ${GTK_REG_KEY} 860 good_version_cont:
867 Goto no_gtk
868
869 good_version_verified:
870 StrCpy $2 "0" 861 StrCpy $2 "0"
871 Push $4 ; The path to existing GTK+ 862 Push $4 ; The path to existing GTK+
872 Push $2 863 Push $2
873 Goto done 864 Goto done
874 865
875 no_gtk: 866 no_gtk:
876 StrCpy $2 "2" 867 StrCpy $2 "2"
877 Push $3 ; our rights 868 Push $3 ; our rights
878 Push $2 869 Push $2
879 Goto done 870 Goto done
880 871
881 done: 872 done:
882 FunctionEnd 873 FunctionEnd
883 874
884 Function .onInit 875 Function .onInit