forked from sonic-pi-net/sonic-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build - fork mac* build scripts from linux build scripts
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e # Quit script on error | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
config="" | ||
|
||
if [ "$1" = "--config" ]; then | ||
case $2 in | ||
Release|Debug|RelWithDebInfo|MinSizeRel) | ||
config="$2" | ||
;; | ||
*) | ||
echo "`basename $0`: Error: invalid configuration: '${2}'" 1>&2 | ||
echo "Valid configurations: Release, Debug, RelWithDebInfo, MinSizeRel" 1>&2 | ||
exit 1 | ||
;; | ||
esac | ||
elif [ ! -z $1 ]; then | ||
echo "`basename $0`: Error: invalid parameter: '${1}'" 1>&2 | ||
echo "Usage: `basename $0` [--config <Release|Debug|RelWithDebInfo|MinSizeRel>]" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
echo "Creating build directory..." | ||
mkdir -p "${SCRIPT_DIR}/build" | ||
|
||
echo "Generating makefiles..." | ||
cd "${SCRIPT_DIR}/build" | ||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=\"$config\" .. | ||
|
||
cd "${SCRIPT_DIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
set -e # Quit script on error | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
echo "Warning: Unix build scripts are still a work in progress!" | ||
|
||
# Build external dependencies | ||
if [ "$1" = "--build-aubio" ]; then | ||
"${SCRIPT_DIR}/external/linux_build_externals.sh" --build-aubio | ||
else | ||
"${SCRIPT_DIR}/external/linux_build_externals.sh" | ||
fi | ||
|
||
# Install dependencies to server | ||
echo "Copying external dependencies to the server..." | ||
mkdir -p "${SCRIPT_DIR}/../../server/erlang/sonic_pi_server/priv/" | ||
cp ${SCRIPT_DIR}/external/build/sp_midi-prefix/src/sp_midi-build/*.so ${SCRIPT_DIR}/../../server/erlang/sonic_pi_server/priv/ | ||
|
||
if [ "$1" = "--build-aubio" ]; then | ||
mkdir -p "${SCRIPT_DIR}/../../server/native/lib" | ||
cp "${SCRIPT_DIR}/external/build/aubio-prefix/src/aubio-build/libaubio-5.so" "${SCRIPT_DIR}/../../server/native/lib/" | ||
fi | ||
|
||
#dont remove ruby-aubio-prerelease, as needed in linux build | ||
#it is removed in the windows-prebuild | ||
|
||
echo "Compiling native ruby extensions..." | ||
ruby "${SCRIPT_DIR}/../../server/ruby/bin/compile-extensions.rb" | ||
|
||
echo "Translating tutorial..." | ||
#assumes linux uses system ruby | ||
#so dont use prefix ../../server/native/ruby/bin/ruby, as unnecessary to set this up | ||
ruby "${SCRIPT_DIR}/../../server/ruby/bin/i18n-tool.rb" -t | ||
|
||
echo "Generating docs for the Qt GUI..." | ||
cp "${SCRIPT_DIR}/utils/ruby_help.tmpl" "${SCRIPT_DIR}/utils/ruby_help.h" | ||
ruby "${SCRIPT_DIR}/../../server/ruby/bin/qt-doc.rb" -o "${SCRIPT_DIR}/utils/ruby_help.h" | ||
|
||
echo "Updating GUI translation files..." | ||
lrelease "${SCRIPT_DIR}"/lang/*.ts | ||
|
||
echo "Compiling erlang files..." | ||
cd "${SCRIPT_DIR}/../../server/erlang/sonic_pi_server" | ||
erl -make | ||
cp src/sonic_pi_server.app.src ebin/sonic_pi_server.app | ||
cd "${SCRIPT_DIR}" |