plugin -> plug-in
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4202 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
efe714eec8
commit
dd29796e0f
9 changed files with 17 additions and 17 deletions
|
@ -1,26 +1,26 @@
|
|||
\S0{plugindlls} Plugin DLLs
|
||||
\S0{plugindlls} Plug-in DLLs
|
||||
|
||||
The abilities of the NSIS scripting language can be extended by utilising functionality provided in a DLL file. Probably the best known example of this is the InstallOptions.dll bundled with every NSIS release.
|
||||
|
||||
When the NSIS compiler starts it scans the plugins directory for DLLs and makes a list of the plugins found and their exported functions. During compilation if a sequence such as fred::flintstone is encountered where the compiler expected to find a language keyword the compiler will look through this list. If a list entry specifies that fred.dll exports function flintstone NSIS will pack the fred.dll file into the created installer binary.
|
||||
When the NSIS compiler starts it scans the plug-ins directory for DLLs and makes a list of the plug-ins found and their exported functions. During compilation if a sequence such as fred::flintstone is encountered where the compiler expected to find a language keyword the compiler will look through this list. If a list entry specifies that fred.dll exports function flintstone NSIS will pack the fred.dll file into the created installer binary.
|
||||
|
||||
During execution of a plugin command NSIS will unpack the necessary DLL to a temporary folder ($PLUGINSDIR), push all of the arguments specified (right-to-left order), and then execute the DLL function. If the /NOUNLOAD option is specified the DLL will not be unloaded until the installer exits or the next time you use the DLL without /NOUNLOAD. Please note that the last call to the plugin must not have the /NOUNLOAD flag or the plugin will not be deleted from $PLUGINSDIR, thus garbage will be left on the user's machine.
|
||||
During execution of a plug-in command NSIS will unpack the necessary DLL to a temporary folder ($PLUGINSDIR), push all of the arguments specified (right-to-left order), and then execute the DLL function. If the /NOUNLOAD option is specified the DLL will not be unloaded until the installer exits or the next time you use the DLL without /NOUNLOAD. Please note that the last call to the plug-in must not have the /NOUNLOAD flag or the plug-in will not be deleted from $PLUGINSDIR, thus garbage will be left on the user's machine.
|
||||
|
||||
\S1{usingplug} Using Plugin Commands
|
||||
\S1{usingplug} Using Plug-in Commands
|
||||
|
||||
A plug-in call looks like this:
|
||||
|
||||
\c InstallOptions::dialog "ini_file_location.ini"
|
||||
|
||||
All parameters are pushed onto the stack (in this case, the plug-in function only needs one parameter). Some plugin commands may not need any parameters on the stack, others might require more of them. To use a plug-in command you will need to read the documentation for the plug-in so that you know what parameters its functions require.
|
||||
All parameters are pushed onto the stack (in this case, the plug-in function only needs one parameter). Some plug-in commands may not need any parameters on the stack, others might require more of them. To use a plug-in command you will need to read the documentation for the plug-in so that you know what parameters its functions require.
|
||||
|
||||
\S1{disablingplug} Disabling Plugin Unloading
|
||||
\S1{disablingplug} Disabling Plug-in Unloading
|
||||
|
||||
If you don't want to unload the DLL after calling a function, use /NOUNLOAD as the first parameter. For example:
|
||||
|
||||
\c dll::function /NOUNLOAD "param"
|
||||
|
||||
You can also use \R{setpluginunload}{SetPluginUnload} alwaysoff to avoid writing /NOUNLOAD each and every time you use the same plugin.
|
||||
You can also use \R{setpluginunload}{SetPluginUnload} alwaysoff to avoid writing /NOUNLOAD each and every time you use the same plug-in.
|
||||
|
||||
\S1{calldiskplug} Calling plug-ins manually
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue