Re: Copy Headers Build Phase is Flattening my directories
Re: Copy Headers Build Phase is Flattening my directories
- Subject: Re: Copy Headers Build Phase is Flattening my directories
- From: Mike Jackson <email@hidden>
- Date: Fri, 1 Jul 2005 17:36:30 -0400
On Jul 1, 2005, at 4:44 PM, Chris Espinosa wrote:
On Jul 1, 2005, at 12:59 PM, Mike Jackson wrote:
On Jul 1, 2005, at 2:29 PM, Chris Espinosa wrote:
On Jul 1, 2005, at 10:38 AM, Mike Jackson wrote:
Is there a way to add files to XCode projects where the
directory structure will stay in tact when copied to the
"Headers" directory of a framework? Here is an example:
/ (Root Level of Source)
|-- Generic
|--Export.h
|-- OtherStuff
|--Export.h
When the Copy Headers Phase fires off I only get one header file
at the top level of the "Headers" folder in the framework. I
should have at least 2 folders there each containing a file
called Export.h
The way to do this in 2.1 and earlier:
• add the header folders as File References (using the radio
button in Add Files)
• in the target, create a new Copy Files build phase, and set it
to Relative to Wrapper, path Headers
• drag the file references for the headers from the Copy Bundle
Resources build phase to the new Copy Files build phase
OK, So I deleted all the references to my code from the project
and re-added the code to Xcode, this time choosing the "Make
Folder References for any added Folders" sheet that pops up when I
drag my files into XCode. That seemed to actually add the code,
but not to the target. I was able to follow the rest of the
instructions and created the additional build phase and copied the
folder references down to that build phase. Now not only the are
the .h files being copied but also the source code.
And now when I select the "Source" group in the left pane of
Xcode (which is a brown color) I have a bunch of blue folders show
up, but no source code. Typing in the "Search" text field in the
upper right of the XCode window doesn't find any source code either.
I have 38 Folders in my project (one project of about 6 that I
have to do). Totaling the files that are in those folders I get
about 250 files. If I have to add each one individually then this
is going to be a real problem.
Is there a Shell script that might accomplish this same type of
thing because it looks like there are enough bugs left in Xcode
2.1 that I need to resort to a shell script instead.
Something like this?
cd ${SRCROOT}
for H in `find ./generic -name "*.h"`; do
ditto ${H} ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/$
{H}
done
Chris
_______________________________________________
Close... How about
# We need to make sure the symlink is there
cd ${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}
ln -s ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH} ./Headers
cd ${SRCROOT}
# I have to move up a directory due to my layout.
cd ../
for H in `find ./ -name "*.h"`; do
ditto ${H} ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/${H}
done
---
Mike Jackson
mike _at_ bluequartz dot net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden