We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Skip to end of metadata
Go to start of metadata

IzPack FAQ

Language files

Q: I received notification mail of changed language file. Why my modifications look different in my mail as I was edited in the editor? There seem to be wrong characters.

A: First line in language XML file tells the encoding of the text. It could be for example "iso-8859-1", "utf-8" and so on. When version system sends the notification mail the content may not be in the same format as your modifications. In addition your mail program will view text with encoding which is in settings and it may differ from language file encoding. You may change encoding for current viewed mail in some mail programs. Changing encoding to correct one should view text with your language characters. Note that this change might not be permament.

XML files (encoding)

Q: I have made XML file with UTF-8 encoding. Why it has extra characters beginning of the file? Another problem may occure too: some panes won't be shown.

A: You should use encoding aware editor and save it without BOM (Byter Order Mark). XML parser which IzPack is using at this moment won't work correct with BOM.

In order to have correct encoding to work add following line in very beginning of IzPack XML files:

<?xml version=1.0" encoding="utf-8" ?>

and save them without byte order mark. If you use this for all other encodings too, some editors will warn you if you are adding characters which won't be able to be encoded with current encoding setting. There is always encoding in language pack files. See them too.

Don't use Windows Notepad.exe editor because it automatically adds BOM into the file when it is encoded with UTF-8. Here is just brief list of the editors which will handle encodings:

Open Source editors:

  • Crimson Editor
    • lightway text editor but you need to select saving as UTF-8 w/o BOM
    • Windows
  • Eclipse (saves automatically w/o BOM)
    • multi-platform
  • NetBeans (saves automatically w/o BOM)
    • multi-platform

Commercial editors:

  • Altova XML Editor
    • Windows
  • Visual Studio 2008
    • Windows.
  • TextMate
    • MacOS X text editor.

Mac OSX External Packages

 

Q: How can I execute the a package installer on Mac OSX from IzPack?

A: You can include a shell script with your IzPack installer that mounts a dmg, then launches the installer within it. The shell script looks something like this:

#!/bin/sh
hdiutil mount $INSTALL_PATH/yourpackage.dmg
open /Volumes/yourpackage/YourPackageInstaller.mpkg/

To execute the shell script from within a <pack> in your install.xml file, use the following lines:

<pack name="yourpackage" os="mac">
  <parsable targetfile="$INSTALL_PATH/loaddmg.sh"/>
  <file targetdir="$INSTALL_PATH/" src="yourpackage.dmg"       os="mac" unpack="false"/>
  <executable type="bin" stage="never" targetfile="$INSTALL_PATH/loaddmg.sh" os="mac" />
  <executable type="bin" stage="postinstall" targetfile="$INSTALL_PATH/loaddmg.sh" os="mac" />
</pack>

The <parsable> line replaces the $INSTALL_PATH token in your shell script so that IzPack can call the shell script. The <file> line copies the actual dmg to your installation path. The first <executable> line makes the shell script executable (i.e. chmod a+rx). The second <executable> line executes the shell script. This code assumes you've named your shellscript 'loaddmg.sh'. When you run your installer, you should see the external installer launch at the end of your installers execution.

Debug Output

Q: How can I get more debug output from an installer?
A: You can execute the installer with the following command to get a full debug stream from IzPack:

java -jar -DTRACE=TRUE yourinstaller.jar

Q: How can I debug an uninstaller as it launches itself several times to remove file locks and hence we get no console output?
A: For IzPack 5, see Debugging Uninstallers

    For IzPack 4, see the solution proposed by Christian d'Heureuse at http://jira.codehaus.org/browse/IZPACK-331

  • No labels