-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom-build
130 lines (113 loc) · 4.3 KB
/
custom-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
#Fail script on first error encountered
set -e
#Application/library versions built by this script.
SUPERCOLLIDER_VERSION=3.9.0
SC_PLUGINS_VERSION=${SUPERCOLLIDER_VERSION}
AUBIO_VERSION=0.4.5
OSMID_VERSION=391f35f789f18126003d2edf32902eb714726802
#Internal definitions
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SP_APP_SRC=${SCRIPT_DIR}
SP_ROOT=${SP_APP_SRC}/../../../../
OSMID_DIR=${SP_APP_SRC}/../../server/native/linux/osmid
echo "This script has been tested on ubuntu 16.04, it should work on ubuntu 15.10."
echo "14.04 users may need to install some of the dependencies by hand from source"
echo "We're working to make this script a one shot solution for all Linux platforms"
echo "Please direct rage and suggestions to Factoid in (https://gitter.im/samaaron/sonic-pi)"
#Install dependencies for building supercollider, as well as qt5 and supporting libraries for gui
sudo apt-get install -y \
g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev \
libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev \
libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake libboost-dev \
libqwt-qt5-dev libqt5scintilla2-dev libqt5svg5-dev qt5-qmake qt5-default \
qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev \
libqt5opengl5-dev curl python erlang-base
### IF YOU HAVE PROBLEMS WITH qwt
#cd $SP_APP_SRC/../../../../
#wget 'http://downloads.sourceforge.net/project/qwt/qwt/6.1.2/qwt-6.1.2.tar.bz2'
#tar -xf qwt-6.1.2.tar.bz2
#cd qwt-6.1.2
#/usr/lib/x86_64-linux-gnu/qt5/bin/qmake qwt.pro
#make
#sudo make install
#sudo cp /usr/local/qwt-6.1.2/features/* /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/
### IF YOU HAVE PROBLEMS WITH qscintilla2
#cd $SP_APP_SRC/../../../../
#git clone https://github.com/fastogt/qscintilla.git || true
#cd qscintilla/Qt4Qt5/
#/usr/lib/x86_64-linux-gnu/qt5/bin/qmake qscintilla.pro
#make
#sudo make install
#Build supercollider from source
#cd ${SP_ROOT}
#git clone https://github.com/supercollider/supercollider.git || true
#cd supercollider
#git checkout Version-${SUPERCOLLIDER_VERSION}
#git submodule init && git submodule update
#mkdir -p build
#cd build
#cmake -DSC_EL=no ..
#make
#sudo make install
#This should install to /usr/local/
#Build sc3 plugins and install to /usr/local/ so supercollider can find them
#cd ${SP_ROOT}
#git clone https://github.com/supercollider/sc3-plugins.git || true
#cd sc3-plugins
#git checkout Version-${SC_PLUGINS_VERSION}
#git submodule init && git submodule update
#cp -r external_libraries/nova-simd/* source/VBAPUGens
#mkdir -p build
#cd build
#cmake -DSC_PATH=/usr/local/include/SuperCollider -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release ..
#make
#sudo make install
#Install libaubio (apt-get version is too old)
#cd ${SP_ROOT}
#git clone https://github.com/aubio/aubio.git || true
#cd aubio
#git checkout ${AUBIO_VERSION}
#make getwaf
#./waf configure
#./waf build
#sudo ./waf install
#Install osmid (for MIDI support)
#cd ${SP_ROOT}
#git clone https://github.com/llloret/osmid.git || true
#cd osmid
#git checkout ${OSMID_VERSION}
#mkdir -p build
#cd build
#cmake ..
#make
#mkdir -p ${OSMID_DIR}
#install m2o o2m -t ${OSMID_DIR}
#Build Erlang files
#cd ${SP_APP_SRC}/../../server/erlang
#The current implementation of osc.erl uses Erlang features that require
#at least Erlang 19.1 to be installed. 16.04 LTS is currently at 18.3.
#If versions < 19.1 are installed, and we use the current code, the MIDI
#implementation breaks because the Erlang OSC router is failing.
#ERLANG_VERSION=$(./print_erlang_version)
#if [ -e "osc.erl.orig" ]; then
# Handle, if the original file in the source tree ever gets updated.
# rm osc.erl.orig
# git checkout osc.erl
#fi
#if [[ "${ERLANG_VERSION}" < "19.1" ]]; then
# echo "Found Erlang version < 19.1 (${ERLANG_VERSION})! Updating source code."
# sed -i.orig 's|erlang:system_time(nanosecond)|erlang:system_time(nano_seconds)|' osc.erl
#fi
#erlc osc.erl
#erlc pi_server.erl
#Build sonic-pi server extensions, documentation, and binary.
cd ${SP_APP_SRC}
../../server/ruby/bin/compile-extensions.rb
../../server/ruby/bin/i18n-tool.rb -t
cp -f ruby_help.tmpl ruby_help.h
../../server/ruby/bin/qt-doc.rb -o ruby_help.h
lrelease SonicPi.pro
qmake -qt=qt5 SonicPi.pro
make