[Pythonmac-SIG] A couple of universal binary questions

Ronald Oussoren ronaldoussoren at mac.com
Tue Jun 6 18:44:24 CEST 2006


On 6-jun-2006, at 18:33, Michael Glassford wrote:

> Is it possible to build a universal binary version of a Py2App/PyObjC
> based application that runs on pre-Tiger Macs? I assume this would
> require doing the build on a non-Intel Mac, since you generally  
> have to
> build it on the earliest system version you want to run it on to  
> get the
> right Foundation and AppKit. If so, could you point me to more
> information on how this is done?


The universal build runs on 10.3.9 or later. With some luck it might  
run on earlier 10.3 versions as well, I haven't tested that.  If you  
want to run on earlier versions (10.3.8, 10.2) you're basically on  
your own because the strategy used by the universal build won't work  
then. You'll have to use the strategy that is described by Apple on  
ADC: build a powerpc version using GCC, probably on the earliest  
version of OSX that you want to support and build the intel version  
on an intel mac using GCC 4. Then use lipo to paste the ppc and intel  
versions of binaries together.

You don't really have build on the earliest version of OSX that you  
want to support, at least not if you're very careful and know what  
you're doing. That's why there are SDK's that you can install with  
Xcode.

>
> What's the right way to detect within the application whether its
> running on an Intel or a PowerPC Mac? I can figure out a way on my own
> (such as looking at sys.byteorder), but I wonder if there's an
> "official" way.

Why do you want to know? It's generally better to write your code in  
such way that you don't have to care.  But if you really want to  
know: platform.mac_ver()[-1] is the architecture.

Ronald
>
>
> Thanks,
>
> Mike
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig



More information about the Pythonmac-SIG mailing list