Should Script Editor on an Intel iMac generate PowerPC apps?

Posted:
in Genius Bar edited January 2014
I'm just getting into AppleScript and found that one of the applications I created with the Script Editor is compiled as a PowerPC binary. It's only a silly little thing, but does anyone out there know whether there is a way to get it to compile Universal applications?

Comments

  • Reply 1 of 5
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by AllBrain

    I'm just getting into AppleScript and found that one of the applications I created with the Script Editor is compiled as a PowerPC binary. It's only a silly little thing, but does anyone out there know whether there is a way to get it to compile Universal applications?



    "Compile" in AppleScript just means to tokenize the source to bytecode, not to machine language. So the underlying CPU should not matter, as the script just gets interpreted by the OS as it is run. Your script should run fine on any OS X Mac.



    Strange that it says PPC - I guess they forgot to make a label for "Neither".
  • Reply 2 of 5
    That's fair enough. It was only a tiny little program for scaling an image that I copied the source code from online but it just struck me as strange that that would happen.



    It's not like ten lines of AppleScript are going to cause Rosetta too much trouble but I thought I'd see whether anyone else knew whether there was an option I could check to make them Intel binaries.
  • Reply 3 of 5
    "Intel Macs currently use Rosetta to run AppleScripts. AppleScripts do not need to be saved as Universal Binary (nor can they be); AppleScript Studio applications can be compiled to run on PowerPC and/or Intel Macs, but this is the developer's responsibility."



    According to: http://www.dougscripts.com/itunes/faq_cont.php#whatsas



    I'm finding an application compiled in Script Editor in Tiger Macintel 10.4.8 is shows up as PowerPC in Activity Monitor. It also crashes and has to Force Quit, but thats another story...



    Script is something like:



    do shell script "/Applications/VLC.app/Contents/MacOS/VLC --equalizer-preamp 12 --equalizer-bands \\"8,5.5,0,1,3,5,8,9,6.5,4.5\\""

    delay 5

    tell me to quit

    --quit application "VLC Eq Launcher"
  • Reply 4 of 5
    http://www.macosxhints.com/article.p...06080109510225

    says



    [Aug 2006]

    "In Script Editor, if you save as Application, this will create a PowerPC-only application -- it will launch on an Intel mac, but under Rosetta. However, if you save it as an Application Bundle instead, this will create a Universal binary. The Application Bundle behaves the same in the GUI as an Application -- it is a double-clickable application.



    Note that the actual script itself is not compiled in either case, it is interpreted at run-time. What is changed is the wrapper around the script. This means that saving as an Application Bundle on an Intel Mac will not improve the execution time of the actual script, but you should notice a significant improvement in launch time, as Rosetta does not have to be invoked. If you saved any scripts as Applications on a PowerPC Mac and have since upgraded to an Intel Mac, you can always open them in Script Editor and re-save them as Application Bundles."
  • Reply 5 of 5
    I saved as Application Bundle and app shows up as Intel now. Yay! 8)
Sign In or Register to comment.