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
shell script to selectively copy files?
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
shell script to selectively copy files?
Subject
:
shell script to selectively copy files?
From: Chuck Soper <
email@hidden
>
Date: Thu, 8 Jul 2004 11:46:39 -0700
(I sent a couple of days ago and didn't get a response, so I thought I'd post again.)
Hello,
I'm using Xcode 1.2. Currently, I'm using three different Copy Files Build Phases to selectively copy several hundred small binary files to my Resources directory within my application bundle. The file(s) are only copied if the source files are more recent than the destination files. Using a Copy Files Build Phase requires that all the files have been added to the project. I have two different application targets in my project and it's cumbersome to maintain several hundred binary files; I don't think Xcode was designed for that.
Also, whenever I open the project and I'm connected to my Perforce repository, Xcode wants to look at every single file in the project and determine if it's in the repository or not. This slows down opening my project.
I'm considering two different approaches replace the Copy Files Build Phases and remove binary files from my project, but still have them added to the bundle.
1. Create a Shell Script Build Phase containing this:
ditto "$SRCROOT/subDir/fileName" "$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/subDir/fileName"
The problem is that the script is executed every single time I build. I really only want to copy file(s) when the source is more recent than the destination. I don't know if I could write a smarter script to make such decisions and I have very little shell scripting experience. I noticed that ditto has an option for specifying a bom (bill of materials) creating from mkbom. Could this be a possible solution for my situation?
2. Put the above script in a Shell Script Target (instead of a build phase). Create an aggregate target and specify my application target and one or more Shell Script Targets as dependencies. After building the aggregate target once, I could build the application target most of the time so that the hundreds binary files don't get copied on every build. I could clean my target with the aggregate or application target, but to do a full build I must use the aggregate.
I think that using an aggregate target is the best solution, but I'd appreciate any comments people have. Thanks very much.
Chuck
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
Follow-Ups
:
Re: shell script to selectively copy files?
From:
Chuck Soper <email@hidden>
Prev by Date:
Re: Injecting build variables into Xcode
Next by Date:
Re: HeaderDoc 8 final?
Previous by thread:
shell script to selectively copy files?
Next by thread:
Re: shell script to selectively copy files?
Index(es):
Date
Thread