Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Wowfunhappy

macrumors 68020
Original poster
Mar 12, 2019
2,031
2,212
Hello! I thought this might be something this forum could help with!

I wrote a relatively simple Applescript in the Script Editor on High Sierra, and I want to export it as an application that will run on both Intel and PPC macs. I may theoretically need to run it on a PPC Tiger machine some day, and I'd like it to work without recompiling.

I noticed that the applet binary exported from Applescript is not a universal binary—it contains 32bit and 64bit Intel code, but nothing for PPC. Is there any way to make a single, universal PPC/Intel binary?

I don't actually have access to any PPC machines (and I really don't want to deal with an emulator), but I do have a computer running Mavericks, and I can easily spin up Mountain Lion or Snow Leopard in VMWare Fusion. Will any of these OS's export universal binaries, or do I have to do something else?

Thanks!
 
Hello! I thought this might be something this forum could help with!

I wrote a relatively simple Applescript in the Script Editor on High Sierra, and I want to export it as an application that will run on both Intel and PPC macs. I may theoretically need to run it on a PPC Tiger machine some day, and I'd like it to work without recompiling.

I noticed that the applet binary exported from Applescript is not a universal binary—it contains 32bit and 64bit Intel code, but nothing for PPC. Is there any way to make a single, universal PPC/Intel binary?

I don't actually have access to any PPC machines (and I really don't want to deal with an emulator), but I do have a computer running Mavericks, and I can easily spin up Mountain Lion or Snow Leopard in VMWare Fusion. Will any of these OS's export universal binaries, or do I have to do something else?

Thanks!
I don't think there's a way to do that without recompiling the app inside Script Editor on the PowerPC Macs.
 
Okay, I managed to figure this out with some experimentation!

For posterity: exporting an Applescript applet from Snow Leopard creates a universal binary for ppc, x86_32, and x86_64.

Doing the same from Mountain Lion produces a binary for only x86_32 and x86_64 architectures.

Conveniently, once the app has been created by Snow Leopard, I can open it in High Sierra's Script Editor and make and save changes, and the applet binary does not appear to change.

So if you want a universal applet, just make sure to export the initial binary from Snow Leopard!

(No thanks to Apple for breaking backwards compatibility for no apparent reason...)
 
Okay, I managed to figure this out with some experimentation!

For posterity: exporting an Applescript applet from Snow Leopard creates a universal binary for ppc, x86_32, and x86_64.

Doing the same from Mountain Lion produces a binary for only x86_32 and x86_64 architectures.

Conveniently, once the app has been created by Snow Leopard, I can open it in High Sierra's Script Editor and make and save changes, and the applet binary does not appear to change.

So if you want a universal applet, just make sure to export the initial binary from Snow Leopard!

(No thanks to Apple for breaking backwards compatibility for no apparent reason...)
Thanks for this!

I have an SL only Mac at home so this is good to know.
 
Nice work. Snow Leopard dropped a lot of PowerPC code, but still maintained that Universal Binary bridge for several apps/services.

Similarly, Xcode 3.2.6 on 10.6 will compile 10.4/ppc and UB apps, which was dropped in Xcode 4.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.