Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Xenial build environment #4813

Merged
merged 13 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: cpp
compiler: gcc
dist: trusty
dist: xenial
sudo: required
cache:
directories:
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions .travis/linux..before_install.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 2 additions & 8 deletions .travis/linux..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
PhysSong marked this conversation as resolved.
Show resolved Hide resolved

VST_PACKAGES="wine-dev libqt5x11extras5-dev qtbase5-private-dev libxcb-util0-dev libxcb-keysyms1-dev"
Expand All @@ -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
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 3 additions & 4 deletions cmake/linux/launch_lmms.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 "$@"
7 changes: 4 additions & 3 deletions cmake/linux/package_linux.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion cmake/modules/BuildPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
29 changes: 27 additions & 2 deletions plugins/carlabase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
tresf marked this conversation as resolved.
Show resolved Hide resolved
)
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})
Expand All @@ -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 changes: 12 additions & 0 deletions plugins/carlabase/DummyCarla.cpp
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions plugins/carlabase/carla
Submodule carla added at 4ac8ff
3 changes: 2 additions & 1 deletion plugins/carlabase/carla.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file added plugins/carlabase/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions plugins/carlapatchbay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
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")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../carlabase"
${CARLA_LIBRARY_DIRS})
LINK_LIBRARIES(carlabase)
BUILD_PLUGIN(carlapatchbay carlapatchbay.cpp EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
endif(LMMS_HAVE_CARLA)
endif()
4 changes: 2 additions & 2 deletions plugins/carlarack/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
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")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../carlabase"
${CARLA_LIBRARY_DIRS})
LINK_LIBRARIES(carlabase)
BUILD_PLUGIN(carlarack carlarack.cpp EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
endif(LMMS_HAVE_CARLA)
endif()