How can I install a plugin?

From NSIS Wiki

(Redirected from How can I install a plugin)

Plugin general information

A plugin is a way of extending application's functionality by adding new functions. For NSIS plugins consist of two mandatory files (with extensions ".dll" and ".nsh") and some informational files ("readme.txt", "license.txt", help files with ".chm" extension). Files with ".dll" extension are the main part of the plugin in form of a Dynamic Link Library (DLL) and ".nsh" files (header files) often contain defines or helper macros that are used when calling the plugin.

"NSIS searches for plug-ins in the Plugins folder under your NSIS directory and lists all of their available functions. You can use !addplugindir to tell NSIS to search in other directories too." -- NSIS manual, chapter 2 "Tutorial: The Basics".

NSIS plugin installation

After downloading and unpacking a plugin one needs to accept the license agreement (residing in "license.txt" file). Then the ".dll" files must be put into "NSIS/Plugins" subfolder of NSIS installation and the ".nsh" files -- into "NSIS/Include" subfolder.

Dialogs plugin installation example

"Dialogs" plugin is distributed in a form of ZIP-archive named "". The archive contains 4 mandatory files: "dialogs.dll", "defines.nsh", "ZipDLL.dll" and "zipdll.nsh". The last two forms ZipDLL plug-in which is used by the "Dialogs" plugin. All ".dll" files must be extracted into "C:\Program Files\NSIS\Plugins" folder and ".nsh" files must be extracted into "C:\Program Files\NSIS\Include" folder, supposing that NSIS installation name was the default "C:\Program Files\NSIS".

Multiple NSIS installations

If you have several versions of NSIS installed at the same time it can be useful to put all 3rd-party plugins in a common location. When MakeNSIS is started it parses ${NSISDIR}\nsisconf.nsh and %AppData%\nsisconf.nsh. These files provide a helpful place to put instructions shared by all your scripts.

; %AppData%\nsisconf.nsh example
!define NSISCONF_3 ";" ; NSIS 2 tries to parse some preprocessor instructions inside "!if 0" blocks!
!addincludedir "$%AppData%\NSIS\Include"
!if ${NSIS_PACKEDVERSION} > 0x02ffffff ; NSIS 3+:
!define /redef NSISCONF_3 ""
${NSISCONF_3}!addplugindir /x86-ansi "$%AppData%\NSIS\Plugins-i386-ansi"
${NSISCONF_3}!addplugindir /x86-unicode "$%AppData%\NSIS\Plugins-i386-unicode"
!else ; NSIS 2:
!addplugindir "$%AppData%\NSIS\Plugins-i386-ansi"
!undef NSISCONF_3
Personal tools