Re: Finding the user's processor type...
Re: Finding the user's processor type...
- Subject: Re: Finding the user's processor type...
- From: j o a r <email@hidden>
- Date: Mon, 28 Nov 2005 11:01:08 +0100
On 28 nov 2005, at 10.31, Uli Kusterer wrote:
Am 28.11.2005 um 03:44 schrieb Mr Chris Giddings:
Documentation on this area of gestalt is sparse at best and
generally only covers pre G5 machinery. With the advent of the
Intel based machinery it seems there isn't a methodology for
interpreting the user's processor type with gestalt. Is there
another method I should be pursuing here?
I have the feeling that Gestalt is being phased out. Just like the
machine name/model ID stuff, newer OS releases are providing less
and less information. Since you need two compile runs, one for
Intel and one for PPC, A way to at least tell whether you're
running Intel or PPC would be to use a preprocessor macro that
compiles to the code you already have on PPC or to a generic
@"Intel Macintosh" string on Intel.
Right, as there will be a separate binary per CPU architecture it
probably make sense to make all decisions at compile time. At least
as long as you're only interested in distinguishing between ppc / i386.
Another option may be to parse the output from System Profiler. I
vaguely recall they introduced a more stable output format in 10.4
or 10.3 that *can* actually be parsed and isn't subject to change
anymore. There's a command-line tool that does what System Profiler
does, so running them should be as easy as firing off an NSTask.
Aouch - don't do that!
If you need to do runtime checks for this, use Gestalt, or sysctl:
<http://www.cocoabuilder.com/search/archive/cocoa?words=cpu+type>
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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