Versions Compared

Key

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

...

Code Block
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" ?>
<izpack:processing version="5.0"
  xmlns:izpack="http://izpack.org/schema/processing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://izpack.org/schema/processing http://izpack.org/schema/5.0/izpack-processing-5.0.xsd">

  <processing>
    <job name="do xyz">
      <os family="windows" />
      <executefile name="$INSTALL_PATH/scripts/xyz.bat" workingDir="$INSTALL_PATH">
        <arg>doit</arg><arg>$variable</arg>
      </executefile>
    </job>
    <job name="do xyz">
      <os family="unix" />
      <executefile name="$INSTALL_PATH/scripts/xyz.sh">
        <arg>doit</arg><arg>$variable</arg>
     </executefile>
    </job>
    <job name="run on failure" catch="true">
      <os family="unix" />
      <executefile name="$INSTALL_PATH/scripts/run_on_fail.sh">
        <arg>doit</arg><arg>$variable</arg>
      </executefile>
    </job> 
    <job name="run always" final="true">
      <os family="unix" />
      <executefile name="$INSTALL_PATH/scripts/run_always.sh">
        <arg>doit</arg><arg>$variable</arg>
      </executefile>
    </job> 
  </processing>
 
</izpack:processing>

Each <job> may have the following attributes and an <os> attribute:

...

The ProcessPanel now also supports configurable behaviour for the panel's "Previous" and "Next" buttons. By adding <onFail> and <onSuccess> children to the <processing> <izpack:processing> element, you can define which buttons you want unlocked in case of failure and in case of success, respectively.

Code Block
<?xml version="1.0" encoding="UTF-8" ?>
<izpack:processing version="5.0"
  xmlns:izpack="http://izpack.org/schema/processing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://izpack.org/schema/processing http://izpack.org/schema/5.0/izpack-processing-5.0.xsd">


 <processing>
    <job name="do xyz">
      <executefile name="$INSTALL_PATH/scripts/xyz.bat">
        <arg>doit</arg><arg>$variable</arg>
      </executefile>
    </job>
    <onFail previous="true" next="false" />
    <onSuccess previous="true" next="true" condition="mycondition" />
    <onSuccess previous="false" next="true" condition="!mycondition" />
  </processing>

</izpack:processing>

In the above example the job do xyz would be run, and if it returned with an error, the next button would be greyed out, and the button to the previous page would be enabled. If it returned without an error, the conditions of the <onSuccess> elements would be checked and the respective action would be taken.

...

Code Block
<?xml version="1.0" encoding="UTF-8" ?>
<izpack:processing version="5.0"
  xmlns:izpack="http://izpack.org/schema/processing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://izpack.org/schema/processing http://izpack.org/schema/5.0/izpack-processing-5.0.xsd">

 
<processing>
    <job name="List files">
      <executeForPack name="Sources"/>
      <executeForPack name="Executables"/>
      <os family="windows" />
      <executefile name="$INSTALL_PATH\batch\ListFiles.bat" />
    </job>
  </processing>
 
</izpack:processing>

<logfiledir> - Output of the processPanel saved to a log

Output that is written to the ProcessPanel's textarea can be duplicated in an optional logfile. Add a <logfiledir> element to the <processing><izpack:processing> element of the  ProcessPanel.Spec.xml to tell IzPack the location, where the logfile should be stored.

...

Code Block
<?xml version="1.0" encoding="UTF-8" ?>
<izpack:processing version="5.0"
  xmlns:izpack="http://izpack.org/schema/processing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://izpack.org/schema/processing http://izpack.org/schema/5.0/izpack-processing-5.0.xsd">


 <processing>
    <logfiledir>$INSTALL_PATH</logfiledir>
    <job name="do xyz">
      <os family="windows" />
      <executefile name="$INSTALL_PATH/scripts/xyz.bat">
        <arg>doit</arg><arg>$variable</arg>
      </executefile>
  </processing>
 
</izpack:processing>

This will generate a logfile named e.g. Install_V1.3_2004-11-08_19-22-20_43423.log located in $INSTALL_PATH.

...