-
-
Notifications
You must be signed in to change notification settings - Fork 941
/
Copy pathlinux-prebuild.sh
executable file
·59 lines (44 loc) · 2.02 KB
/
linux-prebuild.sh
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
#!/bin/bash
set -e # Quit script on error
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Build vcpkg
if [ ! -d "vcpkg" ]; then
echo "Cloning vcpkg"
git clone --depth 1 --branch 2021.05.12 https://github.com/microsoft/vcpkg.git vcpkg
fi
if [ ! -f "vcpkg/vcpkg" ]; then
echo "Building vcpkg"
cd vcpkg
./bootstrap-vcpkg.sh -disableMetrics
cd "${SCRIPT_DIR}"
fi
cd vcpkg
./vcpkg install kissfft fmt crossguid sdl2 gl3w reproc gsl-lite concurrentqueue platform-folders catch2 --recurse
cd "${SCRIPT_DIR}"
# Build external dependencies and copy to build tree
echo "Building external binary dependencies..."
"${SCRIPT_DIR}"/external/linux_build_externals.sh
cp "${SCRIPT_DIR}"/external/build/aubio-prefix/src/aubio-build/aubio_onset "${SCRIPT_DIR}"/server/native/
mkdir -p "${SCRIPT_DIR}"/server/beam/tau/priv/
cp "${SCRIPT_DIR}"/external/build/sp_midi-prefix/src/sp_midi-build/*.so "${SCRIPT_DIR}"/server/beam/tau/priv/
cp "${SCRIPT_DIR}"/external/build/sp_link-prefix/src/sp_link-build/*.so "${SCRIPT_DIR}"/server/beam/tau/priv/
echo "Compiling native ruby extensions..."
ruby "${SCRIPT_DIR}"/server/ruby/bin/compile-extensions.rb
echo "Translating tutorial..."
ruby "${SCRIPT_DIR}"/server/ruby/bin/i18n-tool.rb -t
echo "Generating docs for the Qt GUI..."
ruby "${SCRIPT_DIR}"/server/ruby/bin/qt-doc2.rb
# TODO: remove the below lines once the new documentation system is integrated into the GUI
cp "${SCRIPT_DIR}"/gui/qt/utils/ruby_help.tmpl "${SCRIPT_DIR}"/gui/qt/utils/ruby_help.h
ruby "${SCRIPT_DIR}"/server/ruby/bin/qt-doc.rb -o "${SCRIPT_DIR}"/gui/qt/utils/ruby_help.h
echo "Updating GUI translation files..."
PATH=`pkg-config --variable bindir Qt5`:$PATH lrelease "${SCRIPT_DIR}"/gui/qt/lang/*.ts
echo "Compiling Erlang/Elixir files..."
cd "${SCRIPT_DIR}"/server/beam/tau
MIX_ENV="${MIX_ENV:-prod}" mix local.hex --force
MIX_ENV="${MIX_ENV:-prod}" mix deps.get
MIX_ENV="${MIX_ENV:-prod}" mix release --overwrite
cp src/tau.app.src ebin/tau.app
cd "${SCRIPT_DIR}/../etc/docs"
mix setup
cd "${SCRIPT_DIR}"