Hello Support Team,

Is there in the installer a built in variable or command which holds the OS arch (if it is 32 or 64 bit).

Thanks, Ronen

asked 06 Mar '13, 08:20

Ronen's gravatar image

accept rate: 0%

This depends on operating system. For Windows, you can simply use a <platformTest> rule against windows-x86 and windows-x64. For example:

<actionGroup> <actionList> <!-- ... --> </actionList> <ruleList> <platformTest type="windows-x86"/> </ruleList> </actionGroup> <actionGroup> <actionList> <!-- ... --> </actionList> <ruleList> <platformTest type="windows-x64"/> </ruleList> </actionGroup>

For Linux, the test can be against linux-x64 to check if the machine is 64-bit and negated test for linux-x64 detects that it is a Linux 32-bit machine. For example:

<actionGroup> <actionList> <!-- ... --> </actionList> <ruleList> <platformTest type="linux"/> <platformTest type="linux-x64" negate="1" /> </ruleList> </actionGroup> <actionGroup> <actionList> <!-- ... --> </actionList> <ruleList> <platformTest type="linux-x64"/> </ruleList> </actionGroup>

For OS X, the issue is more complex as you may want to detect if kernel is 64bit or if CPU supports 64bit, as OS X running in 32bit mode can run 64bit binaries. As this is a more complex issue, there is currently no option to check it using <platformTest>.


answered 06 Mar '13, 08:48

wojciechka's gravatar image

wojciechka ♦♦
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



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



Asked: 06 Mar '13, 08:20

Seen: 1,377 times

Last updated: 06 Mar '13, 08:48