Adding component groups during the installer phase.

Comments

1 comment

  • Avatar
    wojciechka

    It is not possible to add components dynamically - either at build or at installation time.

    The only thing that can be done is to create a list of pre-defined components and modify their properties at installation time. For example:

    <component name="c00" canBeEdited="1" selected="0" show="0" /> <component name="c01" canBeEdited="1" selected="0" show="0" /> <!-- ... --> <component name="c99" canBeEdited="1" selected="0" show="0" />

    You can then only enable the components that are available.

    <preInstallationActionList> <setInstallerVariable> <name>component(c00).description</name> <value>Sample component text</value> </setInstallerVariable> <setInstallerVariable> <name>component(c00).detailedDescription</name> <value>Sample component text description</value> </setInstallerVariable> <setInstallerVariable> <name>component(c00).show</name> <value>1</value> </setInstallerVariable> <!-- ... --> </preInstallationActionList>

    Same approach can also be used for component groups - i.e. naming the group g00 and components in it c00 - so component 2 in group 1 would be g01c02. Then setting the values for components would be:

    <preInstallationActionList> <!-- show component group --> <setInstallerVariable> <name>component(g01).description</name> <value>Sample component text</value> </setInstallerVariable> <setInstallerVariable> <name>component(g01).detailedDescription</name> <value>Sample component text description</value> </setInstallerVariable> <setInstallerVariable> <name>component(g01).show</name> <value>1</value> </setInstallerVariable> <!-- show component inside the group --> <setInstallerVariable> <name>component(g01).component(g01c02).description</name> <value>Sample component text</value> </setInstallerVariable> <setInstallerVariable> <name>component(g01).component(g01c02).detailedDescription</name> <value>Sample component text description</value> </setInstallerVariable> <setInstallerVariable> <name>component(g01).component(g01c02).show</name> <value>1</value> </setInstallerVariable> <!-- ... --> </preInstallationActionList>

Please sign in to leave a comment.