In this repository you will find some NSIS scripts with which you can create installers for Windows programs.
There are multiple features of NSIS like:
- adding a license
- providing an uninstaller
- supporting multiple languages
- customizing the install directory
- providing multiple components that can be enabled/disabled
- setting environment variables
NSIS can create Windows installers that are capable of installing, uninstalling, setting system settings, extracting files, etc. Because NSIS is based on script files, you can create both simple and advanced installers.
First you need to download the newest version of the Nullsoft Scriptable Install System program/compiler:
- You can find a binary release here: http://nsis.sourceforge.net/Download
- Or you can install it via
winget
:winget install NSIS.NSIS
- Or if you are on Linux you can install it via a package manager:
- Ubuntu/
apt
:apt install nsis
- Arch/
yay
:yay -S nsis
- Ubuntu/
If you want to use it via a command line interface make sure that the binary directory has an entry in your environment variable PATH (the default should be C:\Program Files (x86)\NSIS\Bin
) - make sure to restart your terminal after adding it so it will be recognized.
For some installers you need NSIS plugins which means you need to download a NSIS plugin and extract it to the NSIS directory which should per default be located in C:\Program Files (x86)\NSIS
on Windows and in /usr/share/nsis
on Linux.
It depends on the Plugin but the only plugin that was used in this directory has extracted a Contrib
and Plugins
directory which is why you need to extract it in the top level directory, for other plugins your mileage may vary and you can extract it directly into the Plugins
directory.
All scripts were tested on Windows and Linux (via WSL) so they should work cross-platform.
- Start NSIS
- Click under the section Compiler the entry Compile NSI scripts
- On the new window click File in the menu bar and click Load Script
- Select your written script and click Open
- The
installer.exe
(or however you named it) will be created - Over the button Test Installer you can even test it without leaving the window
- Run
makensis script.nsi
The official documentation can be found here: