Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Panels

Here you tell the compiler which panels you want to use. They will appear in the installer in the order in which they are listed in your XML installation file.

...

Code Block
languagehtml/xml
titlePanel in the context of an installation specification
<installation version="5.0"
              xmlns:izpack="http://izpack.org/schema/installation"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">

  <info>
    <appname>Test</appname>
    <appversion>0.0</appversion>
    <appsubpath>myapp</appsubpath>
    <javaver   sion>1.6</javaversion>
  </info>
  <resources>
    <res id="InfoPanel.info" src="doc/readme.txt" parse="yes"/>
    <res id="LicencePanel.licence" src="legal/License.txt"/>
  </resources> 

  <guiprefs width="800" height="600" resizable="no">
    <splash>images/peas_load.gif</splash>
    <laf name="substance">
      <os family="windows" />
      <os family="unix" />
      <param name="variant" value="mist-silver" />
    </laf>
    <laf name="substance">
      <os family="mac" />
      <param name="variant" value="mist-aqua" />
    </laf>
   <modifier key="useHeadingPanel" value="yes" />
 </guiprefs>

 <panels>
   <panel classname="HelloPanel">
      <help iso3="deu" src="HelloPanelHelp_deu.html" />
      <help iso3="eng" src="HelloPanelHelp_eng.html" />        
   </panel>
   <panel classname="LicencePanel"/>
   <panel classname="TargetPanel"/>
   <panel classname="InstallPanel"/>
   <panel classname="UserInputPanel" id="myuserinput" condition="pack2selected" />
   <panel classname="FinishPanel" jar="MyFinishPanel.jar">
     <configuration>
        <param name="MyParam1" value="some value"/>
        <param name="MyParam2" value="some other value"/>
      </configuration>
   </panel>
  </panels>
  ...

</installation>

Internationalization

The following key suffixes can be translated:

  • headline
  • headinfo<number>

The built-in translation of these labels can be overridden in the following way:

  • Add custom translations to a IzPack resource CustomLangPack.xml_<ISO3>
  • The following translation keys and lookup order can be used:
    1. If a panel ID is defined:
      <panelId>.<subKey>
    2. If no panel ID is defined:
      <Fully_qualified_panel_classname>.<subkey>
Warning
titleChanges that might break existing IzPack 4 installers

The  order attribute of <panel> is no longer read (ignored) and can't therefore used as part of the translation key any longer.

For variant 2., the fully qualified classname must be used now, not just the simple one.

Example 1:

Code Block
languagehtml/xml
titleinstall.xml
<resources>
  <res id="CustomLangPack.xml_eng" src="i18n/CustomLangPack.xml_eng"/>
</resources>
 
<panels>
  <panel classname="TargetPanel"/>
</panels>
Code Block
languagehtml/xml
titleCustomLangPack.xml_eng
<langpack>
  <str id="com.izforge.izpack.panels.target.TargetPanel.headline" txt="Please select the installation directory"/>
</langpack>

Example 2:

Code Block
languagehtml/xml
titleinstall.xml
<resources>
  <res id="CustomLangPack.xml_eng" src="i18n/CustomLangPack.xml_eng"/>
</resources>
 
<panels>
  <panel classname="TargetPanel" id="target.panel"/>
</panels>
Code Block
languagehtml/xml
titleCustomLangPack.xml_eng
<langpack>
  <str id="target.panel.headline" txt="Please select the installation directory"/>
</langpack>