Re: Determining how the app is run (intel/ppc/rosetta/os version)?
Re: Determining how the app is run (intel/ppc/rosetta/os version)?
- Subject: Re: Determining how the app is run (intel/ppc/rosetta/os version)?
- From: Cameron Bahan <email@hidden>
- Date: Sun, 21 May 2006 07:41:56 -0400
My gut reaction is - fix the core problem and move back to a UB app.
Now, the problem might be quite deep and hidden - but you say that it
is throwing an exception? Since you have been working in a "warning"
condition for years - could you catch the exception and move on with
some default values? If the problem lies in the core Apple libraries
they could change how it handles from release to release.
Otherwise, if you are going to stick with a PPC based app you could
use "uname -p" which returns the processor type (ex. i386). From
there you could assume that if on i386 you will be in rosetta. (see
the man pages for other 'uname' options)
Cameron
On May 21, 2006, at 5:51 AM, Gerben Wierda wrote:
On 21 May 2006, at 11:09, j o a r wrote:
On 21 maj 2006, at 10.38, Gerben Wierda wrote:
I would like to determine very specificly how my app is being
run. E.g.
- On 10.4.4 on intel using rosetta
- On 10.4.6 ppc
- On 10.3.9 ppc
The app is a universal binary where the intel part is compiled
for Tiger (of course) and the ppc part is comppiled for 10.3 and
linked against MacOSX10.3.9.sdk
What exactly are you trying to do? What is the problem you're
trying to solve by doing this?
For example, if your app is a UB, why would you ever run in Rosetta?
Because my app ran fine as UB in 10.4.3 on a DTK even though there
was an unexplained problem. This problem I could not solve (deep
inside Apple's Frameworks somehow an NSData object was produced
with a negative length, to put it shortly) but luckily it only gave
a warning in console.app when the NSData was changed in an NSString
(this was subprocess output data) and the NSString (nil) was used
in an NSView. That way, my app ran for years.
With 10.4.4 this produced an exception and I had therefore revert
to a ppc-only app that is compiled against 10.3.9 and that thus
again only gave the warning.
With 10.4.6, my app has become one of a set that triggers the
partial freeze (like MatLab), see http://www.macfixit.com.
So, I now have to put out an app that does not run on 10.4.4 and up
on intel. And if I fix it such that it works via rosetta, I would
like to be able to let it run as a rosetta app but not native. I
want this check in my code so that it does not depend on my compile.
A link that might be of interest:
<http://developer.apple.com/technotes/tn2002/tn2064.html>
I know all that but it is not enough afaics.
G
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden