FW: How to apply arguments to .app application while starting it on Terminal?
FW: How to apply arguments to .app application while starting it on Terminal?
- Subject: FW: How to apply arguments to .app application while starting it on Terminal?
- From: "Kan Cheng" <email@hidden>
- Date: Sat, 4 Aug 2007 17:33:49 +0800
- Thread-topic: How to apply arguments to .app application while starting it on Terminal?
-----Original Message-----
From: Kan Cheng
Sent: Saturday, August 04, 2007 5:33 PM
To: 'John C. Randolph'
Subject: RE: How to apply arguments to .app application while starting
it on Terminal?
Thanks John!
The basic scenario make me to do this is simple: My application(.app
format) need to be used on terminal by someone know nothing about bundle
and you know, he can see only the app icon only via Finder, so days ago,
I've told him that he can start it in that way as you mentioned.
But he just ask me: "Should the user of your application need to know
the internal structure before using it? Since Mac has provided such a
way to wrap application in a bundle, I'm sure that it has provided the
way to start it more directly by applying those arguments needed! "
Well, you know, he is my supervisor, so that I have to find out the
answer to help him use it more conveniently. :)
On the other hand, I'm not quite sure that if this way is encouraged by
Apple and will it cause problems in some case.
So I would sincerely want to consult your opinion here.
Thanks
Kan
---------------
.app/Contents/MacOS/TextEdit <put your args here>
---------------
I'm just want to get the confirming that should those .app
-----Original Message-----
From: John C. Randolph [mailto:email@hidden]
Sent: Saturday, August 04, 2007 5:00 PM
To: Kan Cheng
Cc: email@hidden
Subject: Re: How to apply arguments to .app application while starting
it on Terminal?
On Aug 4, 2007, at 1:47 AM, Kan Cheng wrote:
> Hi all,
> I'm quite new to mac, and I'm confusing how to apply arguments to .app
> application while starting it on Terminal?
> When we want to start a simple application on shell, we simply start
> it
> with command:
> --------------------------
> ./someapplication arg1, arg2 ..
> --------------------------
> But as I know, those .app application is a bundle, and can be started
> with open command:
> --------------------------
> Open someapplication.app
> --------------------------
> But on this way, I cannot apply those arguments to it. And I haven't
> found any way to make it via searching Google.
> So would you pls kindly teach me how to make it?
You just have to invoke the executable directly.
Macintosh:Applications jcr$ pwd
/Applications
Macintosh:Applications jcr$ TextEdit.app/Contents/MacOS/TextEdit <put
your args here>
But you shouldn't need to do that. What are you trying to accomplish?
-jcr
John C. Randolph,
VP, Engineering
Stealth Imaging, LLC. <email@hidden>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden