Re: building a command-line tool as a bundle
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: Sun, 17 Aug 2008 20:33:42 +0800
aaghh - this is very frustrating. I opened the build settings for the
commandline target and the ones for the cocoa app and synched them
across line by line, just changing the name of the plist file to one I
created to be different from the cocoa app and STILL the build system
refuses to build a bundle, just keeps building an executable. Surely
every single setting is in the Target "xx" info panel. One difference
appears to be that the target for cocoa has a 'properties' tab at the
top, which my command line tool, whatever settings I edit on it,
doesn't have and I can't find a way to add.
does XCode just hide some secret uneditable property somewhere which
says "this is not a bundle" and you can't change it?
On Aug 17, 2008, at 7:41 PM, Roland King wrote:
This is probably a ridiculously stupid question but I'm still
learning here ..
I started building a Cocoa app then decided that I wanted to build
myself a little command-line tool to test the classes I'm writing.
Perhaps it should be a Unit test but I thought perhaps I'd learn
those another day. So I added a command-line target, marked the .m
and .h files I wanted to test as belonging to that target, wrote a
main() and all is well.
Now I want my final cocoa app to use a plist file in the app bundle
for some startup data, so I'd like my little command-line tool to be
a bundled app too (instead of the straight executable which is
currently built) so I can put the plist file in there and do some
tests. So I was trying to convert the commandline tool target to
build a bundle and haven't managed it.
Is it actually possible to do that by twiddling the config settings?
Clearly the cocoa app itself is just an executable in a bundle,
that's what I kind of want.
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.
Is there a way to have two targets, each building a bundle, each of
which is using mostly the same source code and to which I can add
the same resources so I can test my code like this?
Apologies if my approach is just entirely wrong here, I'm used to
testing new code by writing simple command line type tools which
exercise code. I am trying quite hard to forge ahead with the actual
project itself and didn't really want to stop and learn how to use
the unit test framework, assuming that's even the right way to do
this._______________________________________________
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
_______________________________________________
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