How to detect if I am running under OS X Intel or PPC ?

asked 14 Sep '11, 05:03

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%


Since InstallBuilder 6.3.0, the <platformTest> rule includes support for osx-intel and osx-ppc:

<initializationActionList>
  <throwError text="This installer requires an Intel processor">
    <ruleList>
      <platformTest type="osx" />
      <platformTest type="osx-intel" negate="1"/>
    </ruleList>
  </throwError>
</initializationActionList>
link

answered 03 Nov '11, 05:34

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

We eventually plan to add this functionality as a built-in installer variable, but for the time being you can use the below snippet. The "processorType" variable will contain either "powerpc" or "i386"

<initializationActionList>
  <setInstallerVariableFromScriptOutput name="processorType" execArgs="-p" exec="uname">
  <ruleList>
     <platformTest type="osx" />
  </ruleList>
  </setInstallerVariableFromScriptOutput>
</initializationActionList>
link

answered 14 Sep '11, 05:03

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%

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:

×11
×8
×5
×2
×2

Asked: 14 Sep '11, 05:03

Seen: 1,232 times

Last updated: 03 Nov '11, 05:34