applied patch #1044212 with some changes to make it optional

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3784 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-11-26 18:05:33 +00:00
parent 2a9a9ac72a
commit 38ba938cee
2 changed files with 136 additions and 65 deletions

View file

@ -100,6 +100,16 @@ Directory on the user's system to store a temporary file when the system has to
For Windows 9x/ME support, this directory should be on the same volume as the destination file (destfile).
The Windows temp directory could be located on any volume, so you cannot use this directory.
\S1{} Options
LIBRARY_SHELL_EXTENSION
\b Define this before inserting InstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after registration. Use this to refresh the shell when installing a shell extension or when changing file associations.
LIBRARY_COM
\b Define this before inserting InstallLib macro to call CoFreeUnusedLibraries after registration. Use this for unloading all unnecessary libraries from memory when installing COM libraries.
\S1{} Notes
\b If you want to support Windows 9x/ME, you can only use short filenames (8.3).
@ -184,6 +194,16 @@ NOREBOOT_NOTPROTECTED
Location of the library
\S1{} Options
LIBRARY_SHELL_EXTENSION
\b Define this before inserting UninstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after unregistration. Use this to refresh the shell when uninstalling a shell extension or when changing file associations.
LIBRARY_COM
\b Define this before inserting UninstallLib macro to call CoFreeUnusedLibraries after unregistration. Use this for unloading all unnecessary libraries from memory when uninstalling COM libraries.
\S1{} Example
\c !insertmacro UnInstallLib REGDLL SHARED REBOOT_NOTPROTECTED $SYSDIR\dllname.dll

View file

@ -57,6 +57,16 @@ tempbasedir Directory on the user's system to store a temporary file when th
The Windows temp directory could be located on any volume, so you cannot use
this directory.
Options:
LIBRARY_SHELL_EXTENSION
Define this before inserting InstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after registration. Use this to refresh the shell when installing a shell extension or when changing file associations.
LIBRARY_COM
Define this before inserting InstallLib macro to call CoFreeUnusedLibraries after registration. Use this for unloading all unnecessary libraries from memory when installing COM libraries.
Notes:
* If you want to support Windows 9x/ME, you can only use short filenames (8.3).
@ -121,6 +131,16 @@ uninstall Specify the uninstallation method
file Location of the library
Options:
LIBRARY_SHELL_EXTENSION
Define this before inserting UninstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after unregistration. Use this to refresh the shell when uninstalling a shell extension or when changing file associations.
LIBRARY_COM
Define this before inserting UninstallLib macro to call CoFreeUnusedLibraries after unregistration. Use this for unloading all unnecessary libraries from memory when uninstalling COM libraries.
------------------------
Example:
@ -133,6 +153,13 @@ Example:
!define LIB_INCLUDED
!ifndef SHCNE_ASSOCCHANGED
!define SHCNE_ASSOCCHANGED 0x08000000
!endif
!ifndef SHCNF_IDLIST
!define SHCNF_IDLIST 0x0000
!endif
!macro InstallLib libtype shared install localfile destfile tempbasedir
!verbose push
@ -409,6 +436,18 @@ Example:
!endif
!ifdef LIBRARY_SHELL_EXTENSION
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
!endif
!ifdef LIBRARY_COM
System::Call 'Ole32::CoFreeUnusedLibraries()'
!endif
;------------------------
;Done
@ -577,6 +616,18 @@ Example:
!endif
!ifdef LIBRARY_SHELL_EXTENSION
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
!endif
!ifdef LIBRARY_COM
System::Call 'Ole32::CoFreeUnusedLibraries()'
!endif
;------------------------
;Delete