- os x 10.3.X or later
- XCode Tools December 02 or later
os 10.5.+ Quick checkout and install:assuming you have Xcode installed, the simples way to download and build SuperCollider from scratch on 10.5 is...
cd /Applications svn co https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk SuperCollider3 cd SuperCollider3 ./compile.sh
so no need to change Xcode's defaults (UsePerConfigurationBuildLocations), nor download svn or libsndfile.
1) Downloading the Source
The only way to download the source is via SVN (Subversion), a source-code respository system. After "checking out" the source code in order to compile it, you can then frequently and easily update to the latest changes.
To compile the sources you will also need libsndfile (see below).
Clean build from SVN
as of Mac OS X 10.5, svn gets installed when you install developers tool / xcode - skip to the 'Go to the directory...' section below.
to download via subversion (SVN) you need to install subversion first.
Just download the svn binary installer from http://metissian.com/projects/macosx/subversion/.
Alternatively this can be done with Darwin Ports (simply download the .dmg from the Get-DarwinPorts page) or fink.
When you have installed Darwin Ports open a terminal and type (execute each command separately):
port sync port selfupdate sudo port install subversion
the last step may take ages. once the installation is complete you can get a complete copy of the SuperCollider sources.
If you already have supercollider installed and simply fail to update your code from svn, you probably have to switch the uri to the new sf svn directory:
svn switch --relocate https://svn.sourceforge.net/svnroot/supercollider/trunk https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk
Go to the directory where you want to put SuperColliderServer (SC3). svn will create a SuperCollider3 directory there:
Then type the following command:
svn co https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk SuperCollider3
if this fails simply try again. this is probably due to server traffic problems.
After this you will have the project in a folder named SuperCollider3. Continue with the steps for building libsndfile and compiling with Xcode.
2) Building libsndfile
you will need to get this to compile sc
get it from:
$ curl -fLO http://www.mega-nerd.com/libsndfile/libsndfile-1.0.17.tar.gz $ tar xvzf libsndfile-1.0.17.tar.gz $ cd libsndfile-1.0.17 $ ./configure $ make $ sudo make install
(note: this requires entering your admin password, sudo is like a temporary su to root)
-ian/julian (updated urls -till)
(note: if the "make" fails with various errors including things like "-lSystem is not an object file", you need to update your installation of Apple's Developer Tools so that you've got gcc v4 rather than v3.)
3) Compiling the sources:
os 10.3+open the *.pbproj files in XCode (developer tools) e.g: xSC3lang.pbproj
build the three projects in this order:
[Use the "open" command in Xcode to open them; as you open each one, a new window will appear, and some scanning will take place (file names flash by). Open all three, wait for them to finish their business, then click the build icon (hammer) in each window in the order given above, waiting for each to finish before starting the next. Once you're done you should have a working application in the "build" folder.]
os 10.4+open the *.xcodeproj files in XCode (developer tools) e.g: xSC3lang.xcodeproj
build the three projects in this order:
SuperCollider will run significantly slower when compiled in "Development" configuration (which is the default when downloading). Be sure to switch to "Deployment" configuration. To do so, open the Build-window (Cmd+Shift+B) and select "Deployment" from the Active-Build-Configuration combo box. Hit the "Build" button to compile.
The more recent version of XCode place the results in separate folders depending on the build configuration. This way, you will need to copy all the final files into one folder. To avoid this, execute the following command once in a terminal:
defaults write com.apple.Xcode UsePerConfigurationBuildLocations NO
os 10.5+open terminal, cd to the SuperCollider3 directory you just checked out and run the provided compile script.
this will build in deployment mode (the recommended). also libsndfile is now bundled with SuperCollider so there's no need to install and compile that separately.
see 10.4+ above for instructions how to build from within Xcode.
- How to build the projects by hand?
Note also that the argument to buildstyle may also be set to 'Development'.
#!/bin/sh cd SC3synth.pbproj ; pbxbuild -buildstyle Deployment cd .. cd SC3plugins.pbproj ; pbxbuild -buildstyle Deployment cd .. cd SC3lang.pbproj ; pbxbuild -buildstyle Deployment cd ..
You can place the above in a file called compile.sh or whatever name you want. Make sure to chmod 700 compile.sh afterwards to make it executable.
note: if you use panther and dont have an existing jaguar dev tools in your path, you won't have pbxbuild.
just use xcodebuild, it's backwards compatibile. I am using :
for i in "SC3synth.pbproj" "SC3plugins.pbproj" "SC3lang.pbproj"; do cd $i;xcodebuild; cd ..; done
to build on panther. -ian
Before committing anything (developers)
- ask on sc-dev
- do a diff to see that you are not uploading any old changes:
svn diff FILENAME
Cleaning the build folder
question: Do I have to manually copy all the stuff from the build folder into my nice sqeaky-clean SuperCollider folder, or is there another way? I wouldn't really enjoy that, but if that's the only way…
There is a script called distro . So open the Terminal change into the SuperCollider3 directory with
and then execute the script with:
this will create a folder called SuperCollider_f
You can also use a script to compile sc: