Note, you will have to modify the paths to point to the appropriate place(s) on your machine - both in terms of your equivalent to ~
(/Users/sam
in this file) and the versions of the dependencies you install should there be more recent releases.
- Download the latest version of Sonic Pi and install to
/Applications
- Install the latest Qt (
5.12
at the time of writing) and install to a known location e.g.~/Qt/5.12
- Create a new directory for the build e.g.
mkdir ~/sp-build
- Clone the latest Sonic Pi source code
git clone https://github.com/samaaron/sonic-pi.git ~/sp-build/sonic-pi
- Download the latest Qwt (
6.1.3
at the time of writing) and copy to~/sp-build/qwt-6.1.3
- Download the latest QScintilla (
2.10.8
at the time of writing) and copy to~/sp-build/QScintilla_gpl-2.10.8
- Download the latest SuperCollider source into the new build dir:
git clone https://github.com/supercollider/supercollider.git ~/sp-build/supercollider
- Copy the native files from Sonic Pi.app to your new build dir:
cp -R /Applications/Sonic\ Pi.app/app/server/native/* ~/sp-build/sonic-pi/app/server/native/
- Copy the erlang beam files from Sonic Pi.app to new build dir:
cp -R /Applications/Sonic\ Pi.app/app/server/erlang/* ~/sp-build/sonic-pi/app/server/erlang/
- Copy the Ruby native files from Sonic Pi.app to new build dir:
cp -R /Applications/Sonic\ Pi.app/app/server/ruby/rb-native ~/sp-build/sonic-pi/app/server/ruby
- Build qwt:
cd ~/sp-build/qwt-6.1.3 && ~/Qt/5.12/5.12.0/clang_64/bin/qmake && make
- Build QScintilla:
cd ~/sp-build/QScintilla_gpl-2.10.8/Qt4Qt5 && ~/Qt/5.12/5.12.0/clang_64/bin/qmake && make
- Edit
~/sp-build/sonic-pi/app/gui/qt/mac-build-app
to include something like the following at the top: (swap out/Users/sam
with your~
)
QSCINTILLA_QT4QT5_DIR=/Users/sam/sp-build/QScintilla_gpl-2.10.8/Qt4Qt5
QSCINTILLA_LIB=libqscintilla2_qt5.13.2.1.dylib
QWT_DIR=/Users/sam/sp-build/qwt-6.1.3
QT_DIR=/Users/sam/Qt/5.12/5.12.0
- Edit
~/sp-build/sonic-pi/app/gui/qt/SonicPi.pro
and add the following at the top: (swap out/Users/sam
with your~
)
LIBS += -L/Users/sam/sp-build/supercollider/external_libraries/boost/libs
INCLUDEPATH += /Users/sam/sp-build/supercollider/external_libraries/boost/
DEPENDPATH += /Users/sam/sp-build/supercollider/external_libraries/boost/
LIBS += -L/Users/sam/sp-build/QScintilla_gpl-2.10.8/Qt4Qt5
INCLUDEPATH += /Users/sam/sp-build/QScintilla_gpl-2.10.8/Qt4Qt5
DEPENDPATH += /Users/sam/sp-build/QScintilla_gpl-2.10.8/Qt4Qt5
include ( /Users/sam/sp-build/qwt-6.1.3/qwt.prf )
- Build app:
cd ~/sp-build/sonic-pi/app/gui/qt && ./mac-build-app
- Run app:
cd ~/sp-build/sonic-pi/app/gui/qt && ./build/Sonic\ Pi.app/Contents/MacOS/Sonic\ Pi
- Enjoy!