On 02/12/2013 22:47, Paul Bors wrote:
>
>
> After that, package MyFinishPanel inside your installer and replace it
> in your <panels> section of your install.xml.
>
> Simplest way to package those resources in your installer is to create
> a jar with them all (use maven module) and then use the <jar> tag in
> your install.xml to merge that jar inside your installer. See:
>
http://docs.codehaus.org/display/IZPACK/Jar
>
> ~ Thank you,
> Paul Bors
>
Okay the problem is not so much with writing the panel code, but with
compiling it !
So I have an Izpack installation as follows,
C:\Apps\Code\Izpack
C:\Apps\Code\Izpack\bin
C:\Apps\Code\Izpack\lib
ectera, I looked on the download page and there was no src based
alternative, but seeing as I'm not modifying any izpack code but
creating my own new panel I dont suppose I need that anyway.
So I created folder C:\Apps\Code\Izpack\custom
Then I create my own panel MyFinishPanel in custom with default package
cd C:\Apps\Code\Izpack\custom
javac -cp
..\lib\izpack-api-5.0.0-rc1.jar;..\lib\izpack-gui-5.0.0-rc1.jar;..\lib\izpack-installer-5.0.0-rc1.jar;..\lib\izpack-util-5.
0.0-rc1.jar;..\lib\izpack-panel-5.0.0-rc1.jar MyFinishPanel.java
jar -cvf izpackcustom.jar MyFinishPanel.class
Added <jar src=" C:\Apps\Code\Izpack\custom\izpackcustom.jar"/> to my
install.xml file
Changed
<panel classname="SimpleFinishPanel"/>
to
<panel classname="MyFinishPanel"/>
In my install.xml
and then ran the installer which failed with
Adding content of jar: /C:/Apps/Code/Izpack/custom/izpackcustom.jar
Adding panel: UNKNOWN (com.izforge.izpack.panels.hello.HelloPanel) ::
Classname : com.izforge.izpack.panels.hello.HelloPanel
Adding panel: UNKNOWN (com.izforge.izpack.panels.licence.LicencePanel)
:: Classname : com.izforge.izpack.panels.licence.LicencePanel
Adding panel: UNKNOWN (com.izforge.izpack.panels.target.TargetPanel) ::
Classname : com.izforge.izpack.panels.target.TargetPanel
Adding panel: UNKNOWN (com.izforge.izpack.panels.packs.PacksPanel) ::
Classname : com.izforge.izpack.panels.packs.PacksPanel
Adding panel: UNKNOWN (com.izforge.izpack.panels.install.InstallPanel)
:: Classname : com.izforge.izpack.panels.install.InstallPanel
Adding panel: UNKNOWN (com.izforge.izpack.panels.shortcut.ShortcutPanel)
:: Classname : com.izforge.izpack.panels.shortcut.ShortcutPanel
Adding panel: UNKNOWN (MyFinishPanel) :: Classname : MyFinishPanel
-> Fatal error :
null
java.lang.NullPointerException
at
com.izforge.izpack.compiler.merge.CompilerPathResolver.getMergeableByPackage(CompilerPathResolver.java:145)
at
com.izforge.izpack.compiler.merge.CompilerPathResolver.getPanelMerge(CompilerPathResolver.java:89)
at
com.izforge.izpack.compiler.packager.impl.PackagerBase.addPanel(PackagerBase.java:290)
at
com.izforge.izpack.compiler.CompilerConfig.addPanels(CompilerConfig.java:1585)
at
com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:323)
at
com.izforge.izpack.compiler.bootstrap.CompilerLauncher.main(CompilerLauncher.java:52)
(tip : use -? to get the commmand line parameters)
Looking at the error I thought I might need to have in a partcilaur
izpack page, but looking at your original example you used
package com.mycomp.installer.panels.MyFinishPanel;
so that doesn't follow
Any ideas ?