Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 7 additions & 0 deletions .travis/linux..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ else
fi

sudo apt-get install -y $PACKAGES

# Carla depends on kxstudio which creates some package conflicts (wine, etc) if
# run too early in the dependency process.
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-git
5 changes: 4 additions & 1 deletion cmake/linux/package_linux.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ mv "${APPDIR}usr/bin/lmms" "${APPDIR}usr/bin/lmms.real"
cat >"${APPDIR}usr/bin/lmms" <<EOL
#!/usr/bin/env bash
DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
export LD_LIBRARY_PATH=\$DIR/usr/lib/:\$DIR/usr/lib/lmms:\$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=\$DIR/usr/lib/:\$DIR/usr/lib/lmms:/usr/lib/carla/:/usr/lib64/carla/:\$LD_LIBRARY_PATH
# Prevent segfault on VirualBox
if lsmod |grep vboxguest > /dev/null 2>&1; then
echo "VirtualBox detected. Forcing libgl software rendering."
Expand Down Expand Up @@ -170,6 +170,9 @@ ln -sr "$VSTBIN" "$VSTLIB"
# Remove wine library conflict
rm -f "${APPDIR}/usr/lib/libwine.so.1"

# Use system-provided carla
rm -f "${APPDIR}usr/lib/"libcarla*.so

# Remove problematic jack library, replace with weakjack
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
rm -f "${APPDIR}/usr/lib/libjack.so.0"
Expand Down
3 changes: 3 additions & 0 deletions include/AudioWeakJack.def
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ JPFUN(1, const char *, port_type, (const jack_port_t *p), (p), 0)
JPFUN(1, const char **, port_get_connections, (const jack_port_t *p), (p), 0)
JPFUN(1, const char **, port_get_all_connections, (const jack_client_t *c, const jack_port_t *p), (c,p), 0)
JPFUN(1, int, port_set_name, (jack_port_t *p, const char *n), (p,n), -1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
JXFUN(0, int, port_rename, (jack_client_t *c, jack_port_t *p, const char *n), (c,p,n), return jack_port_set_name (p,n);)
#pragma GCC diagnostic pop
JPFUN(1, int, port_get_aliases, (const jack_port_t *port, char* const aliases[2]), (port,aliases), 0)
JPFUN(1, int, port_disconnect, (jack_client_t *c, jack_port_t *p), (c,p), 0)
JPFUN(1, int, connect, (jack_client_t *c, const char *s, const char *d), (c,s,d), -1)
Expand Down
31 changes: 16 additions & 15 deletions plugins/carlabase/carla.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include <QApplication>
#include <QFileDialog>
#include <QFileInfo>
#include <QPushButton>
#include <QTimerEvent>
#include <QVBoxLayout>
Expand Down Expand Up @@ -150,15 +151,22 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D
fHost.uiName = NULL;
fHost.uiParentId = 0;

// figure out prefix from dll filename
// carla/resources contains PyQt scripts required for launch
QString dllName(carla_get_library_filename());

QString resourcesPath = QString();
#if defined(CARLA_OS_LINUX)
fHost.resourceDir = strdup(QString(dllName.split("/lib/carla")[0] + "/share/carla/resources/").toUtf8().constData());
#else
fHost.resourceDir = NULL;
// parse prefix from dll filename
QDir path = QFileInfo(dllName).dir();
path.cdUp();
path.cdUp();
resourcesPath = path.absolutePath() + "/share/carla/resources";
#elif defined(CARLA_OS_MAC)
// assume standard install location
resourcesPath = "/Applications/Carla.app/Contents/MacOS/resources";
#elif defined(CARLA_OS_WIN32) || defined(CARLA_OS_WIN64)
// not yet supported
#endif

fHost.resourceDir = strdup(resourcesPath.toUtf8().constData());
fHost.get_buffer_size = host_get_buffer_size;
fHost.get_sample_rate = host_get_sample_rate;
fHost.is_offline = host_is_offline;
Expand Down Expand Up @@ -252,21 +260,14 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco

switch (opcode)
{
case NATIVE_HOST_OPCODE_NULL:
break;
case NATIVE_HOST_OPCODE_UPDATE_PARAMETER:
case NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM:
case NATIVE_HOST_OPCODE_RELOAD_PARAMETERS:
case NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
case NATIVE_HOST_OPCODE_RELOAD_ALL:
// nothing
break;
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
handleUiClosed();
break;
case NATIVE_HOST_OPCODE_HOST_IDLE:
qApp->processEvents();
break;
default:
break;
}

return ret;
Expand Down