Re: options for generating pbxproj files
Re: options for generating pbxproj files
- Subject: Re: options for generating pbxproj files
- From: Tobias Ford <email@hidden>
- Date: Sun, 6 May 2007 06:23:46 -0500
First off, a little background on the project. This is for a large
service based graphical project. Our team knows the growing pains of
building and maintaining such a beast. About 95% of our source is
shared. Additionally, we do everything that we can to eliminate
silly mistakes, and we've hit quite a few in the past. We try to
make everything easy. Getting this running on the Mac is all out of
personal love and the hope of releasing a future version :)
We generate the files programatically for several reasons. The
source control depot is never expected to be broken for more than a
few minutes at most. You should always be able to check out from it
and have a clean build. We do extensive code reviews and even
project file reviews to guarantee this. We have several scripts and
configuration files that build our project files for us under windows
and linux. For example, if you add files to the project you can run
a script per platform under perforce or in the console, or run a
pearl script at the root that rebuilds all windows and linux platform
solutions and jam files before checking in any changes.
Additionally, whenever a checkin occurs, no matter the platform,
build scripts are kicked off, unit tests are ran, and builds are
deployed consisting of clients, servers, game editors, art exporters,
data validation tools, and other utilities.
Maintaining the xcode project by hand (or any other system) is also
very time consuming and prone to error. Our project is already
pretty large and is going to be larger. Following up on additional
file checkins can require a lot of time when tracking down the files
that need to be added or removed through all of our various libraries
and platforms. Before the really slow AppleScript system I built, it
was: p4 sync, then track down all missing symbols for the next
hour. I don't want to spend time doing this when it can be
automated. Also, I don't want the the chance that someone making a
personal modification to a project file while debugging might be
checked in with that project file. Worse, any change may
accidentally propagate through a future patch of the product. We
don't want a month's patch maybe having debug symbols or the wrong
optimizations for any library that we build making it to the customer.
In our system there really is no master build file, since out project
is broken up in very distinctive libraries, with the "file map"
reflecting a very structured layout on disk. It's broken up into a
matrix of client, server, shared, win32, linux, macosx, with a final
Application that accesses the appropriate results. Each library that
is built, has it's own config file with the appropriate information
for building it. For xCode, this file is ignored though because of a
list-post a of couple months ago (post 2.4.1 release) saying that
imbedding project dependencies through AppleScript was apparently
broken :( Otherwise, everything else is supported.
As to ways to maintain:
Recognizing adds to the perforce directory is fine, but the current
AppleScript that builds from a clean template still takes about 10-14
minutes on decent hardware.
I can write a set_difference type method to help everything out with
unique files that need to be added/removed, but that then
reintroduces potential errors from people checking in personally
changed projects again...
As to using another language to send AS events, it's the 2 calls into
xCode mentioned before that suck the time and not the language
itself. Those AS calls are just slow. As far as I'm concerned it's
evident looking at top showing xCode eating around 170-190 of the
cpus when running the script. Commenting out the make new reference
and add to target AS calls causes all of the scripts to complete in
about 45 seconds.
Recommendations?
Thanks.
On May 6, 2007, at 1:17 AM, Chris Hanson wrote:
On May 5, 2007, at 9:02 PM, Tobias Ford wrote:
What are other options that people have used when generating their
project files.
In general, most developers don't generate Xcode projects
programmatically. Instead, they maintain their Xcode projects by
while they work, because they do their work in Xcode. Out of
curiosity, is there a particular reason you generate your project
files rather than work in Xcode directly?
Rather than re-generate your Xcode project from scratch every time,
you might want to consider updating your already-existing project
files only when necessary. I assume you have some sort of "master
file" that describes the structure of your overall project, and you
use this information to generate your Xcode project. You could set
up your build system such that whenever the master file is newer
than the Xcode project, you use the AppleScript interface to
compare the two and make appropriate changes to the Xcode project.
This could wind up being faster; it also wouldn't have the problem
with different object IDs being created every time you generate a
brand project file.
Also, note that using the AppleScript interface to interact with
Xcode doesn't necessarily mean you must use AppleScript itself to
interact with Xcode. In the end, AppleScript just winds up sending
and handling responses to AppleEvents. You can write code yourself
in any of a number of languages (both low-level languages like C as
well as higher-level languages) to send and process these events
yourself, which may - for some uses -
It would be useful, though, to file a performance bug against Xcode
at <http://bugreport.apple.com/> and attach a Shark sample or two
taken during the run of your AppleScript. If you use "Time Profile
(All Thread States)" and target Everything instead of just Xcode,
it should be fairly clear from the trace whether the slowdown is in
the execution of the AppleScript or in Xcode's handling of the events.
-- Chris
-------------------
Tobias Ford...
tobias1482 'at' mac.com
tford 'at' spacetimestudios.com
-------------------
Sr Programmer @ space time studios for a generic space game mmo
_______________________________________________
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