Mercurial > pidgin
diff gaim-installer.nsi @ 3853:eddcb3a8c74e
[gaim-migrate @ 4005]
Gtkspell/aspell update
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sat, 02 Nov 2002 01:30:20 +0000 |
parents | a3093efd9027 |
children | d0897828bd0d |
line wrap: on
line diff
--- 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