Thursday, 10 September 2009

IzPack Installation Script Example, with Lunch4j, Ant integration, Java Service Wrapper and Windows Service

My IzPack installation script that I use for my installer has changed tremendously to integrate easily with our production system which needed installation environment properties defined in a properties file instead of being supplied by the customer. With this system, the client defines all the variables in the properties file and supply the packed zip file at installation time. The Zip file is created by us from a Technical questionnaire(TQ) given to the client at the project initiation phase. This way, we control all the parameters and customer does not make any input during the installation. We also have a Java Service wrapper file to install it automatically as a service. The file is parsed by the IzPack script to insert all the variables. We currently use this to integrate into more than ten different LLPG and NLPG systems.


So here I will post my scripts: build.xml

Ant Integration Task

The IzPack Script: nizpack.zml

The Packing Time Ant Integration Script which invokes the ant script: AntActionsSpec.xml

The actual Ant script that is executed: installer_scripts.xml

Lastly, the Lauch4j script

The Lunch4jt script that is executed: launch4jConfig.xml