Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
3 rating:
 1.66 out of 5   

How to Create a Macintosh Universal Binary Application or Framework Using LabVIEW



Primary Software:
Primary Software Version: 8.2
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>LabVIEW Base Package, LabVIEW Development Systems>>LabVIEW Full Development System, LabVIEW Toolkits>>LabVIEW Application Builder

Problem: How do I create a Macintosh Universal Binary application or framework using LabVIEW Professional or LabVIEW with Application Builder?

Solution: This functionality is only available in LabVIEW 8.2 and later for Macinstosh. If you build a LabVIEW 8.2 application on a PowerPC (older) or an Intel (newer) Macintosh, and it does not work when moving it to another machine (after installing the LabVIEW Runtime Engine), you may want to consider building a Universal Binary. A Universal Binary is an application or framework that runs natively on both PowerPC and Intel based Macintosh machines. In LabVIEW 8.2, if an application is built for a different architecture than it is running on, it will show the LabVIEW splash screen and ask to open VIs on launch. If you see this behavior when running an application, or if your framework fails silently, you should create a Universal Binary.

A Universal Binary application or framework can only be created on an Intel based Macintosh. To do so, follow these steps:
  1. Make sure you have Xcode 2.2 or later installed
  2. Make sure you have LabVIEW 8.2 Professional installed (or LabVIEW 8.2 with Application Builder installed)
  3. Build your application or framework as you normally would
  4. Copy AppContents_i386.llb out of the application or framework to your desktop. For an application, control-click on the application and select "Show Package Contents" and you will see the LLB. For a framework, it is in the top level of the framework.
  5. Quit LabVIEW
  6. Select LabVIEW in the Finder and Get Info
  7. In the General section of the Get Info window, there is a check box titled "Open using Rosetta" Check this box and close the Get Info window.
  8. Open LabVIEW and build your application or framework again.
  9. Copy AppContents_i386.llb from the desktop into your application or framework.
  10. Quit LabVIEW
  11. Open the Get Info window on LabVIEW and turn off "Open using Rosetta"
Your application or framework is now Universal Binary.

If you are on a PowerPC Macintosh and want to build a LabVIEW 8.2 application that will run in the emulation layer of an Intel Macintosh, you will need to remove the partial Intel code included in the application or framework. This partial Intel code is included on purpose to allow applications and frameworks to be made into Universal Binaries. If you are building the LabVIEW 8.2 application or framework on a PowerPC and intend to also run it on an Intel Macintosh, you either need to create a universal binary (using the steps above) to allow for native execution or remove the partial Intel code to allow for execution in the emulation layer of the Intel Macintosh. To remove the partial Intel code, open the Make PowerPC Only.vi (attached below), drag the application (.app) or framework (.framework) into the front panel Path Control, and then run the VI.

Note: Applications and frameworks built in LabVIEW versions prior to LabVIEW 8.2 will run in the Rosetta emulation layer of Intel Macintosh machines without having to use the utility attached below.

Related Links:
Apple Developer Connection

Attachments:


Make PowerPC Only.vi


Report Date: 09/01/2006
Last Updated: 09/06/2006
Document ID: 410DK5ZH

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit