Using install4j with ant |
|
|
Integrating install4j with your ant script (read about ant at
ant.apache.org)
is easy. Just use the install4j task
that is provided in $INSTALL4J_HOME/bin/ant.jar
and set the projectfile parameter to the install4j project
file that you want to build.
To make the install4j task available to ant, you must first insert a taskdef element that tells ant where to find the task definition. Here is an example of using the task in an ant build file:
<taskdef name="install4j"
classname="com.install4j.Install4JTask"
classpath="C:\Program Files\install4j\bin\ant.jar"/>
<target name="media">
<install4j projectfile="myapp.install4j"/>
</target>
The taskdef definition must occur only once per ant-build file and can appear anywhere on the top level below the project element. Note: it is not possible to copy the ant.jar archive to the lib folder of your ant distribution. You have to reference a full installation of install4j in the task definition. |
|
The install4j task supports the following parameters:
Contained elements:
The variable element supports the following parameters:
Example:
<install4j projectfile="myapp.install4j">
<variable name="MYVARIABLE" value="15"/>
<variable name="OTHERVARIABLE" value="test" mediafileid="8"/>
</install4j>
|
|