Re: PB question
Re: PB question
- Subject: Re: PB question
- From: Don Yacktman <email@hidden>
- Date: Fri, 19 Jul 2002 18:43:37 -0600
On Friday, July 19, 2002, at 01:06 PM, Sherm Pendley wrote:
On Friday, July 19, 2002, at 02:52 PM, Gerben Wierda wrote:
I want to include a compiled ordinary C-program in the Resources of my
app. So far I have done this by compiling this by hand and adding it
to the Resources of my project. Instead, I would like to add a link to
the C-source file to my project and have it compiled into the
Resources directory of my app when I build so that it will be
automatically up-to-date. What is the way I am supposed to do that?
If your C program already has a makefile, it would probably be easiest
to create a shell script build step in PB that calls 'make' to build it
using that makefile, and a "copy files" build step that copies the
resulting binary into Resources.
As an alternative, you can create a new target (legacy, or whatever) to
build the C program. Then, in the targets pane, drag the C program's
target and drop it on the application's target. That tells PB to build
the C program target before building the application target. Then, in
the Files pane, with the Application target selected / active, check the
checkbox next to the C program's build product. That tells PB to copy
the C program into the app wrapper. It will end up in the Resources
directory. If you want it copied somewhere else, then you'll need a
custom copy files phase instead of using the checkbox.
I've used this basic process to build rather complex apps that include
various bundles, C programs, and more as part of their resources. It
seems to work pretty well, and it's easier than dealing with makefiles
or shell scripts.
--
Later,
Don Yacktman
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.