Game Development Community

XCode question - clean dso on run?

by John Vanderbeck · in iTorque 2D · 04/22/2012 (12:20 pm) · 2 replies

I'm still not very familiar with Xcode, so I thought i'd ask here. Is there anyway it can be configured to automatically run the cleandso command whenever I run the project? It isn't a HUGE deal having to manually run it in the terminal (I just apple-tab, up arrow, enter, apple-tab back) but it does get annoying. Especially when I forget and spend 20 minutes troubleshooting a problem that doesn't exist.

#1
04/22/2012 (1:23 pm)
Add it as a build step in your target. To figure THAT out you'll have to dig through the Xcode manual, though ;)

Alternative 2 is to use Terminal for compilation, and build with the xcodebuild command line tool. Then you just write a simple Bash script based on cleandso.command.
#2
04/22/2012 (2:33 pm)
Turns out this was a lot easier than I thought.

Just click on your project in the top left of your file list, then on targets. Then in the right, click Build Phases. There is a section "Run Script" where you can just paste the full path to the cleandso.command and you are good to go!