An Ant task used to compile NSIS scripts. This is helpful for automating the build process of projects that use NSIS for their installer. To use it, put the nsisant-<version>.jar file in an accessible location and add the following to your Ant script:
<taskdef name="nsis" classname="net.sf.nsisant.Task">
<classpath location="nsisant-<version>.jar"/>
</taskdef>
For more information, please see the MakeNSIS documentation or visit the NSIS Ant project page. Please feel free to download NSIS Ant or ask questions on the forum.
| Attribute | Description | Required |
| script | The NSIS script to compile. | Yes |
| verbosity | The verbosity of the output. Default is 0.
|
No |
| out | File to which to log the output. Default is standard out. | No |
| pause | Whether to pause after execution of the script. Default is no. | No |
| noconfig | Whether to disable inclusion of nsisconf.nsh. Default is no. | No |
| nocd | Whether to disable changing to the directory containing the script. Default is no. | No |
| prefix | The prefix to use for the command-line options to makensis. Default is to use '/' on Windows and '-' otherwise. |
No |
| path | The directory containing the makensis executable. Default is to search the PATH. |
No |
define
Defines a symbol for the script.
Equivalent to the /D (-D on non-Windows platforms) command line parameter of makensis.
Multiple instances of this element are permitted.
It supports the following parameters:
| Attribute | Description | Required |
| name | The name of the symbol to define. | Yes |
| value | The value of the symbol. | Yes |
scriptcmd
Executes an NSIS command in the script.
Equivalent to the /X (-X on non-Windows platforms) command line parameter of makensis.
Multiple instances of this element are allowed and are executed in the order specified.
It supports the following parameters:
| Attribute | Description | Required |
| cmd | The NSIS command to execute in the script. | Yes |
Compile a script using all of the default values.
<nsis script="myproject.nsi"/>
Compile a script with verbose output, logging to a file, and the inclusion of nsisconf.nsh disabled.
The VERSION symbol is set to the value "2.1" and the "AutoCloseWindow true" command is executed at the beginning of the script.
<nsis script="myproject.nsi" verbosity="4" out="build.log" noconfig="yes">
<define name="VERSION" value="2.1"/>
<scriptcmd cmd="AutoCloseWindow true"/>
</nsis>
Copyright © 2006-2007 Daniel L. Reese. All rights reserved.