Izpack: creating custom panels

I am trying to create a custom panel for the IzPack installer. This means that I have to extend IzPanel . However, it seems that if I do this, the extended panel should be in the com.izforge.izpack.panels package.

Then I found this post which states that:

  • Therefore, you must include installer.jar from the lib folder from IzPack in the build path of your custom panel project.
  • Your custom panel / should / extend com.izforge.izpack.installer.IzPanel.
  • In addition, it should / should / be in the com.izforge.izpack.panels package.
  • On top of that, your assembly name / must / should be the same as the unqualified name of your custom panel class.

I take the question from the 1st and 4th points. They imply that I have to create an additional JAR file for each custom IzPanel that I create. Also, I would have to change the IzPack installation by adding these JARs to one of my subdirectories.

Is this article obsolete (2008) and can it be safely ignored, or is it still true? If not, how can I avoid this and just have an extended IzPanel in the classpath?

Thanks!

+7
java classpath izpack
source share
3 answers

Well, I suppose you want your panels to be in the same bank in your own package.

Here's how you do it:

  • Create your own jar with all custom panels
  • Copy this jar to the IzPackStagingFolder \ bin \ folder
  • Edit the installation descriptor and in the panels section refer to your CustomPanels.jar

Then, in your install.xml file, you define sections of your panels that are similar to:

 ... <panels> <panel classname="HTMLInfoPanel" id="infopanel" encoding="ISO-8859-1" /> <panel classname="TargetPanel" id="targetpanel" /> <panel classname="com.myCompany.installer.panels.MyCustomPanelOne" id="customPanelOne" jar="bin/panels/CustomPanels.jar" /> <panel classname="UserInputPanel" id="userInputPanel" /> <panel classname="InstallPanel" id="installPanel" /> <panel classname="ProcessPanel" id="processPanel" /> <panel classname="com.myCompany.installer.panels.MyCustomPanelTwo" id="customPanelTwo" jar="bin/panels/CustomPanels.jar" /> <panel classname="FinishPanel" id="finishPanel" /> </panels> ... 

Where CustomPanels.jar can be one maven project with its own panels in your own package with two classes CustomPanelOne and CustomPanelTwo extending IzPanel.

For more information, see the IzPack documentation older than 4.x at https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491534/Creating+Panels . There is currently no new version of IzPack 5.x doc wiki in this section.

Also override XML DTD at https://github.com/izpack/izpack/blob/4.3/src/dtd/installation.dtd

+2
source share

In the link below you will find help on installing izpack.

http://www.imrantariq.com/blog/?p=89

The link below contains a detailed pdf file for installation using izpack.

http://www.imrantariq.com/blog/?attachment_id=112

0
source share

Another point in addition to Paul Bors here.

IzPacks 4.x only needs installer.jar as a dependency. When I first tried to compile the user panel using installer.jar (izpack-installer-5.0.0-beta11.jar), I found many compilation errors. Izpack 5.0 adds an additional dependency on IzPack api (izpack-api-5.0.0-beta11.jar) and Izpack gui (izpack-gui-5.0.0-beta11.jar).

Enjoy creating custom panels.

0
source share

All Articles