Hi, I have a component in my component selection page which is only for Mac OSX. I would like to either deselect and hide it if the platform is not OSX, or not pack it at all. I tried using the shouldPackRuleList but got errors:

<shouldPackRuleList>
    <platformTest type="osx"/>
</shouldPackRuleList>

I tried to use an if statement but got errors there too.

<if>
  <actionList>
    <componentSelection>
      <deselect>nameOfMyComponent</deselect>
    </componentSelection>
<show>0</show>
  </actionList>
  <conditionRuleList>
    <platformTest type="osx"/>
  </conditionRuleList>
</if>

Any help very appreciated, thanks!

asked 27 Aug '12, 16:45

ddouglas_KMI's gravatar image

ddouglas_KMI
21446
accept rate: 50%


The <shouldPackRuleList> should not throw any errors but it was not exactly correct. You should use:

<component>
   ...
   <shouldPackRuleList>
     <compareText text="${platform_name}" logic="equals" value="osx"/>
   </shouldPackRuleList>
   ...
</component>
link

answered 28 Aug '12, 03:49

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Thanks! Now I see what I did wrong. That worked perfectly.

(28 Aug '12, 17:35) ddouglas_KMI
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:

×49
×17
×13
×9
×7
×3
×1

Asked: 27 Aug '12, 16:45

Seen: 1,578 times

Last updated: 28 Aug '12, 17:35