README
$Id: README.txt,v 1.1 2003/05/16 19:29:10 seb Exp $
installer.nsi is an installation script to create Windows installers.
It must be used with NSIS 2.0 cvs or above.
You can use UPX 1.2.4 as an option to pack the
installer.
You need the following files:
- installer.nsi
- installer.macros.nsh
- installer.functions.nsh
- installer.conf.nsh
- installer.english.nsh OR installer.french.nsh OR installer.german.nsh
Full installer VS Web installer
-------------------------------
You can now choose if you want to create a full installer (an installer that
comes with all the files packaged within) or a tiny web installer (that will
download and uncompress a .zip file from the Internet).
If you choose to create a web installer, you'll have to set the WEB constant
(see below) and to add two plugins to the plugins directory of your NSIS
installation:
- NSISDLSmooth
- ZipDLL
You can find both in the NSIS Archive
By default, a full installer is created.
How does it work?
-----------------
At first, you *need* to modify the SCRIPTDIR constant in installer.nsi.
Put in it the absolute path to the folder where installer.nsi is.
Do not forget the last "\"!
Then, there are two ways to use the script:
1. You can edit the values at the beginning of installer.conf.nsi to match
your program's name, path, etc.
Then, launch the script with makensis of makensisw (you can right-click
on installer.nsi and choose "Compile NSI" in the context menu).
OR
2. You can leave the script untouched and launch it by using the command line.
If you are using cygwin, you should launch it, then cd to your cygwin\bin\
folder, and make a symlink here.
To do so, use:
ln -s C:\full_path_to_the_nsis_folder\makensis.exe makensis.exe
When you are done with this, cd to the folder where you have put
installer.nsi, and use:
makensis [/DCONSTANTS="value"] installer.nsi
If you do not add any constant, the default values filled in installer.nsi
will be used during the compilation.
I recommend you at least modify the DATE constant (with /DDATE=YYYYMMDD).
The following constants are available:
o General usage
- NAME: name of your program
- DATE: date of the build (using the YYYYMMDD form)
- MILESTONE: version number of the program. Do not use it for testing
builds, only for official new versions.
Not set by default.
- LANG: Language used in the installer. Default is "English".
Current available values are "English" and "French".
- LICENSEFILE: absolute path (including file) to the license file, if
there is one. When not set, no license page is displayed.
Not set by default.
o Web Installer
- WEB: When set, makes a web installer instead of a full installer.
See above for more details.
Not set by default.
- WEBPATH: URI to WEBFILE.
- WEBFILE: Name of the file to download.
- TEMPFOLDER: folder in $TEMP where the .zip file is going to be
unzipped.
o Files
- OUTDISK: Harddisk where the installer is created. ("C:\" form)
- OUTDIR: Folder where the installer is created ("foo\" form).
Default is empty.
- OUTFILE: Filename of the uninstaller.
Default is MUI_PRODUCT-MUI_VERSION-setup.exe.
- FROMDIR: Absolute path to the files to install. It is recommanded to use
something like "C:\folder\*", so that there won't be any useless
subfolder in the install folder.
- UNINSTALLER: Filename of the uninstaller. Default is Uninstall-NAME.exe
- EXE: Filename of the program to install.
o Optimization
- DIST: when set, the installer is optimized, uses bzip2 compression and
has a CRC check. Useful when releasing a program, but useless when you
are testing builds. Set it only if you need it.
Not set by default.
- UPX: when set, and when DIST is set too, the installer is packaged using
UPX (if UPX has been installed). Useful only when releasing a program.
Not set by default.
- UPXDIR: Absolute path to UPX, including "upx.exe" at the end.
- UPXOPT: options used with UPX. Default are "--best -q".
o Misc
- HELP: displays this file.
Example:
makensis /DNAME="foo" /DDATE="20021015" /DMILESTONE="1.0" /DOUTDISK="D:\" /DFROMDIR="C:\foo\1.0\*" /DEXE="foo.exe" /DDIST /DUPX /DUPXDIR="C:\upx\upx.exe" installer.nsi
This will create an installer for foo 1.0 (build date: 20021015) on the
disk D:\. The installer'll be called foo-1.0-setup.exe and will be
optimized at best.
The files from foo 1.0 are taken in C:\foo\1.0\.
If you always use the same constants (except DATE, MILESTONE, DIST and
UPX, which will probably be the case), you can edit installer.conf.nsh.
You'll then need to add to the command line only the constants that you
want to change.