Game Development Community

Speed up compilation time in xcode?

by Brian Tan · in iTorque 2D · 04/21/2009 (4:59 pm) · 6 replies

I was wondering if this is the way it is when I make a build in Xcode, I have to always clean my files and it compiles about 400+ files.
My main gripe is having to recompile so many hundred of files.
I did see a thread talking about touch and untouch files but since I have to perform a clean before I build it, I couldn't get it to skip recompiling.

Is there some other way to speed it up?

I know if I don't clean my files and perform the delete-and-add the files back into Resources, it will not recognize any updated .dso files.

#1
04/21/2009 (5:05 pm)
Just click build and run again
it will recompile what it needs to recompile, the rest is used as present in the last build.

if you are talking about the dso files / script folders. touch - untouch can help or just having the apps package content folder open and deleting the two directories from the package content, which forces xcode to reimport. (you could also write a post link script in xcode that does this)
#2
04/21/2009 (5:37 pm)
Thanks for the quick reply.
I'm talking about .dso files because I want to make a simple change in the code so that I can quickly check it on the iPhone (since I'm just testing out multitouch stuff)

I don't see the updated files being recompiled when I touch and untouch the folders.
When I delete and add back the /game directory (I'm not touching /common and main.cs at the moment), select "Build and Go", it still won't use the updated .dso to make a new build.

I'm trying to avoid writing a post link script in xcode since I'm not familiar with that at all.
#3
04/21/2009 (7:01 pm)
You don't need readd the game directory. it will do so on its own.

if you modify code, the DSO are not affected anyway.
If you modify script code, you must always first run tgbgame again to recompile the dso, then remove game folder in app package and then "build and go" in xcode. without tgbgame beeing run, the DSO won't be updated
#4
04/21/2009 (10:32 pm)
To get XCode to reload your resources (and therefore, newly compiled DSOs), just delete the output file, should be something like {XCodeProjectDir}/build/device-release/TGBGame.app.
#5
04/22/2009 (11:43 am)
@Marc: I always run tgb to get the recompile dso files. No confusion there but the you said to remove game folder in app package. Isn't that bad? since the game folder is where the dso files are located?

@Mat: Thanks! This method seems to be working!
#6
04/23/2009 (6:24 am)
Brian: Thats exactly the idea. If they aren't there anymore, XCodes post link step, when all resources are collected, will copy the current one in again.