Skip to content

Latest commit

 

History

History
97 lines (79 loc) · 3.6 KB

INSTALL-MAC.md

File metadata and controls

97 lines (79 loc) · 3.6 KB

Mac OS X

Dependencies

Create Symlinks for Ruby and SuperCollider's scsynth

  • 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 /path/to/sonic-pi/root/
    • mkdir -p app/server/native/osx/ruby/bin
    • link the ruby version into place:
    • ln -s `which ruby` app/server/native/osx/ruby/bin/ruby
  • Provide a SuperCollider scsynth for Sonic Pi to use
  • The Qt app expects scsynth to exist at a certain path. We can also use a symlink here.
  • cd /path/to/sonic-pi/root/
  • cd app/server/native/osx/
  • ln -s /Applications/SuperCollider.app/Contents/Resources/scsynth .

Compile Ruby Server extensions

Sonic Pi uses some ruby libraries which have native extensions. We need to compile these with the provided script:

  • cd /path/to/sonic-pi/root/
  • cd app/server/bin
  • ../native/osx/ruby/bin/ruby compile-extensions.rb

This will take some time. Ignore the warnings.

Qt GUI

Xcode 6 and lower

  • Build QScintilla:
    • cd /path/to/qscintilla/Qt4Qt5
    • generate makefile: /path/to/qt/5.4/clang_64/bin/qmake qscintilla.pro
    • make
  • 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.4/clang_64/bin    

Xcode 7+

  • Build QScintilla:
    • cd /path/to/qscintilla/Qt4Qt5
    • Add the following to qscintilla.pro QMAKE_MAC_SDK = macosx10.11
    • generate makefile: /path/to/qt/5.4/clang_64/bin/qmake qscintilla.pro
    • make
    • update the dylib inner path part 1: install_name_tool -id "/path/to/qscintilla/Qt4Qt5/libqscintilla2.12.dylib" /path/to/qscintilla/Qt4Qt5/libqscintilla2.12.dylib
    • update the dylib inner path part 2: install_name_tool -change "libqscintilla2.12.dylib" "/path/to/qscintilla/Qt4Qt5/libqscintilla2.12.dylib" /path/to/qscintilla/Qt4Qt5/libqscintilla2.12.dylib
  • Add the following to SonicPi.pro
    LIBS += -L /path/to/qscintilla/Qt4Qt5/ -lqscintilla2
    INCLUDEPATH += /path/to/qscintilla/Qt4Qt5/
    DEPENDPATH += /path/to/qscintilla/Qt4Qt5/
  • Add the following to SonicPi.pro
    QMAKE_MAC_SDK = macosx10.11
  • Modify top of mac-build-app appropriately i.e.
    QSCINTILLA=/path/to/qscintilla/Qt4Qt5
    QTBIN=/path/to/qt/5.4/clang_64/bin

Building the App

Finally, we need to build the OS X App

  • cd /path/to/sonic-pi/root/
  • cd app/gui/qt
  • ./mac-build-app
  • App should be in build dir which you can either launch via Finder or via the following from the qt dir:
  • ./build/Sonic\ Pi.app/Contents/MacOS/Sonic\ Pi

Sonic Pi should now boot successfully.