Commit 09657b32 authored by Leander Schulten's avatar Leander Schulten

Build: You can now build the dependencies and the Lichtsteuerung on Linux (you...

Build: You can now build the dependencies and the Lichtsteuerung on Linux (you have to comment out the AudioFFT lib)
parent 3206caa2
Pipeline #204263 passed with stage
in 4 minutes and 37 seconds
......@@ -23,6 +23,8 @@ Features:
5. Drücke _Next_ und beende die Installation.
6. Nun Qt Creator wie [hier](documentation/QtCreator.md) beschrieben einrichten
7. Dann git wie [hier](documentation/git.md) beschrieben einrichten
8. Linux only: Die folgenden Pakete werden zum Bauen der Lichtsteuerung benötigt: `gcc make cmake autoconf libtool automake libasound2-dev libgl1-mesa-dev mesa-common-dev`. Man kann sie z.B. durch den Befehl `sudo apt install gcc make cmake ...` installieren.
9. Im Ordner `src/lib` das Script `build_libs.sh` ausführen.
## Docker/GitlabCI/Cross-Compilation
Siehe [hier](Docker.md).
......
......@@ -209,9 +209,9 @@ DISTFILES +=
# QMAKE_CXXFLAGS += -lasan
# LIBS += -lasan
win32-g++{
win32-g++ | linux{
# boost
CONFIG(debug, debug|release){
win32-g++:CONFIG(debug, debug|release){
DEBUG = d-
} else {
DEBUG =
......@@ -220,7 +220,7 @@ win32-g++{
INCLUDEPATH += $$PWD/'lib/boost/include'
}
unix{
macx{
#installed with brew install boost
LIBS += -L/usr/local/lib -lboost_coroutine -lboost_context-mt
INCLUDEPATH += /usr/local/include
......@@ -294,3 +294,8 @@ macx{
# Needed by the SystemVolume class
LIBS += -framework CoreAudio
}
linux{
# needed for dynamic libs
LIBS += -ldl
}
......@@ -456,6 +456,15 @@ void transferData(Modules::Property & p, GUI::detail::PropertyInformation &pi){
pi.setMaxValue(p.asNumeric<SourceType>()->getMax());
}
// see https://stackoverflow.com/questions/4160945/long-long-int-vs-long-int-vs-int64-t-in-c
template <>
void transferData<int64_t>(Modules::Property &p, GUI::detail::PropertyInformation &pi) {
static_assert(sizeof(qint64) == sizeof(int64_t), "qint64 and int64_t must have the same size");
pi.setValue(static_cast<qint64>(p.asNumeric<int64_t>()->getValue()));
pi.setMinValue(static_cast<qint64>(p.asNumeric<int64_t>()->getMin()));
pi.setMaxValue(static_cast<qint64>(p.asNumeric<int64_t>()->getMax()));
}
QQuickItem * ProgramBlockEditor::getItemWithPropertyBase(QMouseEvent *event){
auto comp = childAt(event->x(),event->y());
if(!comp){
......
......@@ -20,8 +20,12 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
FILES_TO_COPY="librtaudio.dylib librtaudio.6.dylib"
else
#linux
if ! dpkg -s libasound2-dev autoconf libtool automake >/dev/null 2>&1; then
echo "You have to install the packages libasound2-dev autoconf libtool automake! Run 'sudo apt install libasound2-dev autoconf libtool automake'"
exit 1
fi
./autogen.sh --with-alsa
FILES_TO_COPY="librtaudio.so librtaudio.6.so"
FILES_TO_COPY="librtaudio.so*"
fi
make
cd ..
......
......@@ -63,7 +63,22 @@ elif [[ "$OSTYPE" == "msys" ]] || ! [[ -z "$GITLAB_CI" ]]; then
./b2$EXE --prefix=../ -q --layout=tagged --with-coroutine --with-context abi=ms architecture=x86 binary-format=pe target-os=windows toolset=$TOOLSET link=shared threading=multi runtime-link=shared address-model=64 install
echo "Boost build is finished"
else
# linux?
echo "You are on Linux"
echo "Linux is currently not supported (no mashine to test). You must install boost yourself. Maybe look at the windows version in this file."
echo "We do not use the boost package from the package manager, because this package is very outdated"
# copied from windows
GIT_DIR="boost.git"
if ! [ -d "$GIT_DIR" ]; then
echo "We have to clone the repo, this will take approximately 6.5 minutes"
git clone --depth 1 --shallow-submodules --recurse-submodules --jobs 32 https://github.com/boostorg/boost.git "$GIT_DIR"
cd "$GIT_DIR"
echo "Init the build"
# configure the build
./bootstrap.sh
else
cd "$GIT_DIR"
git pull
fi
echo "Build boost, this will take approximately 3 minutes, if boost is not already build."
./b2 --prefix=../ -q --layout=tagged --with-coroutine --with-context link=shared install
echo "Boost build is finished"
fi
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