NSISWRAPPER(1)
β¨ NSISWRAPPER(1) β¨
okay bestie, welcome to the NSIS manual page, section 1 π
this is nsiswrapper, and she is here to make your cross-compiled Windows installer dreams come true.
πΈ NAME πΈ
nsiswrapper β the helper program for making NSIS Windows installers π
π¦ SYNOPSIS π¦
nsiswrapper [options] [roots...]
nsiswrapper myprogram.exe anotherprog.exe docs/ > script.nsis
nsiswrapper --run myprogram.exe anotherprog.exe docs/
π DESCRIPTION π
so like, nsiswrapper is a helper program that makes it so much easier to create Windows installers when you're living in a cross-compiler environment. it still needs NSIS (the Windows installer generator, yes she's required) but it cuts out all the tedious, soul-crushing work of hand-writing the NSIS command script, and it can even run NSIS for you automatically to spit out a final Windows executable. no cap. π₯
the general way to use it is just... list out the files you want packaged. like:
nsiswrapper myprogram.exe
this will search for myprogram.exe and any libraries (*.dll) that it depends on, and then it prints out an NSIS script. iconic behavior honestly.
if you want it to also run makensis (so it automatically creates a Windows installer for you), then do:
nsiswrapper --run myprogram.exe
which generates an installer.exe output file containing myprogram.exe plus any dependencies. slay. β¨
you can list other files and directories you want in your installer too. for example:
nsiswrapper myprogram.exe anotherprog.exe docs/*.html
there are many other command line options that control aspects of the NSIS command script (and therefore the final installer), such as:
- the name of the final installer π
- desktop shortcuts and menu items π₯οΈ
- license files π
it's a good idea to actually examine the NSIS command script, to check that nsiswrapper is including all the right dependencies. bestie please look at it. for me. π₯Ί
π ROOTS (FILES AND DIRECTORIES) π
each parameter should refer to a file or directory that's gonna be included in the installer.
these are known as "roots" because we also automatically add any dependencies to the list of files. so like, if a Windows executable requires any DLLs, those get added automatically. DLLs are searched for on the current $PATH (that's the environment variable, iykyk). π§
we choose the install location by removing any common prefix from the names of roots, which generally keeps the original directory structure intact. so for example, if the original roots (and any dependencies) are:
/usr/i686-w64-mingw32/sys-root/mingw/bin/program.exe
/usr/i686-w64-mingw32/sys-root/mingw/bin/library.dll
/usr/i686-w64-mingw32/sys-root/mingw/etc/config
then the install directory will look like this:
$INSTDIR/bin/program.exe
$INSTDIR/bin/library.dll
$INSTDIR/etc/config
($INSTDIR is the installation directory chosen by the user at install time, bestie. she's the main character. π
)
you can also specify the install location (relative to $INSTDIR) by adding roots of the form:
source=destination
for example:
/usr/i686-w64-mingw32/sys-root/mingw/bin/program.exe=program.exe
/usr/i686-w64-mingw32/sys-root/mingw/bin/library.dll=library.dll
/usr/i686-w64-mingw32/sys-root/mingw/etc/config=conf/config
which results in:
$INSTDIR/program.exe
$INSTDIR/library.dll
$INSTDIR/conf/config
obsessed. so clean. π«Ά
π OPTIONS π
--helpβ prints a brief help message and dips out. βοΈ--manβ prints the full manual page for the command and exits. (yes, this very page you're reading. meta.) π--verboseβ prints verbose messages while running. if you don't give this one, we try to operate quietly. shy girl energy. π--runβ normally this program just prints out the NSIS installer command script. but if you supply this option, then we runmakensisand attempt to generate an actual Windows installer. π₯--with-gtkβ GTK programs should normally supply this option. it ensures that the correct files are copied and/or created by the installer so that GTK programs actually work. π§--name "Name"β sets the long name of the installer.
if it's not set, the script tries to invent a suitable name based on the first root file given on the command line.
see also --outfile. π
--outfile myinstaller.exeβ sets the output filename for the installer.
if it's not set, this defaults to "installer.exe".
this is the same as the "OutFile" option to NSIS. β¨
--installdir 'C:\foo'β sets the default Windows installation directory. if it's not set, this program will choose a suitable default based on the name.
in any case, the end user can override this when they run the installer.
note that since this string will contain backslashes, you should single-quote it to protect it from the shell. β οΈ
this is the same as the "InstallDir" option to NSIS.
--installdirregkey 'HKLM SOFTWARE\FOO'β sets the name of the registry key used to save the installation directory. this has two purposes: firstly it's used to automagically remember the installation directory between installs. secondly your program can use this as one method to find its own installation directory (there are other ways to do this, don't worry).
the default is "HKLM SOFTWARE\Name" where "Name" is derived from the name of the installer.
note that since this string will contain backslashes and spaces, you should single-quote it to protect it from the shell. β οΈ
this is the same as the "InstallDirRegKey" option to NSIS. π
and that's the whole page bestie, you ate it up π
this was mingw-nsiswrapper-12, dated 2025-07-24 β thanks for reading, ily, go build something cute πΈπ¦π
π¦ where this page comes from
- fedora 43: mingw32-nsiswrapper 12-8.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms