Comments

1 comment

  • Avatar
    Jake

    Since InstallBuilder 6.2.1, you can use if-else clauses to reuse your rules. Instead of using:

    <actionGroup>
       <actionList>
          <!-- Some Actions related to Windows -->
       </actionList>
       <ruleList>
          <platformTest type="windows" />
       </ruleList>
    </actionGroup>
    
    <actionGroup>
       <actionList>
          <!-- Some Actions not related to Windows -->
       </actionList>
       <ruleList>
          <platformTest negate="1" type="windows" />
       </ruleList>
    </actionGroup>
    

    You can use:

     <if>
      <conditionRuleList>
          <platformTest type="windows" />
      </conditionRuleList>
      <actionList>
         <!-- Some Actions related to Windows -->
      </actionList>
      <elseActionList>
         <!-- Some Actions not related to Windows -->
      </elseActionList>
    </if>
    

    The new action also accepts a <conditionRuleEvaluationLogic> tag which defaults to 'and':

     <if>
      <conditionRuleEvaluationLogic>or</conditionRuleEvaluationLogic>
      <conditionRuleList>
          <platformTest type="windows" />
          <platformTest type="osx" />
      </conditionRuleList>
      <!-- Actions executed if the condition is true -->
      <actionList>
         <!-- Some Actions related to Windows or OS X-->
      </actionList>
      <!-- Actions executed if the condition is false -->
      <elseActionList>
         <!-- Some Actions not related to Windows or OS X -->
      </elseActionList>
    </if>
    

Please sign in to leave a comment.