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
|
@ -28,7 +28,7 @@ Adds another include directory to the include directories list. This list is sea
|
|||
|
||||
\c directory
|
||||
|
||||
Causes the NSIS compiler to scan the given directory for Plugin DLLs.
|
||||
Causes the NSIS compiler to scan the given directory for plug-in DLLs.
|
||||
|
||||
\c !addplugindir myplugin
|
||||
\c MyPlugin::SomeFunction
|
||||
|
|
|
@ -72,7 +72,7 @@ This command sets the overwrite flag which is used by the File command to determ
|
|||
|
||||
\c \\<b\\>manual\\</b\\>|alwaysoff
|
||||
|
||||
This command sets the unload plugin flag which is by CallInstDLL and plugin calls (dll::func). Setting this to always off will behave as if you have added the /NOUNLOAD to every CallInstDLL and plugin call. Setting this to manual will only not unload if you specifically use /NOUNLOAD.
|
||||
This command sets the unload plug-in flag which is by CallInstDLL and plug-in calls (dll::func). Setting this to always off will behave as if you have added the /NOUNLOAD to every CallInstDLL and plug-in call. Setting this to manual will only not unload if you specifically use /NOUNLOAD.
|
||||
|
||||
\S1{versioninfo} Version Information
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ Use in the leave function of a directory page. Reads the flag set if '\R{adirver
|
|||
|
||||
\S2{initpluginsdir} InitPluginsDir
|
||||
|
||||
Initializes the plugins dir (\R{varconstant}{$PLUGINSDIR}) if not already initialized.
|
||||
Initializes the plug-ins dir (\R{varconstant}{$PLUGINSDIR}) if not already initialized.
|
||||
|
||||
\c InitPluginsDir
|
||||
\c File /oname=$PLUGINSDIR\image.bmp image.bmp
|
||||
|
@ -65,7 +65,7 @@ Sets the error level of the installer or uninstaller to \e{error_level}. See \R{
|
|||
|
||||
\c \\<b\\>current\\</b\\>|all
|
||||
|
||||
Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo Plugin. See Contrib\\UserInfo\\UserInfo.nsi for an example.
|
||||
Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo plug-in. See Contrib\\UserInfo\\UserInfo.nsi for an example.
|
||||
|
||||
\c SetShellVarContext current
|
||||
\c StrCpy $0 $DESKTOP
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ If you want a parameter to start with ; or # put it in quotes.
|
|||
|
||||
\\<b\\>Plug-ins\\</b\\>
|
||||
|
||||
To call a plugin, use 'plugin::command [parameters]'. For more info see \R{plugindlls}{Plugin DLLs}.
|
||||
To call a plug-in, use 'plugin::command [parameters]'. For more info see \R{plugindlls}{Plug-in DLLs}.
|
||||
|
||||
\c nsExec::Exec "myfile"
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ After calling the function, the variables contain the same value as before. Note
|
|||
|
||||
\S2{tutdebug} Debugging Scripts
|
||||
|
||||
The more you work with NSIS the more complex the scripts will become. This will increase the potential of mistakes, especially when dealing with lots of variables. There are a few possibilities to help you debugging the code. To display the contents of variables you should use \R{messagebox}{MessageBoxes} or \R{detailprint}{DetailPrint}. To get a brief overview about all variables you should use the plugin \W{http://nsis.sourceforge.net/wiki/DumpState}{DumpState}. By default all actions of the Installer are printed out in the Log Window. You can access the log if you right-click in the Log Window and select "Copy Details To Clipboard". There is also a way to write it directly to a file, see \R{dumplogtofile}{here}.
|
||||
The more you work with NSIS the more complex the scripts will become. This will increase the potential of mistakes, especially when dealing with lots of variables. There are a few possibilities to help you debugging the code. To display the contents of variables you should use \R{messagebox}{MessageBoxes} or \R{detailprint}{DetailPrint}. To get a brief overview about all variables you should use the plug-in \W{http://nsis.sourceforge.net/wiki/DumpState}{DumpState}. By default all actions of the Installer are printed out in the Log Window. You can access the log if you right-click in the Log Window and select "Copy Details To Clipboard". There is also a way to write it directly to a file, see \R{dumplogtofile}{here}.
|
||||
|
||||
\S1{compilercommands} Compiler Commands
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@
|
|||
|
||||
\H{connectinternet} Connect to the Internet
|
||||
|
||||
\c ; ConnectInternet (uses Dialer plugin)
|
||||
\c ; ConnectInternet (uses Dialer plug-in)
|
||||
\c ; Written by Joost Verburg
|
||||
\c ;
|
||||
\c ; This function attempts to make a connection to the internet if there is no
|
||||
|
|
|
@ -68,7 +68,7 @@ Some of the following values will not be used by older Windows versions.
|
|||
If both NoModify and NoRepair are set to 1, the button displays "Remove" instead of "Modify/Remove".
|
||||
|
||||
|
||||
\H{useful_system_plugin} Calling an external DLL using the System.dll plugin
|
||||
\H{useful_system_plugin} Calling an external DLL using the System.dll plug-in
|
||||
|
||||
Some install processes are required to call functions contained inside third party DLLs. A prime example of this is when installing a Palm(TM) conduit.
|
||||
|
||||
|
@ -183,7 +183,7 @@ Save this script
|
|||
\c DetailPrint "Path length: $1"
|
||||
\c DetailPrint "Return value: $2"
|
||||
\c
|
||||
\c ; last plugin call must not have /NOUNLOAD so NSIS will be able to delete
|
||||
\c ; last plug-in call must not have /NOUNLOAD so NSIS will be able to delete
|
||||
\c ; the temporary DLL
|
||||
\c
|
||||
\c SetPluginUnload manual
|
||||
|
|
|
@ -228,7 +228,7 @@ The decimal HWND of the parent window.
|
|||
|
||||
\e{$PLUGINSDIR}
|
||||
|
||||
The path to a temporary folder created upon the first usage of a plugin or a call to \R{initpluginsdir}{InitPluginsDir}. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for \L{../Docs/InstallOptions/Readme.html}{InstallOptions}, bitmaps for the splash plugin, or any other file that a plugin needs to work.
|
||||
The path to a temporary folder created upon the first usage of a plug-in or a call to \R{initpluginsdir}{InitPluginsDir}. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for \L{../Docs/InstallOptions/Readme.html}{InstallOptions}, bitmaps for the splash plug-in, or any other file that a plug-in needs to work.
|
||||
|
||||
\S1{varstrings} Constants Used in Strings
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue