Versions Compared

Key

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

...

The InstallationGroupPanel groups the pack together. A panel which displays the available installGroups found on the packs to allow the user to select a subset of the packs based on the pack installGroups attribute. can be used to show packs by groups. Installation groups are assigned to packs by the installGroups attribute, see the <packs> element description.

This panel will be skipped if there are no pack elements with an installGroups attribute. For

Code Block
languagehtml/xml
titleInstallationGroupPanel example
<installation version="1.0">
   (...)
    <panels>
        (...)
        <panel classname="InstallationGroupPanel"/>
        <panel classname="PacksPanel"/>
        (...)
    </panels>

    <packs>
        <pack name="Base"
            installGroups="Group1"
            required="yes">
            (...)
        </pack>
        <pack name="Docs"
            installGroups="Group1,Group2"
            required="no">
            (...)
        </pack>
        <pack name="Sources"
            installGroups="Group3,Group2"
            required="no">
            (...)
        </pack>
    </packs>
</installation>

...

 

In the above example, when InstallationGroupPanel is displayed, it contains three radios named Group1, Group2 and Group3. Depending on what user selects, the respective Packs will be displayed in PacksPanel. InstallationGroupPanel will look for a description corresponding to the key "InstallationGroupPanel.description.Group1", "InstallationGroupPanel.description.Group2" etc in installation langpacks and variables and displays this description for each of the Group_i.

...

Here is an example for alternative sorting of groups:

Code Block
languagehtml/xml
(...)
<variables>
   (...)
    <variable
    name="InstallationGroupPanel.sortKey.Group2" value="A"/>
    <variable
    name="InstallationGroupPanel.sortKey.Group1" value="B"/>
    <variable
    name="InstallationGroupPanel.sortKey.Group3" value="C"/>
</variables>
(...)

...

By default, your group name (and description) are displayed as-is in the installer. If you want them to be localized, add localized names to yourpacksLang.xml resources. The string ID has to be InstallationGroupPanel.group.```group_name``.

Here is an example to localize groups into French (these lines have to be put in your packsLang.xml_fra resource) :

Code Block
languagehtml/xml
<str id="InstallationGroupPanel.group.Core" txt="Noyau de l'application" />
<str id="InstallationGroupPanel.description.Core" txt="Fichiers principaux, indispensables au fonctionnement de l'application" />
<str id="InstallationGroupPanel.group.Samples" txt="Fichiers d'exemple" />
<str id="InstallationGroupPanel.description.Samples" txt="Fichiers d'exemples" />

...

If you want to add html markup to those strings, add .html at the end of the string id (after the group name).