IzPack 5 is currently in beta. There are some several nice improvements. You can check out documentation (which is also not full yet).
I am particularly happy about
dynamicvariables. We had custom IzPack panel to have functionality, which is now available out-of-the-box! I was just about to start developing another IzPack panel for some registry routine, but it seems like I do not need it, since functionality is already available.
Great work IzPack guys!
IzPack is pretty powerful installation tool. However, silent installation (or the call it Automated Installers) lacks some flexibility. One of the things, which I lack, is a possibility to provide environmental variables in silent installation configuration files (
auto-install.xml). Here I will provide some tricks which would help making your installer "eat" silent installation configuration files with environmental variables.
To start with,
link to modularized installers 2 times
As one can see from my previous post it is easy to create a modularized installer with IzPack. However, one may wonder, what about a silent installation of "master" installer? Is there a way to apply auto installation for such "master" installer and make it totally silent? Yes, it is possible.
So as one probably knows,
link to dependency plugin
One may want to modularize installer's components and support them separately. It is easy to do with IzPack too!
In this example, we suppose, that installers are built with Maven.
Ok, now we
There are two ways to run executable files in IzPack. The first one is
Sometimes one need to carry a lot of different files in the installer. There is a possibility to compress them using pack200.
info section simply specify:
But be aware, that when your installer is getting bigger and you are using pack200 to compress it, it can take quite a long time!
For instance, if you are carrying other jar files or other installers (I hope to write about modularized installers some time later), building the installer with
pack200 can take up to several minutes!
As you have seen from my previous posts it is easy to build an installer using Maven. You also can use Maven to make your installer more powerful. For example, using resource filtering. You can do it by using a Maven Resource plugin as I did in my previous post. And all you need to do to make it work is
Intuitively we know -- if we can run a bat file.. we can probably to everything. And yes, you can run bat files from IzPack too!
I will assume, that you read my previous post about simple IzPack + Maven applications. In order to run a bat file, we will have to use a IzPack ProcessPanel.
install.xml you need to
Sometimes one is interested to let the user choose where to install the application. It is possible to do using TargetPanel. But sometimes you want to force using specific directory. In this case you must be using DefaultTargetPanel.
In order to use a forced specific directory, you would need to add a
DefaultTargetPanel to your IzPack
In previous post we saw a simple example on how to build IzPack with Maven. Since the installer can be built with Maven, then it can also be deployed to a Maven Repository (Nexus, for example)! To do that, you have to set up Maven Repository as usual and make necessary modifications to
pom.xml. And when you will run
mvn deploy, you installer will appear in the repository!
The important thing to notice here is that