# HG changeset patch # User Herman Bloggs # Date 1036200620 0 # Node ID eddcb3a8c74e92fefe5d19c8eb40c43967d282dd # Parent c167a851933a8dcf09497d31758e284c995910d1 [gaim-migrate @ 4005] Gtkspell/aspell update committer: Tailor Script diff -r c167a851933a -r eddcb3a8c74e gaim-installer.nsi --- a/gaim-installer.nsi Sat Nov 02 01:22:10 2002 +0000 +++ b/gaim-installer.nsi Sat Nov 02 01:30:20 2002 +0000 @@ -21,16 +21,33 @@ DirShow show ; (make this hide to not let the user change it) DirText "Select the directory to install Gaim in:" +Section "Aspell" + SetOutPath $OUTDIR + File ..\win32-dev\aspell-15\bin\aspell-0.50.2.exe + ExecWait "$OUTDIR\aspell-0.50.2.exe" +SectionEnd Section "" ; (default section) -SetOutPath "$INSTDIR" -; add files / whatever that need to be installed here. -File /r .\win32-install-dir\*.* -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR" -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\uninst.exe"' -; write out uninstaller -WriteUninstaller "$INSTDIR\uninst.exe" + SetOutPath "$INSTDIR" + ; Gaim files + File /r .\win32-install-dir\*.* + ; Gaim Registry Settings + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR" + 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 aspell dir + WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "" "$INSTDIR\gaim.exe" + WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "Path" "$PROGRAMFILES\aspell" + ; Increase refrence count for aspell dlls + Push "C:\Program Files\aspell\aspell-15.dll" + Call AddSharedDLL + Push "C:\Program Files\aspell\aspell-common-0-50-2.dll" + Call AddSharedDLL + Push "C:\Program Files\aspell\pspell-15.dll" + Call AddSharedDLL + + ; write out uninstaller + WriteUninstaller "$INSTDIR\gaim-uninst.exe" SectionEnd ; end of default section Section "Gaim Start Menu Group" @@ -38,7 +55,7 @@ CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \ "$INSTDIR\gaim.exe" CreateShortCut "$SMPROGRAMS\Gaim\Unistall.lnk" \ - "$INSTDIR\uninst.exe" + "$INSTDIR\gaim-uninst.exe" SectionEnd @@ -47,12 +64,85 @@ UninstallText "This will uninstall Gaim from your system" Section Uninstall -; add delete commands to delete whatever files/registry keys/etc you installed here. -RMDir /r "$SMPROGRAMS\Gaim" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" -RMDir /r "$INSTDIR" + ; Delete Gaim Dir + RMDir /r "$INSTDIR" + RMDir /r "$SMPROGRAMS\Gaim" + + ; Delete Aspell Files + ;RMDir /r $PROGRAMFILES\aspell\data + ;RMDir /r $PROGRAMFILES\aspell\dict + ;Delete $PROGRAMFILES\aspell\aspell-15.dll + ;Delete $PROGRAMFILES\aspell\aspell-common-0-50-2.dll + ;Delete $PROGRAMFILES\aspell\pspell-15.dll + + ; 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" + + ; Decrease refrence count for Aspell dlls + Push "C:\Program Files\aspell\aspell-15.dll" + Call un.RemoveSharedDLL + Push "C:\Program Files\aspell\aspell-common-0-50-2.dll" + Call un.RemoveSharedDLL + Push "C:\Program Files\aspell\pspell-15.dll" + Call un.RemoveSharedDLL + ; Delete aspell dir if its empty + RMDir "C:\Program Files\aspell" SectionEnd ; end of uninstall section + +; AddSharedDLL +; +; Increments a shared DLLs reference count. +; Use by passing one item on the stack (the full path of the DLL). +; +; Usage: +; Push $SYSDIR\myDll.dll +; Call AddSharedDLL +; + +Function AddSharedDLL + Exch $R1 + Push $R0 + ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 + IntOp $R0 $R0 + 1 + WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 + Pop $R0 + Pop $R1 +FunctionEnd + +; un.RemoveSharedDLL +; +; Decrements a shared DLLs reference count, and removes if necessary. +; Use by passing one item on the stack (the full path of the DLL). +; Note: for use in the main installer (not the uninstaller), rename the +; function to RemoveSharedDLL. +; +; Usage: +; Push $SYSDIR\myDll.dll +; Call un.RemoveShareDLL +; + +Function un.RemoveSharedDLL + Exch $R1 + Push $R0 + ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 + StrCmp $R0 "" remove + IntOp $R0 $R0 - 1 + IntCmp $R0 0 rk rk uk + rk: + DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 + goto Remove + uk: + WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 + Goto noremove + remove: + Delete /REBOOTOK $R1 + noremove: + Pop $R0 + Pop $R1 +FunctionEnd + ; eof diff -r c167a851933a -r eddcb3a8c74e src/Makefile.mingw --- a/src/Makefile.mingw Sat Nov 02 01:22:10 2002 +0000 +++ b/src/Makefile.mingw Sat Nov 02 01:30:20 2002 +0000 @@ -14,6 +14,8 @@ GAIM_SRC := . PERL_LIB_DIR := ../../win32-dev/perl56 PERL_INCLUDE := $(PERL_LIB_DIR)/CORE +ASPELL_TOP := ../../win32-dev/aspell-15 +GTKSPELL_TOP := ../../win32-dev/gtkspell-2.0.2 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir ## @@ -53,12 +55,16 @@ -I$(GTK_TOP)/include/atk-1.0 \ -I$(GTK_TOP)/lib/glib-2.0/include \ -I$(GTK_TOP)/lib/gtk-2.0/include \ - -I$(PERL_INCLUDE) + -I$(PERL_INCLUDE) \ + -I$(ASPELL_TOP)/include \ + -I$(GTKSPELL_TOP) LIB_PATHS = -L$(GTK_TOP)/lib \ -L$(GAIM_SRC) \ - -L$(PERL_LIB_DIR) + -L$(PERL_LIB_DIR) \ + -L$(ASPELL_TOP)/lib \ + -L$(GTKSPELL_TOP)/gtkspell ## @@ -114,7 +120,8 @@ ## LIBRARIES ## -DLL_LIBS = -lgtk-win32-2.0 \ +DLL_LIBS = -lgtkspell \ + -lgtk-win32-2.0 \ -lpango-1.0 \ -lglib-2.0 \ -lgdk-win32-2.0 \ @@ -125,7 +132,8 @@ -lws2_32 \ -liberty \ -lwinmm \ - -lperl56 + -lperl56 \ + -laspell-15 EXE_LIBS = -lgaim -lglib-2.0