Developers, Developers, Developers! Maksim Sorokin IT Blog

12Jun/10Off

IzPack — Changing Location of Installation

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 panels:

  <panels>
    ...
    <panel classname="DefaultTargetPanel" />
    ...
  </panels>

And in resources you need to specify a text file where you will store the forced installation location:

  <resources>
    ...
    <res id="TargetPanel.dir" src="defaultInstallDir.txt" />
    ...
  </resources>

And you need to create than defaultInstallDir.txt file with a forced location, for example:

${ENV[APPDATA]}\myInstaller

As you may see, IzPack lets you to use environmental variables.

Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.