Comments

1 comment

  • Avatar
    Jake

    The default flow of the pages is determined by the position in which they appear in the XML project but this flow can also be controlled through the and tags:

    <parameterList>
        <directoryParameter>
            <name>installdir</name>
            <description>Installer.Parameter.installdir.description</description>
            <explanation>Installer.Parameter.installdir.explanation</explanation>
            <value></value>
            <default>${platform_install_prefix}/${product_shortname}-${product_version}</default>
            ...
        </directoryParameter>
        <licenseParameter>
            <name>myLicense</name>
            <title>License Agreement</title>
            <insertBefore>installdir</insertBefore>
            <description>Please read the following License Agreement. You must accept the terms of this agreement before continuing with the installation.</description>
            <explanation></explanation>
            ...
        </licenseParameter>
    </parameterList>
    

    In the example above, even if the <licenseParameter> is placed after the <directoryParameter>, it will be displayed before because we have explicitly declared it with <insertBefore>installdir</insertBefore>

    However, sometimes we need to control this flow dynamically at runtime base in some conditions. You can set the 'next_page' installer variable to the name of the page that you would like to show after pressing the "Next" button on the installer window.

    The name of a page is the name of the parameter associated with that page. For instance:

      <setInstallerVariable name="next_page" value="installdir" />
    

    Would make the installer show the installdir page after pressing "Next".

    Installers also have some built-in pages, below are their names in order to use 'next_page' to jump to them:

    'welcome' : the welcome page
    'components' : the component selection page
    'readytoinstall' : the ready to install page
    'installation' : main installation page
    'installationFinished' : the final page
    

    One typical place to set the 'next_page' variable is in the <postShowPageActionList>

    Finally, it is also evaluated or taken into account in the <validationActionList> as the page to go if validation fails.

Please sign in to leave a comment.