launching an OSX bundle

View: New views
8 Messages — Rating Filter:   Alert me  

launching an OSX bundle

by Scott Morrow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm wondering if issuing the "launch" command to:

/Applications/OSX bundle.app

  produces different results than issuing the command to

OSX bundle.app/Contents/MacOS/theBinFile

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       http://elementarysoftware.com/
email     scott@...


_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Sivakatirswami :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Scott:

Say What?  :-)

When are you going to release the Mac InTel version?

I have some people whose 1st language is not English that might enjoy this.


Sivakatirswami

Scott Morrow wrote:

> I'm wondering if issuing the "launch" command to:
>
> /Applications/OSX bundle.app
>
>  produces different results than issuing the command to
>
> OSX bundle.app/Contents/MacOS/theBinFile
>
> 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       http://elementarysoftware.com/
> email     scott@...
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution@...
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Andre Garzia-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Scott,

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 firefox.app 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
andre

On Sun, Jul 13, 2008 at 7:13 PM, Scott Morrow
<scott@...> wrote:

> I'm wondering if issuing the "launch" command to:
>
> /Applications/OSX bundle.app
>
>  produces different results than issuing the command to
>
> OSX bundle.app/Contents/MacOS/theBinFile
>
> 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       http://elementarysoftware.com/
> email     scott@...
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution@...
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



--
http://www.andregarzia.com All We Do Is Code.
_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Jim Sims :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jul 29, 2008, at 6:49 AM, Andre Garzia wrote:

> launch -a <app name>
>
> will free you from dealing with path references, for example:
>
> launch -a firefox
>
> will launch firefox no matter where firefox.app is located, courtesy
> of launcservices framework or whatever keeps track of the filesystem
> these days...

Using terminal with Mac 10.5.4  I get the following results:

Last login: Tue Jul 29 06:53:38 on ttys000
Macintosh:~ jimsims$ launch -a Pages
-bash: launch: command not found
Macintosh:~ jimsims$


No worky.

sims
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Across Platforms - Code and Culture
http://www.ezpzapps.com/blog/




_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Andre Garzia-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

AAAAAAARRRRGGGHHHHHHHHH

sorry, it's 2:08 AM and I have a mild fever...

I mean:

open -a firefox

silly things, open, launch...

sorry
andre

On Tue, Jul 29, 2008 at 1:58 AM, Jim Sims <sims@...> wrote:

>
> On Jul 29, 2008, at 6:49 AM, Andre Garzia wrote:
>
>> launch -a <app name>
>>
>> will free you from dealing with path references, for example:
>>
>> launch -a firefox
>>
>> will launch firefox no matter where firefox.app is located, courtesy
>> of launcservices framework or whatever keeps track of the filesystem
>> these days...
>
> Using terminal with Mac 10.5.4  I get the following results:
>
> Last login: Tue Jul 29 06:53:38 on ttys000
> Macintosh:~ jimsims$ launch -a Pages
> -bash: launch: command not found
> Macintosh:~ jimsims$
>
>
> No worky.
>
> sims
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Across Platforms - Code and Culture
> http://www.ezpzapps.com/blog/
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution@...
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



--
http://www.andregarzia.com All We Do Is Code.
_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Jim Sims :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jul 29, 2008, at 7:10 AM, Andre Garzia wrote:

> AAAAAAARRRRGGGHHHHHHHHH
>
> sorry, it's 2:08 AM and I have a mild fever...
>
> I mean:
>
> open -a firefox


Last login: Tue Jul 29 06:55:01 on ttys000
Macintosh:~ jimsims$ open -a firefox
Macintosh:~ jimsims$


Worky!   :-)

sims
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Across Platforms - Code and Culture
http://www.ezpzapps.com/blog/




_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Andre Garzia-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

don't we all love when it works?

remember, life is good! :D

Ciao!
Andre

On Tue, Jul 29, 2008 at 2:14 AM, Jim Sims <sims@...> wrote:

>
> On Jul 29, 2008, at 7:10 AM, Andre Garzia wrote:
>
>> AAAAAAARRRRGGGHHHHHHHHH
>>
>> sorry, it's 2:08 AM and I have a mild fever...
>>
>> I mean:
>>
>> open -a firefox
>
>
> Last login: Tue Jul 29 06:55:01 on ttys000
> Macintosh:~ jimsims$ open -a firefox
> Macintosh:~ jimsims$
>
>
> Worky!   :-)
>
> sims
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Across Platforms - Code and Culture
> http://www.ezpzapps.com/blog/
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution@...
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



--
http://www.andregarzia.com All We Do Is Code.
_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Re: launching an OSX bundle

by Scott Morrow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Andre,

Thanks for the lesson!

-Scott Morrow

On Jul 28, 2008, at 9:49 PM, Andre Garzia wrote:

> Scott,
>
> 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 firefox.app 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
> andre
>
> On Sun, Jul 13, 2008 at 7:13 PM, Scott Morrow
> <scott@...> wrote:
>> I'm wondering if issuing the "launch" command to:
>>
>> /Applications/OSX bundle.app
>>
>> produces different results than issuing the command to
>>
>> OSX bundle.app/Contents/MacOS/theBinFile
>>
>> 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       http://elementarysoftware.com/
>> email     scott@...
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution@...
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>
>
> --
> http://www.andregarzia.com All We Do Is Code.
> _______________________________________________
> use-revolution mailing list
> use-revolution@...
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
LightInTheBox - Buy quality products at wholesale price