Turn an AppleScript into a .app bundle? - Follow up to list archives
Turn an AppleScript into a .app bundle? - Follow up to list archives
- Subject: Turn an AppleScript into a .app bundle? - Follow up to list archives
- From: Andrew <email@hidden>
- Date: Mon, 07 Jul 2003 17:24:14 -0400
I was wondering if anyone has tried to turn an applescript applet into an
application bundle. I came across this answer in the archives ->
>
Subject: Re: Turn an AppleScript into a .app bundle?
>
>
On Friday, September 27, 2002, at 11:29 AM, "David A. Cox"
>
<email@hidden> wrote:
>
>
> I have been trying to make an AppleScript into a .app bundle for
>
> several
>
> days now with no luck on OS X.
>
>
>
> I would like to be able to build a bundle on the fly via applescript.
>
>
>
> I can see what the folder structure is for a .app bundle, but if I
>
> create
>
> a folder called "MacOS" inside a folder called "Contents" the scrip
>
> will
>
> no longer run. The script I am using is an "application" that has been
>
> saved with "don't show startup" and "stay open" flags set. It works
>
> everywhere on my system unless I put it in the /Contents/MacOS
>
> location.
>
>
>
> When it is in this spot, the script come sup with the "pres Run to run
>
> this script, or Quit to quit." dialog. If I choose to run the script, I
>
> get the error -1344 "Could not run the script "bla" becuase of a
>
> program
>
> error."
>
>
>
> I have tried a few bundle making programs, and they all strip the
>
> applescirpts resource fork and put it in a file, from which it does not
>
> work.
>
>
>
> The reason I want to bundle this thing up is that it has support files
>
> that I do not want people to seperate from the script. Bundeling it up
>
> would be a great way to do that.
>
>
>
> Has anyone made a .app out of a folder with an applescript as the core?
>
>
We don't support bundled applets yet, it's planned for a future
>
version. Because an applet is a CFM two-fork style executable, it
>
can't be used in the MacOS folder of a bundle, and if you put it
>
elsewhere in a bundle Mac OS X will assume that you want to run it in
>
Classic, which is probably not what you want.
>
>
To build a bundle on the fly with AppleScript, you need a binary
>
executable in the /MacOS folder of the bundle that will load a script
>
and run it. The AppleScript Studio executable does exactly this; your
>
script could just build a bundle that uses the parts from a Studio
>
application (the executable, the nib, the application.applescript
>
script) and adds your custom resources and scripts.
>
>
Chris
I had the same symptoms however if I moved the applet to the "contents"
level, that is, the same level as the MacOS folder would be. My script
applet runs fine and it runs in macOS X ('I know 'cause I'm using "do shell
script" and it works fine).
So what happened? Did doing this become "supported"? Why does it still not
work if the applescript is in the MacOS folder? Why can't I find any better
docs on application bundles other than this
<
http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/B
undles/chapter_5_section_1.html>?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.