I got bored switching back and forth to Terminal, so I wrote this little script that cleans the build directory, then sets up and opens a fresh Xcode project. A few more details about what it does and how to load it are at http://seandenigris.com/blog/?p=945
PipeableOSProcess waitForCommand: '/usr/bin/osascript -e "tell application "Xcode" to quit"'.
buildDir := FileDirectory on: '/Developer/cogvm/cog/build/'. buildDir entries do: [:e | e name = 'vmVersionInfo.h' ifFalse: [ e isDirectory ifTrue: [ e asFileDirectory recursiveDelete ] ifFalse: [ e delete ] ] ].
StackCocoaIOSConfig new addExternalPlugins: #( FT2Plugin ); generateForDebug; generateSources; generate.
PipeableOSProcess waitForCommand: 'cd /Developer/cogvm/cog/build/; /opt/local/bin/cmake -G Xcode'. PipeableOSProcess waitForCommand: 'open /Developer/cogvm/cog/build/StackVM.xcodeproj'.
-- View this message in context: http://forum.world.st/Script-to-setup-fresh-Xcode-project-tp4286166p4286166.... Sent from the Squeak VM mailing list archive at Nabble.com.
On Wed, Jan 11, 2012 at 09:22:33AM -0800, Sean P. DeNigris wrote:
I got bored switching back and forth to Terminal, so I wrote this little script that cleans the build directory, then sets up and opens a fresh Xcode project. A few more details about what it does and how to load it are at http://seandenigris.com/blog/?p=945
PipeableOSProcess waitForCommand: '/usr/bin/osascript -e "tell application "Xcode" to quit"'.
buildDir := FileDirectory on: '/Developer/cogvm/cog/build/'. buildDir entries do: [:e | e name = 'vmVersionInfo.h' ifFalse: [ e isDirectory ifTrue: [ e asFileDirectory recursiveDelete ] ifFalse: [ e delete ] ] ].
StackCocoaIOSConfig new addExternalPlugins: #( FT2Plugin ); generateForDebug; generateSources; generate.
PipeableOSProcess waitForCommand: 'cd /Developer/cogvm/cog/build/; /opt/local/bin/cmake -G Xcode'. PipeableOSProcess waitForCommand: 'open /Developer/cogvm/cog/build/StackVM.xcodeproj'.
Hi Sean,
You may want to look at CommandShell class>>makeVmIn: for some more ideas on how extend this sort of procedure using CommandShell/OSProcess scripts. The methods for VM building were written for a much earlier version of VMMaker and they are now out of date, but you can treat them as examples to get some ideas as to how to do it with newer VM build configurations.
The #if:then:else: and #script:onFailureDo: methods are useful if you are automating a series of build steps and want to be able to stop the script when one of the steps fails (for example, if you run an external program and it exits with non-zero exit status).
Dave
vm-dev@lists.squeakfoundation.org