Re: Osaxen and Intel MBP's or iMacs
Re: Osaxen and Intel MBP's or iMacs
- Subject: Re: Osaxen and Intel MBP's or iMacs
- From: Christopher Nebel <email@hidden>
- Date: Thu, 2 Mar 2006 11:45:31 -0800
On Mar 2, 2006, at 11:14 AM, Paul Berkowitz wrote:
[T]here's no way for the script developer on a PPC box to make
his script application using a PPC osax such as 24U Appearance
Osax workable on a MacTel.
Sure there is -- don't build Universal. Really. If you know you
require a PPC-only library, then build your app PPC-only.
It was not clear to me, still on a PPC computer, that an applet
made on that PPC computer would be PPC-only and would not have this
problem.
It wasn't clear from your question whether you were referring to a
simple applet saved out of Script Editor or an AppleScript Studio
application. I thought you were talking about the latter, but really
you meant the former, and the solutions differ.
In general, AppleScript just works on Intel hardware. The trick is
that when you add third-party scripting additions into the mix, they
become part of the equation -- you're not talking about just the
stuff Apple ships any more. In order to run "native", the
application *and all the libraries it uses* must be available
"native". [1] For a script application, that means the AppleScript
core (check), any host bits (for an applet, this is supplied for you,
for Studio, you build this yourself), *and* any scripting additions
it uses. Standard Additions is covered, but for obvious reasons,
Apple can't guarantee that third-party additions are available natively.
So, if a scripting addition you want to use isn't available
Universal, what do you do? If you're using Studio, just don't build
your application Universal -- build PPC-only. For an applet, it's a
bit hairier, because there are two different formats for applets, and
they have different behaviors. Single-file applications
("Application" in the format menu) are always saved PPC-only, so no
worries there. Application bundles as of 10.4.4 (no matter what kind
of machine you're running) are saved Universal, and there's no option
to not do that. You therefore have two options: one, tell your users
to check the "Run in Rosetta" box if they're running on Intel
hardware; or two, manually make the Universal binary PPC-only by
using lipo(1). [2] (There's also option #3, which is to ask the
addition author to produce a Universal version. You should probably
do this in addition to #1 or #2.)
To answer your side question, the Get Info window (at least on an
Intel Mac, I'm not sure about PPC) will tell you which architecture
an application has been built for: the "Kind" will say either
"Application (PowerPC)" or "Application (Universal)". The latter has
an "Open using Rosetta" checkbox; the former does not since it would
be pointless. (Your suggestion of a checked and disabled checkbox
had occurred to me too, but I believe it's considered bad form to
have a disabled control that there's no way for the user to enable.)
--Chris Nebel
AppleScript and Automator Engineering
[1] That is, they've been compiled for the architecture they're
running on. In practical terms, this means that something is PPC-
only or Universal (both). It's technically possible to build
something Intel-only, but there are very few sane reasons to do that.
[2] The name "lipo" makes more sense if you know that "Universal"
binaries used to be referred to as "fat".
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden