launching an OSX bundle

Andre Garzia andre at
Tue Jul 29 00:49:35 EDT 2008


using something like

launch -a <app name>

will free you from dealing with path references, for example:

launch -a firefox

will launch firefox no matter where is located, courtesy
of launcservices framework or whatever keeps track of the filesystem
these days...

As for having a difference, I know one, calling the binary direct will
"freeze" the process context that called it, for example if you open a
terminal window and use a command to call the binary, you'll see that
it doesn't return till the application exits, so, as far as the
terminal opened is concerned, the application is running and blocking
further interaction in that context, also you'll be able to see data
sent for STDOUT in the terminal. This is a good way to display debug
info for example, make your app output to stdout and call the binary.

If you use launch, then the application is launched in another
context, so, if you open a terminal and call launch you'll see that it
returns immediately no matter if the apps keep running or not. Also
stdin/stdout/stderr will be different then they are from launching by
calling the binary.

So what method you want depends on what you need. Do you need to
capture output, then calling the binary is the best option, if you
want to launch an app and forget about it, then launch will do it. I
think that calling shell() with the binary reference will block until
the called app exits but I am not sure.

hope this helps

On Sun, Jul 13, 2008 at 7:13 PM, Scott Morrow
<scott at> wrote:
> I'm wondering if issuing the "launch" command to:
> /Applications/OSX
>  produces different results than issuing the command to
> Both seem to launch the app.  Just curious if there is a difference that I
> might not be noticing?
> Scott Morrow
> Elementary Software
> (Now with 20% less chalk dust!)
> web
> email     scott at
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:

-- All We Do Is Code.

More information about the use-livecode mailing list