Re: Prevent running in Rosetta
Re: Prevent running in Rosetta
- Subject: Re: Prevent running in Rosetta
- From: Dirk Stegemann <email@hidden>
- Date: Tue, 27 Dec 2005 18:05:04 +0200
Hello,
Am 27.12.2005 um 15:16 schrieb Stephane Sudre:
Maybe the easiest solution is to check for the CPU type in your PPC
code (either with mach API or sysctl hw.cputype). If it does not
look like a PowerPC, then quits with a nice warning message. Or you
could use the hw.byteorder sysctl.
I didn't test yet by myself, but seem to remember others stating that
a program run in Rosetta will see the PPC as its host's architecture.
In case I'm wrong, good for you ;-)
In case I'm right, I just thought about another solution which should
work more reliably -- although I'm not sure how the program's
behaviour will look like in reality:
within your bundled appplication's ressources, you could provide a
minimal DLL which you would try to load at runtime. Depending on the
DLL's architecture and the environment (PPC / Rosetta, or i386) this
will fail or succeed.
Best regards,
Dirk Stegemann,
Syncrosoft Development
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
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