...
Code Block |
---|
language | html/xml |
---|
title | Common Example |
---|
|
<dynamicinstallerrequirements>
<installerrequirement severity="ERROR"
condition="this.condition.must.notbe.happenvalid"
messageid="this.condition.must.notbe.happenvalid.translation.id"/>
<installerrequirement severity="ERRORWARNING"
condition="this.condition.should.maybe.happenvalid"
messageid="this.condition.should.maybe.happenvalid.translation.id"/>
...
</dynamicinstallerrequirements> |
If a condition applies, a messagebox is shown with the appropriate content from translation. Depending on the value of severity attribute the installation might be continued or is aborted:
- "ERROR"
The messagebox is shown and the installation aborts. - "WARNING"
The messagebox is shown and the installation can continue after the OK button is pressed.
A more detailed example:
Code Block |
---|
|
<condition type="variable" id="isNew">
<name>previous.version</name>
<value>XX.XX.XX</value>
</condition>
<condition type="not" id="isUpgrade">
<condition type="ref" refid="isNew"/>
</condition>
...
<dynamicinstallerrequirements>
<installerrequirement condition="isUpgrade" severity="WARNING" messageid="not.an.upgrade.warning.message"/>
</dynamicinstallerrequirements>
...
<panels>
<panel classname="HelloPanel"/>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="InstallPanel"/>
<panel classname="FinishPanel"/>
</panels>
|
On each panel with a DynamicInstallerRequirementValidator assigned will be evaluated according to the requirements given as nested elements in <dynamicinstallerrequirements>
one of the conditions is false, this is counted as an error or warning respectively.
<installerrequirement> - Attributes
Attribute | Description | Default | Required |
---|
severity |
Note |
---|
Please see the note in the code above about severity vs status. |
The severity the validator should apply in case of the condition gets |
truefalse.Possible values: "WARNING" | "ERROR" |
Note |
---|
Unfortunately the behaviour does depend on the modus of the installer : |
|
Shows a warning message but does not abort- installer in graphical mode
A messagebox is shown; after closing it, the next panel is shown. - installer in text mode
The message is shown and you are asked, whether to proceed with the installation.
- "ERROR"
|
|
Shows a message and aborts the installation- installer in graphical mode
A messagebox is shown and you remain on the actual panel. If the failing condition depends on the user input on the panel, you may proceed the installation after providing an appropriate input. - installer in text mode
The message is shown and the installer ends with status code 1.
|
| none | yes |
condition | A valid condition ID defined within the <conditions/> element. | none | yes |
messageid | A valid message ID from the appropriate translation file. If it can't be found the mentioned ID itself is displayed instead of the translated text. | none | yes |