Commit 5d92e4d0 authored by Leander Schulten's avatar Leander Schulten

Dependencies: Update build scripts, move common code into own scripts. Do not...

Dependencies: Update build scripts, move common code into own scripts. Do not use the default compiler on windows (can lead to errors)
parent 5da79bd5
......@@ -2,19 +2,12 @@
set -e
# see https://github.com/thestk/rtaudio/blob/master/install.txt
source ../scripts/set_env.sh
GIT_DIR=rtaudio
# add or update git
if [ ! -d "$GIT_DIR" ]; then # if folder "GIT_DIR" does not exists
git clone https://github.com/thestk/rtaudio.git "$GIT_DIR"
cd "$GIT_DIR"
else
cd "$GIT_DIR"
if [[ $(git pull) = "Already up to date." ]]; then
# we can skip recompiling, because the last build is already up to date
echo "Already up to date."
exit 0
fi
fi
../scripts/clone_or_pull.sh $GIT_DIR https://github.com/thestk/rtaudio.git && exit 0
cd $GIT_DIR
# we are in the "$GIT_DIR" now
# build
......@@ -36,7 +29,7 @@ else
./autogen.sh --with-alsa
FILES_TO_COPY="librtaudio.so*"
fi
make
$make
cd ..
#copy headers and lib
......
#!/bin/bash
source ../scripts/set_env.sh
# anleitung von hier : https://aubio.org/manual/latest/installing.html#git-repository
GIT_DIR="aubio.git"
# add or update git
if [ ! -d "$GIT_DIR" ]; then # if folder "GIT_DIR" does not exists
git clone https://github.com/aubio/aubio.git "$GIT_DIR"
cd "$GIT_DIR"
else
cd "$GIT_DIR"
if [[ $(git pull) = "Already up to date." ]]; then
# we can skip recompiling, because the last build is already up to date
echo "Already up to date."
exit 0
fi
fi
../scripts/clone_or_pull.sh $GIT_DIR https://github.com/aubio/aubio.git && exit 0
cd $GIT_DIR
# we are in the "$GIT_DIR" now
# get waf to build
./scripts/get_waf.sh
# build
if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
if [[ "$OSTYPE" == "msys" ]]; then
# we are on windows
./waf configure --disable-wavwrite --disable-wavread --msvc_version='mingw' --prefix= ""
./waf configure --disable-wavwrite --disable-wavread -v --prefix= ""
else
if ! [[ -z "$GITLAB_CI" ]]; then
# we are on the ci
......
#!/bin/bash
source ./scripts/set_env.sh
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
echo "You are on macOS. Check if brew is installed..."
......
......@@ -2,6 +2,8 @@
set -e
cd $(dirname "$0")
source ./scripts/set_env.sh
echo "Build segvcatch"
cd segvcatch
./build.sh
......
#!/bin/bash
source ../scripts/set_env.sh
GIT_DIR="libbacktrace.git"
# add or update git
if [ ! -d "$GIT_DIR" ]; then # if folder "GIT_DIR" does not exists
git clone https://github.com/ianlancetaylor/libbacktrace.git "$GIT_DIR"
cd "$GIT_DIR"
else
cd "$GIT_DIR"
if [[ $(git pull) = "Already up to date." ]]; then
# we can skip recompiling, because the last build is already up to date
echo "Already up to date."
exit 0
fi
fi
# we are in the "$GIT_DIR" now
../scripts/clone_or_pull.sh $GIT_DIR https://github.com/ianlancetaylor/libbacktrace.git && exit 0
cd $GIT_DIR
# we are in the "$GIT_DIR" now
# build from http://boostorg.github.io/stacktrace/stacktrace/configuration_and_build.html#stacktrace.configuration_and_build.mingw_and_mingw_w64_specific_not
if [[ -z "$GITLAB_CI" ]]; then
......@@ -27,7 +18,7 @@ else
echo "We are in the gitlab CI"
./configure --host=mingw32
fi
make
$make
cd ..
# move important files to new folder
......
#!/bin/bash
set -e
source ../scripts/set_env.sh
if [[ "$OSTYPE" == "msys" ]]; then # windows
# on windows we have to install perl first :(
......@@ -14,66 +15,14 @@ if [[ "$OSTYPE" == "msys" ]]; then # windows
fi
fi
# first we have to find the Qt dir
if [ ! -z "${QT_DIR}" ]; then # from env variable
QT="${QT_DIR}"
if [ ! -d "$QT" ]; then
echo "The dir saved in env variable QT_DIR does not exists: '$QT'"
echo "Execute 'export QT_DIR=your/path/to/qt' bevor execute this script to set the QT dir."
exit 2
fi
elif [ -d "/c/Qt" ]; then # windows
QT="/c/Qt"
elif [ -d ~/Qt ]; then # mainly mac and linux
QT=~/Qt
elif [ -d "/opt/Qt" ]; then # some stackoverflow answers recommends that
QT="/opt/Qt"
elif [ ! -z "$GITLAB_CI" ]; then
echo "Use Gitlab CI"
else
if [ ! -z "${QT_DIR}" ]; then
QT="${QT_DIR}"
if [ ! -d "$QT" ]; then
echo "The dir saved in env variable QT_DIR does not exists: '$QT'"
exit 2
fi
else
echo "No Qt installation found."
echo "Execute 'export QT_DIR=your/path/to/qt' bevor execute this script to set the QT dir."
exit 1
fi
fi
if [ ! -z "$GITLAB_CI" ]; then # in gitlab CI
LATEST=$(/usr/src/mxe/usr/x86_64-w64-mingw32.shared.posix/qt5/bin/qmake --version | grep -oh '5\.[0-9]\+.[0-9]\+')
else
LATEST=$(ls "$QT" | grep 5. | tail -1)
if [ -z $LATEST ]; then
echo "No installed Qt Version like 5.xx.x found in '$QT'"
echo "Execute 'export QT_DIR=your/path/to/qt' bevor execute this script to set the QT dir."
exit 1
fi
fi
echo "Use QT Version $LATEST"
GIT_DIR="mqtt"
CUR_DIR=$(pwd)
# add or update git
if [ ! -d "$GIT_DIR" ]; then # if folder "GIT_DIR" does not exists
git clone https://github.com/qt/qtmqtt.git "$GIT_DIR"
cd "$GIT_DIR"
else
cd "$GIT_DIR"
if [[ $(git pull) = "Already up to date." ]]; then
# we can skip copying
echo "Already up to date."
exit 0
fi
fi
../scripts/clone_or_pull.sh $GIT_DIR https://github.com/qt/qtmqtt.git && exit 0
cd $GIT_DIR
# we are in the "$GIT_DIR" now.
# get the latest 5.x branch, but we now use the latest installed qt version
# last=$(git branch -a | grep -oh '5\.[0-9]\+.[0-9]\+' | tail -1)
git checkout "$LATEST"
git checkout "$QT_LATEST"
cd ..
# to build there must be no space in th path.
......@@ -94,13 +43,8 @@ do
done
# build the project
if [ ! -z "$GITLAB_CI" ]; then # in gitlab CI
/usr/src/mxe/usr/x86_64-w64-mingw32.shared.posix/qt5/bin/qmake
else
BUILD=$(ls "$QT/$LATEST/" | grep _64)
"$QT/$LATEST/$BUILD/bin/qmake"
fi
make -j$(getconf _NPROCESSORS_ONLN)
$qmake
$make
# go back and copy the relevant files
cd "$CUR_DIR"
......
#!/bin/bash
GIT_DIR="$1"
URL="$2"
if [ ! -d "$GIT_DIR" ]; then # if folder "GIT_DIR" does not exists
git clone "$URL" "$GIT_DIR"
else
cd "$GIT_DIR"
if [[ $(git pull) = "Already up to date." ]]; then
# we can skip recompiling, because the last build is already up to date
echo "$GIT_DIR already up to date."
exit 0
fi
fi
exit 1
\ No newline at end of file
#!/bin/bash
if [ ! -z "${QT_LATEST}" ];then
return 0 # already set
fi
# first we have to find the Qt dir for qmake
if [ ! -z "${QT_DIR}" ]; then # from env variable
QT="${QT_DIR}"
if [ ! -d "$QT" ]; then
echo "The dir saved in env variable QT_DIR does not exists: '$QT'"
echo "Execute 'export QT_DIR=your/path/to/qt' bevor execute this script to set the QT dir."
exit 2
fi
elif [ -d "/c/Qt" ]; then # windows
QT="C:\\Qt"
elif [ -d ~/Qt ]; then # mainly mac and linux
QT="~/Qt"
elif [ -d "/opt/Qt" ]; then # some stackoverflow answers recommends that
QT="/opt/Qt"
elif [ ! -z "$GITLAB_CI" ]; then
echo "Use Gitlab CI"
else
if [ ! -z "${QT_DIR}" ]; then
QT="${QT_DIR}"
if [ ! -d "$QT" ]; then
echo "The dir saved in env variable QT_DIR does not exists: '$QT'"
exit 2
fi
else
echo "No Qt installation found."
echo "Execute 'export QT_DIR=your/path/to/qt' bevor execute this script to set the QT dir."
exit 1
fi
fi
export QT_DIR="$QT"
if [ ! -z "$GITLAB_CI" ]; then # in gitlab CI
LATEST=$(/usr/src/mxe/usr/x86_64-w64-mingw32.shared.posix/qt5/bin/qmake --version | grep -oh '5\.[0-9]\+.[0-9]\+')
else
LATEST=$(ls "$QT" | grep 5. | tail -1)
if [ -z $LATEST ]; then
echo "No installed Qt Version like 5.xx.x found in '$QT'"
echo "Execute 'export QT_DIR=your/path/to/qt' bevor execute this script to set the QT dir."
exit 1
fi
fi
export QT_LATEST="$LATEST"
BUILD=$(ls "$QT/$LATEST/" | grep _64)
# on windows we have to set the path to use the right compiler
if [[ "$OSTYPE" == "msys" ]];then
compilerDir=$(echo $BUILD | sed s/_/0_/ ) # build is e.g. mingw73_64, but the compiler dir is than mingw730_64
export PATH="$QT\\$LATEST\\$BUILD\\bin;$QT\\Tools\\$compilerDir\\bin;$PATH"
QT_N=$(echo $QT | sed 's/\\/\//' ) # here we need normal slashed, but in path backslashes -.-
export CC="$QT_N/Tools/$compilerDir/bin/gcc.exe"
export CXX="$QT_N/Tools/$compilerDir/bin/g++.exe"
fi
if [ ! -z "$GITLAB_CI" ]; then # in gitlab CI
qmake=/usr/src/mxe/usr/x86_64-w64-mingw32.shared.posix/qt5/bin/qmake
else
qmake="$QT/$LATEST/$BUILD/bin/qmake"
fi
export qmake=$qmake
if [[ "$OSTYPE" == "msys" ]] || ! [[ -z "$GITLAB_CI" ]]; then
make="mingw32-make.exe"
else
make="make"
fi
export make="$make -j$(getconf _NPROCESSORS_ONLN)"
#!/bin/bash
if ! [ -x "$(command -v cmake)" ]; then
echo "#############################################"
echo "################### ERROR ###################"
echo "## cmake must be installed and on the PATH ##"
echo "######## https://cmake.org/download/ ########"
echo "#############################################"
echo "#############################################"
echo "PS: You have to restart the console after installing to 'reload' the PATH variable"
exit 1
fi
source ../scripts/set_env.sh
mkdir -p lib
mkdir -p include
GIT_DIR=segvcatch.git
# add or update git
if [ ! -d "$GIT_DIR" ]; then # if folder "GIT_DIR" does not exists
git clone https://github.com/Plaristote/segvcatch.git "$GIT_DIR"
cd "$GIT_DIR"
else
cd "$GIT_DIR"
if [[ $(git pull) = "Already up to date." ]]; then
# we can skip recompiling, because the last build is already up to date
echo "Already up to date."
exit 0
fi
fi
../scripts/clone_or_pull.sh $GIT_DIR https://github.com/Plaristote/segvcatch.git && exit 0
cd $GIT_DIR
# we are in the "$GIT_DIR" now
mkdir release
mkdir -p release
cd release
# build
if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
if [[ "$OSTYPE" == "msys" ]] || ! [[ -z "$GITLAB_CI" ]]; then
# we are on windows
# from build_mingw_release.bat
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ../lib
mingw32-make
$make
cd ..
else
cmake ..
make
$make
cd ..
EXTRA_DIR="lib"
# we are on linux and cross compile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment