• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Prevent running in Rosetta
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prevent running in Rosetta


  • Subject: Re: Prevent running in Rosetta
  • From: Shaun Wexler <email@hidden>
  • Date: Tue, 27 Dec 2005 15:31:01 -0800

On Dec 27, 2005, at 4:22 AM, j o a r wrote:

Hej,

We will provide Universal Binaries, or at least native versions, of our applications for the new i386 machines. We would at the same time like to ensure that no customer of ours can run an old ppc binary on i386 by accident.
Our app is huge and complex, and initial testing indicates that it doesn't work 100% OK in Rosetta. We don't want to spend any resources in making it work in Rosetta, or dealing with bug reports from customers using it in Rosetta.

Is there a way to easily prevent an application from running in Rosetta? It seems to me that there should be an Info.plist key to control this, but I can't find it. There is a key to make an app run in Rosetta (LSPrefersPPC ), but the inverse functionality seems to be missing.
I would love to NOT have to implement some sort of runtime hack fo ensure this, but if that's the only way to do it, I will - and in that case I would appreciate suggestions / sample code if you've tried this already.

#import <Cocoa/Cocoa.h>
#import <sys/sysctl.h>

int main(int argc, char *argv[])
{
int mib[2] = { CTL_HW, HW_MODEL };
char model[32];
size_t len = sizeof(model);

if (sysctl(mib, 2, &model, &len, NULL, 0) == 0 && len == 9 && strcmp(model, "PowerMac") == 0) {
fprintf(stderr, "Rosetta not supported\n");
}

return NSApplicationMain(argc, (const char **)argv);
}
--
Shaun Wexler
MacFOH
http://www.macfoh.com

Jobs was the One supposed to give balance to the Force... not join them!
Begun the attack of the clones, Apple has.


_______________________________________________
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
References: 
 >Prevent running in Rosetta (From: j o a r <email@hidden>)

  • Prev by Date: Re: Prevent running in Rosetta
  • Next by Date: CoreData and Shared Data
  • Previous by thread: Re: Prevent running in Rosetta
  • Next by thread: Retrieving data returned by AppleScript
  • Index(es):
    • Date
    • Thread