Conditional inclusion

Member
Posts: 117
Joined: 2010.09
Post: #1
Hi all,

My XML files are getting real slow to process on the iphone.
I've altered my code so an xml read outputs a binary; which I can then load and is of course much faster.
Problem is I don't want the XML included in my build. At the moment I have both the xml and binary.
I guess really the xml is read and used in debug mode and the binary is read and used in release build. But how do I set it so only the appropriate file is included in the relevant build rather than just both?

thanks in advance.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #2
Instead of using a copy phase in your application's target, you can use a script to copy the files. The script can check the build configuration and do the appropriate thing. You'll have to look up how XCode names the shell variables though, I haven't touched that in a while.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 117
Joined: 2010.09
Post: #3
Hey Scott,

That sounds like a plan!. Would of thought Xcode would have some facility for this built-in you know like a tick box for "include in DEBUG or include in RELEASE". Will check it out.

thanks as always.

Cheers
Quote this message in a reply
Post Reply