Creating jar installers of PEtALS

Requirements

Installers are created with IzPack. You need to install it and to set his bin directory in your PATH environment variable.

PEtALS must have been compiled first with Maven, see Developping Petals for more informations about this.

Directory structure

Files are located in $PETALS_HOME/tools/petals-installers :

  • build.xml : the ant task to launch the process
  • install.xml : IzPack xml configuration file, describe options and files to add in the installer
  • install_utils : files needed by IzPack to create the installer
    • img : logo and other decoration images
    • custom.fra.xml : additionnal texts for french installer
    • custom.xml : additional texts for all languages

Building installers

In command line, simply go in the directory and launch ant, it will create a directory "petals-installers" in wich will be generated standalone and web installers :

$ cd $PETALS_HOME/petals-installer
$ ant
Buildfile: build.xml
compile:
[mkdir] Created dir: ./petals-installers
[echo] * Creating Standalone Installer *
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-fullinstaller.jar
[izpack] Copying 35 files into installer
[izpack] Merging 10 jars into installer
[izpack] Writing 16 Packs into installer
[echo] * Creating Online Installer *
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-webinstaller.jar
[izpack] Copying 35 files into installer
[izpack] Merging 10 jars into installer
[izpack] Writing 16 Packs into installer
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack0.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack1.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack2.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack3.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack4.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack5.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack6.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack7.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack8.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack9.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack10.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack11.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack12.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack13.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack14.jar
[izpack] Building installer jar: ./petals-installers/petals-1.1.alpha-onlineinstaller.pack15.jar
BUILD SUCCESSFUL
Total time: 13 seconds

To generate only one of the installer, you must use the IzPack command line :

$ compile install.xml -b . -o ./petals-installers/petals-1.1.alpha-fullinstaller.jar -k standard
or
$ compile install.xml -b . -o ./petals-installers/petals-1.1.alpha-onlineinstaller.jar -k web

See IzPack documentations for more information about command options.

Files generated

IzPack generate executable jars wich can be used on any platform (Windows, MacOS, Linux).

Standalone installer

One single file is created : petals-1.1.alpha-fullinstaller.jar

Web installer

IzPack create one jar for the installer (petals-1.1.alpha-webinstaller.jar) and one jar for each pack element (petals-1.1.alpha-webinstaller.pack.jar).
When installing, depending to the user choice, IzPack will download only packs needed or chosen by the user.
A pack element is a set of files to install. For more informations on the packs, see the IzPack documentation and the Petals install.xml file.

Launching & testing installers

To launch one of the installer created, simply use the java command line :

$ java -jar petals-1.1.alpha-fullinstaller.jar
or :
$ java -jar petals-1.1.alpha-webinstaller.jar

For the web installer, the url to download packs is specified in the install.xml by the webdir parameter. If you want to test your packs, you must have a webserver active and specify its url before the installer generation.