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> The install4j task can contain vmParameter elements. These elements set VM parameters for the install4j command line compiler process. The vmParameter element supports the following parameters:
Example for setting an HTTP proxy (an internet connection is required for Windows code signing): <install4j projectfile="myapp.install4j" winKeystorePassword="Kajjs7sgLg22"> <vmParameter value="-DproxySet=true"/> <vmParameter value="-DproxyHost=myproxy"/> <vmParameter value="-DproxyPort=1234"/> <vmParameter value="-DproxyAuth=true"/> <vmParameter value="-DproxyAuthUser=buildServer"/> <vmParameter value="-DproxyAuthPassword=iq4zexwb8et"/> </install4j> |
![]() ![]() ![]() |