I would like to know how to add component groups during the installer phase.

My scenario is that during the pre-installation I retrieve (using a script) the names of the parent/children directories from a source on the internet and I would like them to be displayed for selection by the user on a component selection page. These directories get updated regularly hence why I cannot include them in the build phase.

So is this possible, is there a way to dynamically add component groups during the installation phase?

asked 09 Aug '12, 11:51

droscoe's gravatar image

droscoe
1111
accept rate: 0%


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>

link

answered 13 Aug '12, 04:45

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×39

Asked: 09 Aug '12, 11:51

Seen: 1,689 times

Last updated: 13 Aug '12, 04:45