• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adding commandline batch mode to Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding commandline batch mode to Cocoa app


  • Subject: Re: Adding commandline batch mode to Cocoa app
  • From: "Sherm Pendley" <email@hidden>
  • Date: Sun, 23 Mar 2008 17:35:14 -0400

On Sun, Mar 23, 2008 at 5:08 PM, Carsten <email@hidden> wrote:

>
> Note that I am not planning to attack all this at once. I just want to
> make sane choices up front about how things would be done, skeleton it
> out, and then leave most of it for a later full implementation. I want
> to start with the core engine and the Cocoa GUI. The initial overall
> architecture should not be done later though. That might make it very
> hard to accomplish cleanly, if at all.


An alternative that hasn't been mentioned yet is to put the core engine in a
library. The Cocoa GUI would link against it, and include it in its .app
bundle. The command-line tool would also be included in the the
Contents/MacOS subdir, so as to allow the library's install_name (if it's a
.dylib) to resolve correctly for both the command-line tool and the GUI app.
You would, of course, want to create the symlink in /usr/bin as described
earlier.

Another possibility would be to write a tool that parses the command-line
options, but doesn't do the "heavy lifting" itself. Instead, it could
communicate with the .app by way of AppleScript, raw Apple Events, or some
other IPC mechanism.

One thing I would *not* do is try to write a single binary that attempts to
provide both GUI and CLI interfaces. Horses for courses, and all that. :-)

sherm--
_______________________________________________

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

  • Follow-Ups:
    • Re: Adding commandline batch mode to Cocoa app
      • From: Carsten <email@hidden>
References: 
 >Adding commandline batch mode to Cocoa app (From: Carsten <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: "Tom Harrington" <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Carsten <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Marcus <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Carsten <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Marcus <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Carsten <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Brian Stern <email@hidden>)
 >Re: Adding commandline batch mode to Cocoa app (From: Carsten <email@hidden>)

  • Prev by Date: Re: NSDistributedNotification names
  • Next by Date: Re: NSDistributedNotification names
  • Previous by thread: Re: Adding commandline batch mode to Cocoa app
  • Next by thread: Re: Adding commandline batch mode to Cocoa app
  • Index(es):
    • Date
    • Thread