Squeak VM: Compiling for Xcode
January 11th, 2012
No comments
When compiling the VM for Xcode, one has to switch back and forth from the image to the command line. To make things easier, here’s a little script that:
- empties the build directory
- generates the sources and cmake info
- Configures with cmake
- Opens the project in Xcode
First, load PipeableOSProcess via:
Gofer it squeaksource: 'MetacelloRepository'; squeaksource: 'CommandShell'; package: 'ConfigurationOfOSProcess'; package: 'CommandShell-Piping'; load. (Smalltalk at: #ConfigurationOfOSProcess) load. |
Then, execute this script (also available as a gist) whenever you want a fresh Xcode project:
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'. |
Categories: VM
Recent Comments