From 4e97edcc28ef1cf8f363b44416f9aabddb6c8dd3 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 14:46:39 +0200 Subject: [PATCH 01/23] WIP --- configure.ac | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 7ab819130b..dce72fc800 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([projectM], [3.1.0], [mischa@mvstg.biz], [projectM], [https://github.com/revmischa/projectm]) +AC_INIT([projectM], [3.1.1], [mischa@mvstg.biz], [projectM], [https://github.com/projectM-visualizer/projectm/]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects tar-pax]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) @@ -134,7 +134,7 @@ AX_CHECK_COMPILE_FLAG([-std=c++11], [ dnl Qt AC_ARG_ENABLE([qt], - AS_HELP_STRING([--enable-qt], [Build Qt]), + AS_HELP_STRING([--enable-qt], [Enable Qt: needed for pulseaudio and jack GUIs]), [], [enable_qt=no]) AS_IF([test "x$enable_qt" = "xyes"], [ PKG_CHECK_MODULES(QT, [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], [], [AC_MSG_ERROR([Qt libraries are required.])]) @@ -152,12 +152,28 @@ AS_IF([test "x$enable_qt" = "xyes"], [ if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then AC_MSG_ERROR([Qt utility programs moc, uic, and rcc are required.]) fi +]) + + +dnl Pulseaudio +AC_MSG_CHECKING([libpulse]) +PKG_CHECK_MODULES(PULSE, [libpulse], + [AC_MSG_RESULT([yes]); enable_pulseaudio=yes] + [AC_MSG_RESULT([no])] +) +AC_ARG_ENABLE([pulseaudio], +AS_HELP_STRING([--enable-pulseaudio], [Build Pulseaudio]), + [], [enable_pulseaudio=no]) +AS_IF([test "x$enable_pulseaudio" = "xyes"], [ +PKG_CHECK_MODULES(PULSE, [pulse], [], [AC_MSG_ERROR([Pulseaudio libraries are required.])]) PKG_CHECK_MODULES(LIBPULSE, [libpulse], [], [AC_MSG_ERROR([Pulseaudio library libpulse is required.])]) ]) AM_CONDITIONAL([ENABLE_SDL], [test "$enable_sdl" = yes]) AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" = yes]) +AM_CONDITIONAL([ENABLE_JACK], [test "$enable_jack" = yes]) +AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test "$enable_pulseaudio" = yes]) AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test "$enable_emscripten" = yes]) @@ -192,7 +208,9 @@ Applications: libprojectM: yes Threading: ${enable_threading} SDL: ${enable_sdl} -Qt & Pulseaudio: ${enable_qt} +Qt: ${enable_qt} +Pulseaudio: ${enable_pulseaudio} +Jack: ${enable_jack} OpenGLES: ${enable_gles} Emscripten: ${enable_emscripten} ]) From e0c89f7bbe9b8504742eef35ac5b34e4b9eba1af Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 18:29:29 +0200 Subject: [PATCH 02/23] detect if we have libpulseaudio, libsdl2, and qt5 and if so just enable them automatically without the user having to. --- configure.ac | 93 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index dce72fc800..34a19d2d0b 100644 --- a/configure.ac +++ b/configure.ac @@ -75,24 +75,36 @@ AC_CONFIG_FILES([ src/projectM-test/Makefile ]) -dnl SDL -AC_ARG_ENABLE([sdl], - AS_HELP_STRING([--enable-sdl], [Build SDL2 app]), - [], [enable_sdl=no]) -AS_IF([test "x$enable_sdl" = "xyes"], [ - m4_include([m4/sdl2.m4]) - SDL_VERSION=2.0.5 - AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care - AS_IF([test "EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care - AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) + +# SDL +AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=check]) +AS_IF([test "$enable_sdl" != "no"], [ + m4_include([m4/sdl2.m4]) + SDL_VERSION="2.0.5" + AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care + AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care + + # Check for libSDL >= $SDL_VERSION + found_sdl=no + AM_PATH_SDL2($SDL_VERSION, + [found_sdl=yes; enable_sdl=yes], + [:]) + + AC_MSG_CHECKING(SDL2 >= $SDL_VERSION) + AS_IF([test "$found_sdl" = "yes"], AC_MSG_RESULT([yes]), AC_MSG_RESULT(no)) + + # blow up if user asked for SDL and we don't have it + AS_IF([test "$enable_sdl" = "yes" && test "$found_sdl" = "no"], AC_MSG_ERROR([*** SDL version >= $SDL_VERSION not found!])) ]) -dnl glm + +# glm AS_IF([test "x$enable_emscripten" != "xyes"], [ AC_CHECK_HEADER([glm/glm.hpp],, AC_MSG_ERROR(libglm is required.)) ]) -dnl Threading + +# Threading AC_ARG_ENABLE([threading], AS_HELP_STRING([--enable-threading], [multhreading]), [], [enable_threading=yes]) @@ -133,11 +145,38 @@ AX_CHECK_COMPILE_FLAG([-std=c++11], [ CXXFLAGS="$CXXFLAGS -std=c++11"]) dnl Qt -AC_ARG_ENABLE([qt], - AS_HELP_STRING([--enable-qt], [Enable Qt: needed for pulseaudio and jack GUIs]), - [], [enable_qt=no]) +AC_ARG_ENABLE([qt], AS_HELP_STRING([--enable-qt], [Enable Qt: needed for pulseaudio and jack GUIs]), [], [enable_qt=check]) +AS_IF([test "$enable_qt" != "no"], + [PKG_CHECK_MODULES([Qt5], + [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], + [ + enable_qt=yes + + # do more checks for Qt version and tools + qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" + qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" + qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" + + if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then + AC_MSG_WARN([Qt >= 5.0.0 is required. Try installing qtdeclarative5-dev]) + enable_qt=no + fi + + AC_CHECK_PROGS(MOC, [moc-qt5 moc]) + AC_CHECK_PROGS(UIC, [uic-qt5 uic]) + AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) + if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then + AC_MSG_WARN([Qt utility programs moc, uic, and rcc are required.]) + enable_qt=no + fi + ], + [AS_IF([test "$enable_qt" = "yes"], + [AC_MSG_ERROR(["Qt5 not found"])], + [enable_qt=no])] +)]) + AS_IF([test "x$enable_qt" = "xyes"], [ - PKG_CHECK_MODULES(QT, [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], [], [AC_MSG_ERROR([Qt libraries are required.])]) + PKG_CHECK_MODULES(Qt, [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], [], [AC_MSG_ERROR([Qt libraries are required.])]) qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" @@ -156,19 +195,15 @@ AS_IF([test "x$enable_qt" = "xyes"], [ dnl Pulseaudio -AC_MSG_CHECKING([libpulse]) -PKG_CHECK_MODULES(PULSE, [libpulse], - [AC_MSG_RESULT([yes]); enable_pulseaudio=yes] - [AC_MSG_RESULT([no])] -) - -AC_ARG_ENABLE([pulseaudio], -AS_HELP_STRING([--enable-pulseaudio], [Build Pulseaudio]), - [], [enable_pulseaudio=no]) -AS_IF([test "x$enable_pulseaudio" = "xyes"], [ -PKG_CHECK_MODULES(PULSE, [pulse], [], [AC_MSG_ERROR([Pulseaudio libraries are required.])]) - PKG_CHECK_MODULES(LIBPULSE, [libpulse], [], [AC_MSG_ERROR([Pulseaudio library libpulse is required.])]) -]) +AC_ARG_ENABLE([pulseaudio], AS_HELP_STRING([--enable-pulseaudio], [Build Pulseaudio]), [], [enable_pulseaudio=check]) +AS_IF([test "$enable_pulseaudio" != "no"], + [PKG_CHECK_MODULES([libpulse], + [libpulse], + [enable_pulseaudio=yes], + [AS_IF([test "$enable_pulseaudio" = "yes"], + [AC_MSG_ERROR([libpulse required, but not found.])], + [enable_pulseaudio=no])])]) + AM_CONDITIONAL([ENABLE_SDL], [test "$enable_sdl" = yes]) AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" = yes]) From 70f941a21913aec2a77116c4d7d1a1d6d1569520 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 18:44:58 +0200 Subject: [PATCH 03/23] jack support, travis build with pa/jack/qt --- .travis.yml | 18 +++++++++++++++++- configure.ac | 17 ++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b136753932..668ad871b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,23 @@ matrix: - libc++-dev env: - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" - # linux/gcc + # linux/clang with pulseaudio/qt/jack + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + - libsdl2-dev + - libglm-dev + - libc++-dev + - qtdeclarative5-dev + - libjack-dev + - libpulse-dev + env: + - MATRIX_EVAL="CC=clang-5.0 CXX=clang++-5.0 PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio\"" + # linux/gcc - os: linux addons: apt: diff --git a/configure.ac b/configure.ac index 34a19d2d0b..2c93cd6d18 100644 --- a/configure.ac +++ b/configure.ac @@ -182,19 +182,19 @@ AS_IF([test "x$enable_qt" = "xyes"], [ qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then - AC_MSG_ERROR([Qt >= 5.0.0 is required. Try installing qtdeclarative5-dev]) + AC_MSG_ERROR([Qt >= 5.0.0 is required. Try installing qtdeclarative5-dev]) fi AC_CHECK_PROGS(MOC, [moc-qt5 moc]) AC_CHECK_PROGS(UIC, [uic-qt5 uic]) AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then - AC_MSG_ERROR([Qt utility programs moc, uic, and rcc are required.]) + AC_MSG_ERROR([Qt utility programs moc, uic, and rcc are required.]) fi ]) -dnl Pulseaudio +# Pulseaudio AC_ARG_ENABLE([pulseaudio], AS_HELP_STRING([--enable-pulseaudio], [Build Pulseaudio]), [], [enable_pulseaudio=check]) AS_IF([test "$enable_pulseaudio" != "no"], [PKG_CHECK_MODULES([libpulse], @@ -205,6 +205,17 @@ AS_IF([test "$enable_pulseaudio" != "no"], [enable_pulseaudio=no])])]) +# Jack +AC_ARG_ENABLE([jack], AS_HELP_STRING([--enable-jack], [Build Jack]), [], [enable_jack=check]) +AS_IF([test "$enable_jack" != "no"], + [PKG_CHECK_MODULES([jack], + [libpulse], + [enable_jack=yes], + [AS_IF([test "$enable_jack" = "yes"], + [AC_MSG_ERROR([jack required, but not found.])], + [enable_jack=no])])]) + + AM_CONDITIONAL([ENABLE_SDL], [test "$enable_sdl" = yes]) AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" = yes]) AM_CONDITIONAL([ENABLE_JACK], [test "$enable_jack" = yes]) From 7b94eb28048b1757ac6a5e46732248bc087d04fb Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 18:52:17 +0200 Subject: [PATCH 04/23] pass config opts --- .travis.yml | 7 +++---- configure.ac | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 668ad871b9..793499405b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ before_install: # TODO: test different combinations of flags, --enable-sdl, --enable-qt, etc script: - - ./configure --enable-sdl --prefix=$PWD/local && make -j8 && make install # build from checkout + - ./configure --enable-sdl $PM_OPTS --prefix=$PWD/local && make -j8 && make install # build from checkout - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --prefix=$PWD/dist_install && make -j8 && make install # build from dist - echo "PWD $PWD" - ls . @@ -23,7 +23,7 @@ script: # test on GCC and Clang matrix: include: - # linux/clang + # linux/clang with SDL - os: linux addons: apt: @@ -35,7 +35,7 @@ matrix: - libglm-dev - libc++-dev env: - - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" + - MATRIX_EVAL="CC=clang-5.0 CXX=clang++-5.0 PM_OPTS=\"--enable-sdl\"" # linux/clang with pulseaudio/qt/jack - os: linux addons: @@ -44,7 +44,6 @@ matrix: - llvm-toolchain-trusty-5.0 packages: - clang-5.0 - - libsdl2-dev - libglm-dev - libc++-dev - qtdeclarative5-dev diff --git a/configure.ac b/configure.ac index 2c93cd6d18..bad4e84ab3 100644 --- a/configure.ac +++ b/configure.ac @@ -169,6 +169,8 @@ AS_IF([test "$enable_qt" != "no"], AC_MSG_WARN([Qt utility programs moc, uic, and rcc are required.]) enable_qt=no fi + + export QT_SELECT=qt5 ], [AS_IF([test "$enable_qt" = "yes"], [AC_MSG_ERROR(["Qt5 not found"])], From 52e64bdfeba4250b91e1cfdc0bd7c120a0bebfb7 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 18:57:49 +0200 Subject: [PATCH 05/23] test --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 793499405b..9216b6a3b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: script: - ./configure --enable-sdl $PM_OPTS --prefix=$PWD/local && make -j8 && make install # build from checkout - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --prefix=$PWD/dist_install && make -j8 && make install # build from dist - - echo "PWD $PWD" + - echo "PWD=$PWD" - ls . - test -e src/projectM-sdl/projectMSDL - test -e src/libprojectM/libprojectM.la @@ -47,6 +47,7 @@ matrix: - libglm-dev - libc++-dev - qtdeclarative5-dev + - qtbase5-dev - libjack-dev - libpulse-dev env: From b2cd910b16c1eb111c9fb791a005eca24626dc14 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 19:08:44 +0200 Subject: [PATCH 06/23] test --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9216b6a3b2..7fa332cb4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,7 @@ matrix: - libc++-dev - qtdeclarative5-dev - qtbase5-dev + - qt5-default - libjack-dev - libpulse-dev env: From 329b6d8451fad0fe098362e432ce0f0a873aa5ea Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 19:14:13 +0200 Subject: [PATCH 07/23] test --- .travis.yml | 3 +-- configure.ac | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7fa332cb4c..48dbe916e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,8 +47,7 @@ matrix: - libglm-dev - libc++-dev - qtdeclarative5-dev - - qtbase5-dev - - qt5-default + - libqt5opengl5-dev - libjack-dev - libpulse-dev env: diff --git a/configure.ac b/configure.ac index bad4e84ab3..51f940b461 100644 --- a/configure.ac +++ b/configure.ac @@ -158,7 +158,7 @@ AS_IF([test "$enable_qt" != "no"], qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then - AC_MSG_WARN([Qt >= 5.0.0 is required. Try installing qtdeclarative5-dev]) + AC_MSG_WARN([Qt >= 5.0.0 is required. Try installing libqt5opengl5-dev qtdeclarative5-dev]) enable_qt=no fi From 666d1be14a4847b9fe3bf909ae94930abc68751c Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 19:21:43 +0200 Subject: [PATCH 08/23] don't always enable sdl --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 48dbe916e1..9dd33c774d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ before_install: # TODO: test different combinations of flags, --enable-sdl, --enable-qt, etc script: - - ./configure --enable-sdl $PM_OPTS --prefix=$PWD/local && make -j8 && make install # build from checkout + - ./configure $PM_OPTS --prefix=$PWD/local && make -j8 && make install # build from checkout - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --prefix=$PWD/dist_install && make -j8 && make install # build from dist - echo "PWD=$PWD" - ls . From 1b6527879bf5cde418a4555cda19abbca30e72ec Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 20:02:31 +0200 Subject: [PATCH 09/23] better libsdl2 detection --- configure.ac | 79 +++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/configure.ac b/configure.ac index 51f940b461..c5f2485e3e 100644 --- a/configure.ac +++ b/configure.ac @@ -79,22 +79,22 @@ AC_CONFIG_FILES([ # SDL AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=check]) AS_IF([test "$enable_sdl" != "no"], [ - m4_include([m4/sdl2.m4]) - SDL_VERSION="2.0.5" - AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care - AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care - - # Check for libSDL >= $SDL_VERSION - found_sdl=no - AM_PATH_SDL2($SDL_VERSION, - [found_sdl=yes; enable_sdl=yes], - [:]) - - AC_MSG_CHECKING(SDL2 >= $SDL_VERSION) - AS_IF([test "$found_sdl" = "yes"], AC_MSG_RESULT([yes]), AC_MSG_RESULT(no)) - - # blow up if user asked for SDL and we don't have it - AS_IF([test "$enable_sdl" = "yes" && test "$found_sdl" = "no"], AC_MSG_ERROR([*** SDL version >= $SDL_VERSION not found!])) + PKG_CHECK_MODULES([SDL], [sdl2], [ + m4_include([m4/sdl2.m4]) + SDL_VERSION="2.0.5" + AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care + AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care + + # Check for libSDL >= $SDL_VERSION + AM_PATH_SDL2($SDL_VERSION, + [enable_sdl=yes], + [AS_IF([test "$enable_sdl" = "yes"], AC_MSG_ERROR([*** SDL version >= $SDL_VERSION not found!])); enable_sdl=no]) + ], + [ + # not found + AS_IF([test "$enable_sdl" = "yes"], AC_MSG_ERROR([*** libsdl2 not found!])) + enable_sdl=no + ]) ]) @@ -147,30 +147,33 @@ AX_CHECK_COMPILE_FLAG([-std=c++11], [ dnl Qt AC_ARG_ENABLE([qt], AS_HELP_STRING([--enable-qt], [Enable Qt: needed for pulseaudio and jack GUIs]), [], [enable_qt=check]) AS_IF([test "$enable_qt" != "no"], - [PKG_CHECK_MODULES([Qt5], + [PKG_CHECK_MODULES([qt], [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], [ - enable_qt=yes - - # do more checks for Qt version and tools - qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" - qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" - qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" - - if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then - AC_MSG_WARN([Qt >= 5.0.0 is required. Try installing libqt5opengl5-dev qtdeclarative5-dev]) - enable_qt=no - fi - - AC_CHECK_PROGS(MOC, [moc-qt5 moc]) - AC_CHECK_PROGS(UIC, [uic-qt5 uic]) - AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) - if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then - AC_MSG_WARN([Qt utility programs moc, uic, and rcc are required.]) - enable_qt=no - fi - - export QT_SELECT=qt5 + enable_qt=yes + + # do more checks for Qt version and tools + qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" + qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" + qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" + AC_SUBST(qt_CPPFLAGS) + AC_SUBST(qt_LDFLAGS) + AC_SUBST(qt_LIBS) + + if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then + AC_MSG_WARN([Qt >= 5.0.0 is required. Try installing libqt5opengl5-dev qtdeclarative5-dev]) + enable_qt=no + fi + + AC_CHECK_PROGS(MOC, [moc-qt5 moc]) + AC_CHECK_PROGS(UIC, [uic-qt5 uic]) + AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) + if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then + AC_MSG_WARN([Qt utility programs moc, uic, and rcc are required.]) + enable_qt=no + fi + + export QT_SELECT=qt5 ], [AS_IF([test "$enable_qt" = "yes"], [AC_MSG_ERROR(["Qt5 not found"])], From 0cfa1013e79d006e7597a12bd5bfba5c3da4a623 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 20:15:04 +0200 Subject: [PATCH 10/23] hopefully fixed qt/pulse/jack makefiles --- src/Makefile.am | 14 +++++++++++++- src/projectM-jack/make_bundle.sh | 0 src/projectM-pulseaudio/Makefile.am | 15 ++++++++------- src/projectM-qt/Makefile.am | 5 +++-- 4 files changed, 24 insertions(+), 10 deletions(-) mode change 100644 => 100755 src/projectM-jack/make_bundle.sh diff --git a/src/Makefile.am b/src/Makefile.am index 79f6f367f2..8557800d3e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,11 +6,23 @@ if ENABLE_QT PROJECTM_QT_SUBDIR = projectM-qt projectM-pulseaudio endif +if ENABLE_QT + PROJECTM_QT_SUBDIR = projectM-qt +endif + +if ENABLE_PULSEAUDIO + PROJECTM_PULSEAUDIO_SUBDIR = projectM-qt projectM-pulseaudio +endif + +if ENABLE_JACK + PROJECTM_JACK_SUBDIR = projectM-jack +endif + if ENABLE_EMSCRIPTEN PROJECTM_EMSCRIPTEN_SUBDIR = projectM-emscripten endif -SUBDIRS=libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} +SUBDIRS=libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} # system headers/libraries/data to install # for compatibility reasons here as nobase_include diff --git a/src/projectM-jack/make_bundle.sh b/src/projectM-jack/make_bundle.sh old mode 100644 new mode 100755 diff --git a/src/projectM-pulseaudio/Makefile.am b/src/projectM-pulseaudio/Makefile.am index fbf19c413a..4c67f4f45d 100644 --- a/src/projectM-pulseaudio/Makefile.am +++ b/src/projectM-pulseaudio/Makefile.am @@ -9,10 +9,10 @@ nodist_projectM_pulseaudio_moc_sources = $(projectM_pulseaudio_qtheaders:.hpp=_m .hpp_moc.cpp: @MOC@ -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(MOC_CPPFLAGS)\ - $(qt_CPPFLAGS) $(qt_LDFLAGS) $(qt_LIBS) $< + $(qt_CPPFLAGS) $(qt_LDFLAGS) $< ui_PulseDeviceChooserDialog.h: PulseDeviceChooserDialog.ui - @UIC@ -o $@ $< + @UIC@ $(qt_CPPFLAGS) -o $@ $< AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ @@ -21,8 +21,9 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src/libprojectM \ -I${top_srcdir}/src/libprojectM/Renderer \ -I${top_srcdir}/src/projectM-qt \ - ${QT_CFLAGS} \ - ${LIBPULSE_CFLAGS} \ + ${qt_CFLAGS} \ + ${qt_CPPFLAGS} \ + ${libpulse_CFLAGS} \ -fPIC AM_CFLAGS = ${my_CFLAGS} \ @@ -44,12 +45,12 @@ nodist_projectM_pulseaudio_SOURCES = \ $(nodist_projectM_pulseaudio_moc_sources) projectM_pulseaudio_LDADD = \ - ${LIBPULSE_LIBS} \ + ${libpulse_LIBS} \ ../projectM-qt/libprojectM_qt.a \ ../libprojectM/libprojectM.la \ - ${QT_LIBS} + ${qt_LIBS} -projectM_pulseaudio_LDFLAGS = -static +projectM_pulseaudio_LDFLAGS = -static ${qt_LIBS} projectM_pulseaudio_PROGRAM = projectM-pulseaudio diff --git a/src/projectM-qt/Makefile.am b/src/projectM-qt/Makefile.am index a49b89ddcf..a3bd16c891 100644 --- a/src/projectM-qt/Makefile.am +++ b/src/projectM-qt/Makefile.am @@ -15,7 +15,7 @@ nodist_projectM_qt_moc_sources = $(projectM_qt_qtheaders:.hpp=_moc.cpp) .hpp_moc.cpp: @MOC@ -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(MOC_CPPFLAGS)\ - $(qt_CPPFLAGS) $(qt_LDFLAGS) $(qt_LIBS) $< + $(qt_CPPFLAGS) $(qt_LDFLAGS) $< ui_qprojectm_mainwindow.h: qprojectm_mainwindow.ui @UIC@ -o $@ $< @@ -63,7 +63,8 @@ AM_CPPFLAGS = \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -I${top_srcdir}/src/libprojectM \ -I${top_srcdir}/src/libprojectM/Renderer \ - ${QT_CFLAGS} \ + ${qt_CFLAGS} \ + ${qt_CPPFLAGS} \ -fPIC AM_CFLAGS = ${my_CFLAGS} \ From 5944e8282966da4abfd5293cd77f62963925afb1 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 20:29:24 +0200 Subject: [PATCH 11/23] oops --- configure.ac | 2 +- src/projectM-jack/video_init.cpp | 0 src/projectM-jack/video_init.h | 0 3 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 src/projectM-jack/video_init.cpp mode change 100755 => 100644 src/projectM-jack/video_init.h diff --git a/configure.ac b/configure.ac index c5f2485e3e..0797a7caf2 100644 --- a/configure.ac +++ b/configure.ac @@ -214,7 +214,7 @@ AS_IF([test "$enable_pulseaudio" != "no"], AC_ARG_ENABLE([jack], AS_HELP_STRING([--enable-jack], [Build Jack]), [], [enable_jack=check]) AS_IF([test "$enable_jack" != "no"], [PKG_CHECK_MODULES([jack], - [libpulse], + [jack], [enable_jack=yes], [AS_IF([test "$enable_jack" = "yes"], [AC_MSG_ERROR([jack required, but not found.])], diff --git a/src/projectM-jack/video_init.cpp b/src/projectM-jack/video_init.cpp old mode 100755 new mode 100644 diff --git a/src/projectM-jack/video_init.h b/src/projectM-jack/video_init.h old mode 100755 new mode 100644 From 60166628ce7e18636ba45eb7a993dbec0148a810 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 20:29:57 +0200 Subject: [PATCH 12/23] travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9dd33c774d..112a55b8d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ before_install: # TODO: test different combinations of flags, --enable-sdl, --enable-qt, etc script: - ./configure $PM_OPTS --prefix=$PWD/local && make -j8 && make install # build from checkout - - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --prefix=$PWD/dist_install && make -j8 && make install # build from dist + - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure $PM_OPTS --prefix=$PWD/dist_install && make -j8 && make install # build from dist - echo "PWD=$PWD" - ls . - test -e src/projectM-sdl/projectMSDL From c3dcaa6d24df282601de382d225297636c33d8d0 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 21:23:49 +0200 Subject: [PATCH 13/23] fix jack subdir --- .travis.yml | 2 +- configure.ac | 13 +++++++------ src/Makefile.am | 14 +++++--------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 112a55b8d0..f91ce449f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ script: - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure $PM_OPTS --prefix=$PWD/dist_install && make -j8 && make install # build from dist - echo "PWD=$PWD" - ls . - - test -e src/projectM-sdl/projectMSDL + # - test -e src/projectM-sdl/projectMSDL - test -e src/libprojectM/libprojectM.la - test -e dist_install/share/projectM/fonts/Vera.ttf - test -d dist_install/share/projectM/presets diff --git a/configure.ac b/configure.ac index 0797a7caf2..27604cef6b 100644 --- a/configure.ac +++ b/configure.ac @@ -72,8 +72,9 @@ AC_CONFIG_FILES([ src/projectM-emscripten/Makefile src/projectM-qt/Makefile src/projectM-pulseaudio/Makefile + src/projectM-jack/Makefile src/projectM-test/Makefile - ]) +]) # SDL @@ -221,11 +222,11 @@ AS_IF([test "$enable_jack" != "no"], [enable_jack=no])])]) -AM_CONDITIONAL([ENABLE_SDL], [test "$enable_sdl" = yes]) -AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" = yes]) -AM_CONDITIONAL([ENABLE_JACK], [test "$enable_jack" = yes]) -AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test "$enable_pulseaudio" = yes]) -AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test "$enable_emscripten" = yes]) +AM_CONDITIONAL([ENABLE_SDL], [test x$enable_sdl = xyes]) +AM_CONDITIONAL([ENABLE_QT], [test x$enable_qt = xyes]) +AM_CONDITIONAL([ENABLE_JACK], [test x$enable_jack = xyes]) +AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x$enable_pulseaudio = xyes]) +AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test x$enable_emscripten = xyes]) my_CFLAGS="-Wall -Wchar-subscripts -Wformat-security -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits " diff --git a/src/Makefile.am b/src/Makefile.am index 8557800d3e..41935c433e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,27 +3,23 @@ if ENABLE_SDL endif if ENABLE_QT - PROJECTM_QT_SUBDIR = projectM-qt projectM-pulseaudio -endif - -if ENABLE_QT - PROJECTM_QT_SUBDIR = projectM-qt + PROJECTM_QT_SUBDIR = projectM-qt endif if ENABLE_PULSEAUDIO - PROJECTM_PULSEAUDIO_SUBDIR = projectM-qt projectM-pulseaudio + PROJECTM_PULSEAUDIO_SUBDIR = projectM-qt projectM-pulseaudio endif if ENABLE_JACK - PROJECTM_JACK_SUBDIR = projectM-jack + PROJECTM_JACK_SUBDIR = projectM-jack endif if ENABLE_EMSCRIPTEN PROJECTM_EMSCRIPTEN_SUBDIR = projectM-emscripten endif -SUBDIRS=libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} - # system headers/libraries/data to install # for compatibility reasons here as nobase_include nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp + +SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} From d76b417fcb9924e0a9c725ae0b0e26f31d185ddf Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 21:38:09 +0200 Subject: [PATCH 14/23] jack fixup --- src/Makefile.am | 2 +- src/projectM-jack/projectM-jack.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 41935c433e..68f4333d99 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,7 +11,7 @@ if ENABLE_PULSEAUDIO endif if ENABLE_JACK - PROJECTM_JACK_SUBDIR = projectM-jack + PROJECTM_JACK_SUBDIR = projectM-qt projectM-jack endif if ENABLE_EMSCRIPTEN diff --git a/src/projectM-jack/projectM-jack.cpp b/src/projectM-jack/projectM-jack.cpp index a61436a5d6..d3936f88c0 100644 --- a/src/projectM-jack/projectM-jack.cpp +++ b/src/projectM-jack/projectM-jack.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -384,5 +385,3 @@ int main( int argc, char **argv ) { return 1; } - - From 6902973798c221e406f01c9d8af93d0034dbd248 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 21:39:00 +0200 Subject: [PATCH 15/23] jack makefile --- src/projectM-jack/Makefile.am | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/projectM-jack/Makefile.am diff --git a/src/projectM-jack/Makefile.am b/src/projectM-jack/Makefile.am new file mode 100644 index 0000000000..7c81b13973 --- /dev/null +++ b/src/projectM-jack/Makefile.am @@ -0,0 +1,24 @@ +AM_CPPFLAGS = \ +${my_CFLAGS} \ +-include $(top_builddir)/config.h \ +-DSYSCONFDIR=\""$(sysconfdir)"\" \ +-DPROJECTM_PREFIX=\""${prefix}"\" \ +-I${top_srcdir}/src/libprojectM \ +-I${top_srcdir}/src/libprojectM/Renderer \ +-I${top_srcdir}/src/projectM-qt \ +${jack_CFLAGS} \ +${qt_CPPFLAGS} \ +${qt_CFLAGS} + +# if QT_NETWORK_ENABLED +# EXTRA_SRCS = HTTPRemoteControl.cpp +# endif + +bin_PROGRAMS = projectM_jack +projectM_jack_SOURCES = projectM-jack.cpp qprojectM-jack.cpp video_init.cpp ConfigFile.cpp ${EXTRA_SRCS} +projectM_jack_LDADD = +projectM_jack_LDADD += ${jack_LIBS} ${qt_LDFLAGS} ../libprojectM/libprojectM.la +projectM_jack_LDFLAGS = -static +projectM_jack_PROGRAM = projectM-jack + +dist_man_MANS = projectM-jack.1 From 20e157897aa71c34f0a39df5d86c9e0860f5c449 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 21:55:53 +0200 Subject: [PATCH 16/23] libsdl 1 for jack --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f91ce449f3..bb1d9ed586 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,7 @@ matrix: - libqt5opengl5-dev - libjack-dev - libpulse-dev + - libsdl-dev # for jack env: - MATRIX_EVAL="CC=clang-5.0 CXX=clang++-5.0 PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio\"" # linux/gcc From 16c6e7a18305953252f5a9cf69bdda65f733ae61 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 22:05:06 +0200 Subject: [PATCH 17/23] jack builds yay (qt version) --- src/projectM-jack/Makefile.am | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/projectM-jack/Makefile.am b/src/projectM-jack/Makefile.am index 7c81b13973..2f9ef943c1 100644 --- a/src/projectM-jack/Makefile.am +++ b/src/projectM-jack/Makefile.am @@ -3,22 +3,31 @@ ${my_CFLAGS} \ -include $(top_builddir)/config.h \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DPROJECTM_PREFIX=\""${prefix}"\" \ +-DRESOURCE_PREFIX=\""share/projectM"\" \ -I${top_srcdir}/src/libprojectM \ -I${top_srcdir}/src/libprojectM/Renderer \ -I${top_srcdir}/src/projectM-qt \ ${jack_CFLAGS} \ ${qt_CPPFLAGS} \ +-fPIC \ ${qt_CFLAGS} # if QT_NETWORK_ENABLED # EXTRA_SRCS = HTTPRemoteControl.cpp # endif + +# TODO: build qprojectM-jack and projectM-jack as separate programs + bin_PROGRAMS = projectM_jack -projectM_jack_SOURCES = projectM-jack.cpp qprojectM-jack.cpp video_init.cpp ConfigFile.cpp ${EXTRA_SRCS} -projectM_jack_LDADD = -projectM_jack_LDADD += ${jack_LIBS} ${qt_LDFLAGS} ../libprojectM/libprojectM.la -projectM_jack_LDFLAGS = -static +projectM_jack_SOURCES = qprojectM-jack.cpp ConfigFile.cpp ${EXTRA_SRCS} +projectM_jack_LDADD = \ + ../projectM-qt/libprojectM_qt.a \ + ${jack_LIBS} \ + ${qt_LIBS} \ + ../libprojectM/libprojectM.la \ + -lSDL +projectM_jack_LDFLAGS = -static -fPIC ${qt_LDFLAGS} projectM_jack_PROGRAM = projectM-jack dist_man_MANS = projectM-jack.1 From c8b6eebf61c2321e66f67cf98a5bd0a3afb4e979 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 22:25:09 +0200 Subject: [PATCH 18/23] testqt --- configure.ac | 21 +++------------------ src/projectM-jack/Makefile.am | 1 + 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index 27604cef6b..8cbc21d340 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,9 @@ AS_IF([test "$enable_qt" != "no"], AC_MSG_WARN([Qt utility programs moc, uic, and rcc are required.]) enable_qt=no fi + MOC="$MOC -qt=5" + UIC="$UIC -qt=5" + RCC="$RCC -qt=5" export QT_SELECT=qt5 ], @@ -181,24 +184,6 @@ AS_IF([test "$enable_qt" != "no"], [enable_qt=no])] )]) -AS_IF([test "x$enable_qt" = "xyes"], [ - PKG_CHECK_MODULES(Qt, [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], [], [AC_MSG_ERROR([Qt libraries are required.])]) - qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" - qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" - qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" - - if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then - AC_MSG_ERROR([Qt >= 5.0.0 is required. Try installing qtdeclarative5-dev]) - fi - - AC_CHECK_PROGS(MOC, [moc-qt5 moc]) - AC_CHECK_PROGS(UIC, [uic-qt5 uic]) - AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) - if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then - AC_MSG_ERROR([Qt utility programs moc, uic, and rcc are required.]) - fi -]) - # Pulseaudio AC_ARG_ENABLE([pulseaudio], AS_HELP_STRING([--enable-pulseaudio], [Build Pulseaudio]), [], [enable_pulseaudio=check]) diff --git a/src/projectM-jack/Makefile.am b/src/projectM-jack/Makefile.am index 2f9ef943c1..b37f16c882 100644 --- a/src/projectM-jack/Makefile.am +++ b/src/projectM-jack/Makefile.am @@ -12,6 +12,7 @@ ${qt_CPPFLAGS} \ -fPIC \ ${qt_CFLAGS} +# TODO: add remote control if we have qxt network lib # if QT_NETWORK_ENABLED # EXTRA_SRCS = HTTPRemoteControl.cpp # endif From 55f6a772306ebf411d33c5e8a927cfeaa1f255cb Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 22:51:38 +0200 Subject: [PATCH 19/23] readme --- README.md | 6 +++--- src/projectM-pulseaudio/Makefile.am | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 75c53272f2..61377596c4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/projectM-visualizer/projectm.svg?branch=master)](https://travis-ci.org/projectM-visualizer/projectm) [![Backers on Open Collective](https://opencollective.com/projectm/backers/badge.svg)](#backers) - [![Sponsors on Open Collective](https://opencollective.com/projectm/sponsors/badge.svg)](#sponsors) + [![Sponsors on Open Collective](https://opencollective.com/projectm/sponsors/badge.svg)](#sponsors) ![Logo](https://github.com/projectM-visualizer/projectm/raw/master/web/logo.png) @@ -71,7 +71,7 @@ Silverjuke (FOSS Jukebox) ``` ## Linux (debian/ubuntu) -* `sudo apt-get install autoconf libtool libsdl2-dev libglm-dev` +* `sudo apt install autoconf libtool libsdl2-dev libglm-dev qtdeclarative5-dev libqt5opengl5-dev libjack-dev libpulse-dev libsdl-dev` ## FreeBSD * `pkg install gcc autoconf automake libtool mesa-libs libGLU sdl2 glm` @@ -130,7 +130,7 @@ If you maintain packages of libprojectM, we are happy to work with you! Please n ## Contributors -This project exists thanks to all the people who contribute. +This project exists thanks to all the people who contribute. diff --git a/src/projectM-pulseaudio/Makefile.am b/src/projectM-pulseaudio/Makefile.am index 4c67f4f45d..9205940e25 100644 --- a/src/projectM-pulseaudio/Makefile.am +++ b/src/projectM-pulseaudio/Makefile.am @@ -8,11 +8,10 @@ projectM_pulseaudio_qtheaders = \ nodist_projectM_pulseaudio_moc_sources = $(projectM_pulseaudio_qtheaders:.hpp=_moc.cpp) .hpp_moc.cpp: - @MOC@ -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(MOC_CPPFLAGS)\ - $(qt_CPPFLAGS) $(qt_LDFLAGS) $< + @MOC@ -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(MOC_CPPFLAGS) $< ui_PulseDeviceChooserDialog.h: PulseDeviceChooserDialog.ui - @UIC@ $(qt_CPPFLAGS) -o $@ $< + @UIC@ -o $@ $< AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ From ac0c4b2cfe0b8a4a6066c963ee0fbdfa3d672f77 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 23:01:20 +0200 Subject: [PATCH 20/23] let's always build test --- .travis.yml | 4 ++-- src/Makefile.am | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb1d9ed586..fbbca3cde6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ before_install: # TODO: test different combinations of flags, --enable-sdl, --enable-qt, etc script: - - ./configure $PM_OPTS --prefix=$PWD/local && make -j8 && make install # build from checkout - - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure $PM_OPTS --prefix=$PWD/dist_install && make -j8 && make install # build from dist + - ./configure $PM_OPTS --prefix=$PWD/local && make -j6 && make install # build from checkout + - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure $PM_OPTS --prefix=$PWD/dist_install && make -j6 && make install # build from dist - echo "PWD=$PWD" - ls . # - test -e src/projectM-sdl/projectMSDL diff --git a/src/Makefile.am b/src/Makefile.am index 68f4333d99..cbfd599d76 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ if ENABLE_SDL - PROJECTM_SDL_SUBDIR = projectM-sdl projectM-test + PROJECTM_SDL_SUBDIR = projectM-sdl endif if ENABLE_QT @@ -22,4 +22,4 @@ endif # for compatibility reasons here as nobase_include nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp -SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} +SUBDIRS = libprojectM NativePresets projectM-test ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} From e1df12ffc72040cbef38ad144397b1dad48b3f66 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 23:12:30 +0200 Subject: [PATCH 21/23] let's always build test --- Makefile.am | 3 +++ src/Makefile.am | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 680af54745..3762fa9354 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,9 @@ PRESETSDIR = presets EXTRA_DIST=README.md AUTHORS.txt presets fonts $(PRESETSDIR) CLEANFILES= +# stick apps in bin +# bin_PROGRAMS = $(top_builddir)/bin + # aka /usr/local/share/projectM pm_data_dir = $(pkgdatadir) pm_font_dir = $(pm_data_dir)/fonts diff --git a/src/Makefile.am b/src/Makefile.am index cbfd599d76..6d5e6e797e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ if ENABLE_SDL - PROJECTM_SDL_SUBDIR = projectM-sdl + PROJECTM_SDL_SUBDIR = projectM-test projectM-sdl endif if ENABLE_QT @@ -22,4 +22,4 @@ endif # for compatibility reasons here as nobase_include nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp -SUBDIRS = libprojectM NativePresets projectM-test ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} +SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} From ba99942cc6e9ac58ab5ae85247f0ee69e5ed6e62 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 23:15:49 +0200 Subject: [PATCH 22/23] sdl2 for travis build test --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fbbca3cde6..48839a5334 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ matrix: sources: - llvm-toolchain-trusty-5.0 packages: + - libsdl2-dev - clang-5.0 - libglm-dev - libc++-dev From d861d5964dd80458e21c9b153ad990b1ae25961c Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 9 Feb 2019 23:30:23 +0200 Subject: [PATCH 23/23] qt is required for jack/pulse --- configure.ac | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 8cbc21d340..36000a5bee 100644 --- a/configure.ac +++ b/configure.ac @@ -190,7 +190,12 @@ AC_ARG_ENABLE([pulseaudio], AS_HELP_STRING([--enable-pulseaudio], [Build Pulseau AS_IF([test "$enable_pulseaudio" != "no"], [PKG_CHECK_MODULES([libpulse], [libpulse], - [enable_pulseaudio=yes], + [ + # still need qt + AS_IF([test "$enable_qt" = "yes"], + [enable_pulseaudio=yes], + [enable_pulseaudio="Qt required"]) + ], [AS_IF([test "$enable_pulseaudio" = "yes"], [AC_MSG_ERROR([libpulse required, but not found.])], [enable_pulseaudio=no])])]) @@ -201,17 +206,22 @@ AC_ARG_ENABLE([jack], AS_HELP_STRING([--enable-jack], [Build Jack]), [], [enable AS_IF([test "$enable_jack" != "no"], [PKG_CHECK_MODULES([jack], [jack], - [enable_jack=yes], + [ + # still need qt + AS_IF([test "$enable_qt" = "yes"], + [enable_jack=yes], + [enable_jack="Qt required"]) + ], [AS_IF([test "$enable_jack" = "yes"], [AC_MSG_ERROR([jack required, but not found.])], [enable_jack=no])])]) -AM_CONDITIONAL([ENABLE_SDL], [test x$enable_sdl = xyes]) -AM_CONDITIONAL([ENABLE_QT], [test x$enable_qt = xyes]) -AM_CONDITIONAL([ENABLE_JACK], [test x$enable_jack = xyes]) -AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x$enable_pulseaudio = xyes]) -AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test x$enable_emscripten = xyes]) +AM_CONDITIONAL([ENABLE_SDL], [test "x$enable_sdl" = "xyes"]) +AM_CONDITIONAL([ENABLE_QT], [test "x$enable_qt" = "xyes"]) +AM_CONDITIONAL([ENABLE_JACK], [test "x$enable_jack" = "xyes"]) +AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test "x$enable_pulseaudio" = "xyes"]) +AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test "x$enable_emscripten" = "xyes"]) my_CFLAGS="-Wall -Wchar-subscripts -Wformat-security -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits "