Reputation: 177
Short question: How do you take two apps, one for intel and the other ppc, and package them into one Universal Binary?
My current thoughts on this problem:
I have read though the apple developer documentation on universal binaries and haven't been able to find an answer so it may not be possible.
Due to reasons I won't go into here I have two apps of my program (apposed to using xtools to compile the binary universally once), one for Intel Macs and the other for Mac >=10.3.9 running on PPC. Sharing resources is a non-issue.
I could put both MyProg_intel.app and MyProg_ppc.app into one zip and distribute it that way; but that may result in confusion for many people who I will be distributing my program to.
Upvotes: 6
Views: 4342
Reputation: 1378
Apple's developer web site has an article on Building an Open Source Universal Binary that explains how to use Xcode to 'package' a Universal Binary using build scripts. This is probably your best road to sanity. You could use lipo
, but in the long run if you are going to update and maintain your application, having an Xcode project that does the magic for you is going to take up a lot less of your time.
Upvotes: 0
Reputation: 6247
See the lipo tool. It will let you stitch together your PPC and i386 binaries.
Also, sometimes separate targets for different architectures can be avoided by using conditional build settings in Xcode. This is useful if you need to link against a different binary library for each architecture, for example.
Upvotes: 6
Reputation: 1261
Check out the man page for lipo. I believe you can use -create to take multiple input files and create a single output file with multiple architectures.
Upvotes: 4
Reputation: 359776
In order to create a Universal Binary, you have to use Xcode and select both Intel and PPC target architectures. As far as I know, you can't just stuff two different binaries into one .app ex post facto.
Upvotes: -1