Skip to content

Latest commit

 

History

History
224 lines (160 loc) · 8.69 KB

INSTALL.md

File metadata and controls

224 lines (160 loc) · 8.69 KB

Installing Sonic Pi from Source

If you want to use the very latest development version of Sonic Pi, then you'll need to compile from source. Here are instructions for the following platforms:

Raspberry Pi

The Raspberry Pi will happily compile all the required aspects of Sonic Pi. However, be warned that it will take quite some time to complete.

First grab the dependencies, compile the server extensions, then the GUI then start the app.

Dependencies

The dependencies for building and running this are:

  • supercollider
  • ruby1.9.3
  • libqscintilla2-8
  • libqscintilla2-dev
  • qt4-dev-tools
  • cmake
  • ruby-dev
  • libffi-dev

Use sudo apt-get install to ensure each of these are on your system.

Server extensions

Compile the server extensions by cding into the directory app/server/bin and running the script compile-extensions.rb. This will take some time.

Qt GUI

cd into the directory app/gui/qt/ and run the script rp-build-app. This will also take some time.

Running

Run the script rp-app-bin in the directory app/gui/qt.


Generic Linux

Dependencies

Debian package dependency names:

  • supercollider
  • ruby1.9.3 (Ruby 2+ is preferred)
  • libqscintilla2-8
  • libqscintilla2-dev
  • qt4-dev-tools
  • ruby-dev
  • cmake (for some configurations, e.g., 32bit x86)
  • libffi-dev

In addition, under Ubuntu 14.04 based distributions try these:

  • libqscintilla2-l10n
  • qt4-qmake
  • libqt4-dev

Fedora package dependency names:

  • supercollider (via Planet CCRMA)
  • ruby (or use RVM to manage specific versions)
  • qscintilla-devel (will install qscintilla and qt-devel)
  • cmake

Server extensions

Compile the server extensions by cding into the directory app/server/bin and running the script compile-extensions.rb. This will take some time.

Qt GUI

cd into the directory app/gui/qt/ and run the script rp-build-app. This will also take some time.

Running

Start the jack sound server daemon jackd. This is easily done through qjackctl, available as qjackctl in Debian.

Then run the script rp-app-bin in the directory app/gui/qt.


Arch Linux

AUR Package

Arch Linux users are strongly recommended to install the sonic-pi-git package from the AUR; see the wiki article on the Arch User Repository if you are unfamiliar with how to install such a package. The PKGBUILD found in this package will:

  • Clone the latest sonic-pi source from GitHub
  • Apply a patch to fix a library naming issue
  • Build sonic-pi from source, according to the instructions found in Generic Linux
  • Install the built software components to /opt/sonic-pi-git
  • Install the launcher to /usr/bin/sonic-pi

After installing, users need to follow the instructions in the Generic Linux section to start the jackd server, and then run sonic-pi at a command prompt.

###Building from source

Users can opt to build from source as well if they would like. Instructions and dependencies can be found within the PKGBUILD file in the AUR package previously mentioned, as well as the required patch file.


Mac OS X

Dependencies

Server extensions

Compile the server extensions by cding into the directory app/server/bin and running the script compile-extensions.rb. This will take some time.

Qt GUI

  • Build QScintilla:
    • cd /path/to/qscintilla/Qt4Qt5
    • generate makefile: /path/to/qt/5.3/clang_64/bin/qmake qscintilla.pro
    • make
    • (OSX only) update the dylib inner path part 1: install_name_tool -id "/path/to/qscintilla/Qt4Qt5/libqscintilla2.11.dylib" /path/to/qscintilla/Qt4Qt5/libqscintilla2.11.dylib
    • (OSX only) update the dylib inner path part 2: install_name_tool -change "libqscintilla2.11.dylib" "/path/to/qscintilla/Qt4Qt5/libqscintilla2.11.dylib" /path/to/qscintilla/Qt4Qt5/libqscintilla2.11.dylib
  • Add the following to SonicPi.pro LIBS += -L /path/to/qscintilla/Qt4Qt5/ -lqscintilla2 INCLUDEPATH += /path/to/qscintilla/Qt4Qt5/ DEPENDPATH += /path/to/qscintilla/Qt4Qt5/
  • Modify top of mac-build-app appropriately i.e. QSCINTILLA=/path/to/qscintilla/Qt4Qt5 QTBIN=/path/to/qt/5.3/clang_64/bin
  • Provide a Ruby version for Sonic Pi to use
    • The Qt app expects Ruby to exist at a certain path. We can use a symlink to provide an appropriate Ruby Version
    • $ cd /root/path/to/sonic-pi
    • $ mkdir -p app/server/native/osx/ruby/bin
    • check your current ruby version:
# This should be 2.1.2 although anything 1.9.3+ _should_ work
$ ruby --version
  • link the ruby version into place:
ln -s `which ruby` app/server/native/osx/ruby/bin/ruby
  • Compile any native extensions: $ app/server/bin/compile-extensions.rb
  • Run ./mac-build-app
  • App should be in build dir

Windows

Dependencies

Server extensions

Qt GUI

  • Set up build environment
    • open Visual Studio 2013/Visual Studio Tools/VS2013 x86 Tools Command Prompt
    • add QT to your path: PATH=%PATH%;C:\Qt5\5.3\msvc2013\bin
  • Build QScintilla:
    • cd Qt4Qt5
    • generate makefile: qmake qscintilla.pro
    • nmake
    • copy to QT directory: nmake install
  • Run app\gui\qt\win-build-app.bat
  • copy C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x86\Microsoft.VC120.CRT\msvcp120.dll and msvcr120.dll to release\
  • Sonic-Pi.exe will be in release, or use sonic-pi.bat to startup

Packaging:

  • copy C:\Program Files (x86)\SuperCollider-3.6.6\scsynth.exe and *.dll and plugins into app\server\native\windows (but skip the Qt* DLLs)
  • copy C:\ruby193\* into app\server\native\windows
    • there are some things that can be trimmed, such as docs
  • download a matching DevKit from http://rubyinstaller.org/downloads/
  • cd app\server\vendor\rugged
  • ..\..\native\windows\bin\gem build rugged.gemspec
  • ..\..\native\windows\bin\gem install rugged-0.19.0.gem
    • if "Could not create Makefile", check mkmf.log to see if it can't find CMake. If so, try copying the subdirectories under c:\Program Files (x86)\CMake to your DevKit directory. (I couldn't get it to find it using PATH, possibly because DevKit was rewriting it)
  • cd app\server\vendor\did_you_mean
  • ..\..\native\windows\bin\gem build did_you_mean.gemspec
  • ..\..\native\windows\bin\gem install did_you_mean-0.7.0.gem
  • ..\..\native\windows\bin\gem install ffi
    • gem will pull down the mingw32 version, which is not currently included
  • There is a WiX project file in `sonic-pi.wxs' -- work in progress
    • file paths will need to be updated, currently absolute
    • build with candle sonic-pi.wxs -ext WixUtilExtension && light sonic-pi.wixobj -ext WixUtilExtension -ext WixUIExtension

Unsupported development HTML Interface

Note: This interface isn't always kept up to date with MASTER on Github.

The dependencies for this are:

  • SuperCollider
  • Ruby 1.9.3+

If you wish to play with the (development) HTML interface on OS X:

  • Install SuperCollider manually (the Mac OS X app): http://supercollider.sourceforge.net
  • Download a tar ball of the latest version of Sonic Pi: https://github.com/samaaron/sonic-pi/
  • Unzip the tar ball somewhere useful
  • Install JDK 1.6+ and Leiningen (to compile ClojureScript -> Javascript, not for running the app)
  • Compile the cljs source: cd app/gui/html, lein cljsbuild once
  • Start the server: cd app/server/bin, ruby ws.rb
  • Open a browser and go to http://localhost:8000