deprecate SetPluginUnload and /NOUNLOAD

plug-ins are now responsible to keeping themselves loaded using the new api

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5855 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2008-12-20 08:17:15 +00:00
parent d04cece9be
commit 5ac5b3f95b
24 changed files with 72 additions and 110 deletions

View file

@ -165,16 +165,12 @@ i.e. It takes a text variable, a pointer to int, and returns an int value.
\\<u\\>Using the external dll function\\</u\\> \\<br\\>
Now that we've sorted out what the function does, and how it maps to the System.dll format, we can use the function in a NSIS script.
First, it is recommended to turn 'PluginUnload' off before making multiple calls to System.dll. According to Brainsucker (and others), this will speed up execution of the installer package.
First, you have to change the output directory to that where the DLL you want to use is. It may also work if the DLL is on the system path, but this hasn't been tested.
Second, you have to change the output directory to that where the DLL you want to use is. It may also work if the DLL is on the system path, but this hasn't been tested.
The following code fragment will install 'condmgr.dll' to a temporary directory, execute the CmGetHotSyncExecPath function, display returned data and finally unload the System.dll plug-in.
The following code fragment will install 'condmgr.dll' to a temporary directory, execute the CmGetHotSyncExecPath function and display returned data.
Save this script
\c ; **** snip ****
\c SetPluginUnload alwaysoff
\c
\c Function loadDll
\c
\c SetOutPath $TEMP\eInspect ; create temp directory
@ -185,12 +181,6 @@ Save this script
\c DetailPrint "Path length: $1"
\c DetailPrint "Return value: $2"
\c
\c ; last plug-in call must not have /NOUNLOAD so NSIS will be able to delete
\c ; the temporary DLL
\c
\c SetPluginUnload manual
\c ; do nothing (but let the installer unload the System dll)
\c System::Free 0
\c FunctionEnd
\c ; **** snip ****
@ -326,7 +316,6 @@ I wrote this script to help rpetges in \W{http://forums.winamp.com/showthread.ph
\c StrCpy $1 ""
\c StrCpy $2 ""
\c StrCpy $3 ""
\c SetPluginUnload alwaysoff
\c System::Call "${RegOpenKeyEx}(${ROOT_KEY}, '${SUB_KEY}', \
\c 0, ${KEY_QUERY_VALUE}|${KEY_ENUMERATE_SUB_KEYS}, .r0) .r3"
\c
@ -392,8 +381,7 @@ I wrote this script to help rpetges in \W{http://forums.winamp.com/showthread.ph
\c System::Call "${RegCloseKey}(r0)"
\c
\c noClose:
\c
\c SetPluginUnload manual
\c
\c SectionEnd
written by KiCHiK