I am trying to create a custom panel for an IzPack installer. This means that I have to extend IzPanel
. However, it appears that if I do this, the extended panel needs to be in the com.izforge.izpack.panels
package.
Then I found this post, which stipulates that:
I take issue with 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 modify the IzPack installation by adding these JARs to one of its subdirectories.
Is this article outdated (2008) and can it be safely ignored, or is this still true?
If not how can I avoid this and simply have the extended IzPanel on the classpath instead?
Thank you!
Okay, I take it you want to have your panels in a single jar within your own package.
This is how you do it:
Then inside your install.xml you define your panels sections 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 a single maven project with your own panels in your own package with two classes CustomPanelOne and CustomPanelTwo both extending IzPanel.
For more info see IzPack's older 4.x documentation at https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491534/Creating+Panels. As of right now the newer IzPack 5.x doc wiki is missing this section.
Also reffer to the XML DTD at https://github.com/izpack/izpack/blob/4.3/src/dtd/installation.dtd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With