• 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: building a command-line tool as a bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building a command-line tool as a bundle


  • Subject: Re: building a command-line tool as a bundle
  • From: Roland King <email@hidden>
  • Date: Mon, 18 Aug 2008 12:25:57 +0800

Michael Ash wrote:

On Sun, Aug 17, 2008 at 7:41 AM, Roland King <email@hidden> wrote:


I tried adding a Cocoa Bundle target, but that doesn't build an executable.
I wondered about adding a second Cocoa Application target, then removing the
nib and other stuff I didn't need and changing the main.m file to be my test
command-line code, but then I'd have two Info.plist files in my project, one
with the information for the Cocoa app and one with the information for the
commandline bundle app thing, and that doesn't sound right either, infact it
doesn't sound possible.



It should be perfectly possible. What sounds impossible about it? If it's the two Info.plist files, they don't have to have the same name in your project. You can give them names like Info-app.plist and Info-tester.plist, then set those names in your target settings for each target. You can configure each source file to be in either or both targets as you wish, and off you go.

Mike


and indeed it was possible and quite easy and that was what I ended up doing. I hadn't seen, at the time I wrote the original, that the plist filename was a parameter in the target settings so you could have different plist files which would eventually end up as Info.plist in your bundle.

Now what I still don't understand is that what I end up with is a target where the target build settings are line-for-line identical to what I changed my original command line target settings to be, and yet still that builds a commandline executable, and my new target (imaginatively called 'test') builds the bundle I always wanted with the executable embedded in it perfectly. This may however really be an XCode list question.
_______________________________________________


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


References: 
 >building a command-line tool as a bundle (From: Roland King <email@hidden>)
 >Re: building a command-line tool as a bundle (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: Problem redirecting NSLog() output to stderr
  • Next by Date: Re: building a command-line tool as a bundle
  • Previous by thread: Re: building a command-line tool as a bundle
  • Next by thread: How to enumerate directory contents?
  • Index(es):
    • Date
    • Thread