Switch to Xenial build environment (#4813)
* Switch to Xenial build environment * Add Carla submodule/weak linking support, related #3963 * Fix Carla detection in AppImage, closes #5369
This commit is contained in:
committed by
Tres Finocchiaro
parent
c52682dfb1
commit
fd77c79cda
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -4,3 +4,6 @@
|
||||
[submodule "src/3rdparty/rpmalloc/rpmalloc"]
|
||||
path = src/3rdparty/rpmalloc/rpmalloc
|
||||
url = https://github.com/rampantpixels/rpmalloc.git
|
||||
[submodule "plugins/carlabase/carla"]
|
||||
path = plugins/carlabase/carla
|
||||
url = https://github.com/falktx/carla
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: trusty
|
||||
dist: xenial
|
||||
sudo: required
|
||||
cache:
|
||||
directories:
|
||||
@@ -10,13 +10,17 @@ cache:
|
||||
matrix:
|
||||
include:
|
||||
- env: TARGET_OS=win32
|
||||
dist: trusty
|
||||
- env: TARGET_OS=win64
|
||||
dist: trusty
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
- env: QT5=
|
||||
- env: QT5=True
|
||||
- env: QT5=True TARGET_OS=win32 TARGET_DEPLOY=True
|
||||
dist: trusty
|
||||
- env: QT5=True TARGET_OS=win64 TARGET_DEPLOY=True
|
||||
dist: trusty
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
env: QT5=True
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo add-apt-repository ppa:beineri/opt-qt592-trusty -y
|
||||
sudo add-apt-repository ppa:andrewrk/libgroove -y
|
||||
sudo sed -e "s/trusty/precise/" -i \
|
||||
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list
|
||||
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -qq || true
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libmp3lame-dev
|
||||
libasound2-dev libjack-jackd2-dev libsdl-dev libsamplerate0-dev libstk0-dev stk
|
||||
libfluidsynth-dev portaudio19-dev g++-multilib libfltk1.3-dev
|
||||
libfluidsynth-dev portaudio19-dev g++-multilib libfltk1.3-dev fluid
|
||||
libgig-dev libsoundio-dev"
|
||||
|
||||
VST_PACKAGES="wine-dev libqt5x11extras5-dev qtbase5-private-dev libxcb-util0-dev libxcb-keysyms1-dev"
|
||||
@@ -11,15 +11,9 @@ VST_PACKAGES="wine-dev libqt5x11extras5-dev qtbase5-private-dev libxcb-util0-dev
|
||||
PACKAGES="$PACKAGES $VST_PACKAGES libjack-jackd2-0"
|
||||
|
||||
if [ $QT5 ]; then
|
||||
PACKAGES="$PACKAGES qt59base qt59translations qt59tools"
|
||||
PACKAGES="$PACKAGES qttools5-dev-tools"
|
||||
else
|
||||
PACKAGES="$PACKAGES libqt4-dev"
|
||||
fi
|
||||
|
||||
sudo apt-get install -y $PACKAGES
|
||||
|
||||
# kxstudio repo offers Carla; avoid package conflicts (wine, etc) by running last
|
||||
sudo add-apt-repository -y ppa:kxstudio-debian/libs
|
||||
sudo add-apt-repository -y ppa:kxstudio-debian/apps
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y carla
|
||||
|
||||
@@ -241,7 +241,8 @@ IF(WANT_CARLA)
|
||||
SET(LMMS_HAVE_CARLA TRUE)
|
||||
SET(STATUS_CARLA "OK")
|
||||
ELSE(CARLA_FOUND)
|
||||
SET(STATUS_CARLA "not found, please install the latest carla")
|
||||
SET(LMMS_HAVE_WEAKCARLA TRUE)
|
||||
SET(STATUS_CARLA "OK (weak linking enabled)")
|
||||
ENDIF(CARLA_FOUND)
|
||||
ENDIF(WANT_CARLA)
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
alias standard_which="command -v"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export PATH="$PATH:/sbin"
|
||||
if standard_which carla > /dev/null 2>&1; then
|
||||
CARLAPATH="$(standard_which carla)"
|
||||
if command -v carla > /dev/null 2>&1; then
|
||||
CARLAPATH="$(command -v carla)"
|
||||
CARLAPREFIX="${CARLAPATH%/bin*}"
|
||||
echo "Carla appears to be installed on this system at $CARLAPREFIX/lib[64]/carla so we'll use it."
|
||||
export LD_LIBRARY_PATH=$CARLAPREFIX/lib/carla:$CARLAPREFIX/lib64/carla:$LD_LIBRARY_PATH
|
||||
@@ -22,4 +21,4 @@ else
|
||||
echo "Jack does not appear to be installed. That's OK, we'll use a dummy version instead."
|
||||
export LD_LIBRARY_PATH=$DIR/usr/lib/lmms/optional:$LD_LIBRARY_PATH
|
||||
fi
|
||||
QT_X11_NO_NATIVE_MENUBAR=1 "$DIR"/usr/bin/lmms.real "$@"
|
||||
QT_X11_NO_NATIVE_MENUBAR=1 "$DIR"/usr/bin/lmms.real "$@"
|
||||
|
||||
@@ -105,7 +105,7 @@ chmod +x "${APPDIR}usr/bin/lmms"
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
# Ensure linuxdeployqt can find shared objects
|
||||
export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":"${APPDIR}usr/lib/lmms/optional":$LD_LIBRARY_PATH
|
||||
|
||||
# Handle wine linking
|
||||
if [ -d "@WINE_LIBRARY_FIX@" ]; then
|
||||
@@ -120,7 +120,7 @@ ZYNBIN="${APPDIR}usr/bin/RemoteZynAddSubFx"
|
||||
VSTBIN="${APPDIR}usr/bin/RemoteVstPlugin.exe.so"
|
||||
|
||||
mv "$ZYNLIB" "$ZYNBIN"
|
||||
mv "$VSTLIB" "$VSTBIN"
|
||||
mv "$VSTLIB" "$VSTBIN" || true
|
||||
|
||||
# Patch the desktop file
|
||||
sed -i 's/.*Exec=.*/Exec=lmms.real/' "$DESKTOPFILE"
|
||||
@@ -146,13 +146,14 @@ success "Bundled and relinked dependencies"
|
||||
|
||||
# Link to original location so lmms can find them
|
||||
ln -sr "$ZYNBIN" "$ZYNLIB"
|
||||
ln -sr "$VSTBIN" "$VSTLIB"
|
||||
ln -sr "$VSTBIN" "$VSTLIB" || true
|
||||
|
||||
# Remove wine library conflict
|
||||
rm -f "${APPDIR}/usr/lib/libwine.so.1"
|
||||
|
||||
# Use system-provided carla
|
||||
rm -f "${APPDIR}usr/lib/"libcarla*.so
|
||||
rm -f "${APPDIR}usr/lib/lmms/optional/"libcarla*.so
|
||||
|
||||
# Remove bundled jack in LD_LIBRARY_PATH if exists
|
||||
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
|
||||
|
||||
@@ -70,7 +70,11 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} lmms)
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
|
||||
INSTALL(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION "${PLUGIN_DIR}")
|
||||
IF(LMMS_BUILD_WIN32 AND "${PLUGIN_LINK}" STREQUAL "SHARED")
|
||||
INSTALL(TARGETS ${PLUGIN_NAME} RUNTIME DESTINATION "${PLUGIN_DIR}")
|
||||
ELSE()
|
||||
INSTALL(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION "${PLUGIN_DIR}")
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
IF ("${PLUGIN_LINK}" STREQUAL "SHARED")
|
||||
|
||||
@@ -6,7 +6,29 @@ IF(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
||||
CMAKE_POLICY(SET CMP0068 OLD)
|
||||
ENDIF()
|
||||
|
||||
if(LMMS_HAVE_CARLA)
|
||||
# If Carla was not provided by the system, make a dummy library instead
|
||||
if(LMMS_HAVE_WEAKCARLA)
|
||||
# Mimic the Makefile header
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h "")
|
||||
SET(CARLA_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/carla/source
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/carla/source/includes
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/carla/source/utils
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/carla/source/backend
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS})
|
||||
ADD_LIBRARY(carla_native-plugin MODULE DummyCarla.cpp)
|
||||
INSTALL(TARGETS carla_native-plugin LIBRARY DESTINATION "${PLUGIN_DIR}/optional")
|
||||
SET(CARLA_LIBRARIES $<TARGET_FILE:carla_native-plugin>)
|
||||
SET(CARLA_LIBRARY_DIRS $<TARGET_FILE_DIR:carla_native-plugin>)
|
||||
# Set parent scope variables so carlarack and carlapatchbay can see them
|
||||
SET(CARLA_LIBRARIES ${CARLA_LIBRARIES} PARENT_SCOPE)
|
||||
SET(CARLA_INCLUDE_DIRS ${CARLA_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
SET(CARLA_LIBRARY_DIRS ${CARLA_LIBRARY_DIRS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS})
|
||||
@@ -17,4 +39,7 @@ if(LMMS_HAVE_CARLA)
|
||||
BUILD_WITH_INSTALL_RPATH TRUE
|
||||
INSTALL_RPATH_USE_LINK_PATH TRUE
|
||||
INSTALL_RPATH "${CARLA_RPATH}")
|
||||
endif(LMMS_HAVE_CARLA)
|
||||
IF(LMMS_HAVE_WEAKCARLA)
|
||||
ADD_DEPENDENCIES(carlabase carla_native-plugin)
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
12
plugins/carlabase/DummyCarla.cpp
Normal file
12
plugins/carlabase/DummyCarla.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
// A dummy Carla interface
|
||||
#include "CarlaNativePlugin.h"
|
||||
|
||||
const char* carla_get_library_filename() { return nullptr; }
|
||||
const char* carla_get_library_folder() { return nullptr; }
|
||||
const NativePluginDescriptor* carla_get_native_rack_plugin() { return nullptr; }
|
||||
const NativePluginDescriptor* carla_get_native_patchbay_plugin() { return nullptr; }
|
||||
const NativePluginDescriptor* carla_get_native_patchbay16_plugin() { return nullptr; }
|
||||
const NativePluginDescriptor* carla_get_native_patchbay32_plugin() { return nullptr; }
|
||||
const NativePluginDescriptor* carla_get_native_patchbay64_plugin() { return nullptr; }
|
||||
const NativePluginDescriptor* carla_get_native_patchbay_cv_plugin() { return nullptr; }
|
||||
CarlaBackend::CarlaEngine* carla_get_native_plugin_engine(const NativePluginDescriptor* desc, NativePluginHandle handle) { return nullptr; }
|
||||
1
plugins/carlabase/carla
Submodule
1
plugins/carlabase/carla
Submodule
Submodule plugins/carlabase/carla added at 4ac8ff2ef4
@@ -438,7 +438,8 @@ PluginView* CarlaInstrument::instantiateView(QWidget* parent)
|
||||
// Disable plugin focus per https://bugreports.qt.io/browse/QTBUG-30181
|
||||
#ifndef CARLA_OS_MAC
|
||||
if (QWidget* const window = parent->window())
|
||||
fHost.uiParentId = window->winId();
|
||||
// TODO: Remove cast; Only needed for Qt4
|
||||
fHost.uiParentId = (uintptr_t)window->winId();
|
||||
else
|
||||
#endif
|
||||
fHost.uiParentId = 0;
|
||||
|
||||
BIN
plugins/carlabase/logo.png
Normal file
BIN
plugins/carlabase/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -1,4 +1,4 @@
|
||||
if(LMMS_HAVE_CARLA)
|
||||
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
|
||||
ADD_DEFINITIONS(-DCARLA_PLUGIN_PATCHBAY -DCARLA_PLUGIN_SYNTH)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../carlabase")
|
||||
@@ -6,4 +6,4 @@ if(LMMS_HAVE_CARLA)
|
||||
${CARLA_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(carlabase)
|
||||
BUILD_PLUGIN(carlapatchbay carlapatchbay.cpp EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
endif(LMMS_HAVE_CARLA)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if(LMMS_HAVE_CARLA)
|
||||
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
|
||||
ADD_DEFINITIONS(-DCARLA_PLUGIN_RACK -DCARLA_PLUGIN_SYNTH)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../carlabase")
|
||||
@@ -6,4 +6,4 @@ if(LMMS_HAVE_CARLA)
|
||||
${CARLA_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(carlabase)
|
||||
BUILD_PLUGIN(carlarack carlarack.cpp EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
endif(LMMS_HAVE_CARLA)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user