Modify VST build systems to make debian integration work correctly

This commit is contained in:
Hyunjin Song
2019-03-11 16:20:42 +09:00
parent 8c4514ff20
commit ae4e40de97
8 changed files with 35 additions and 18 deletions

View File

@@ -67,7 +67,8 @@ OPTION(WANT_STK "Include Stk (Synthesis Toolkit) support" ON)
OPTION(WANT_SWH "Include Steve Harris's LADSPA plugins" ON)
OPTION(WANT_TAP "Include Tom's Audio Processing LADSPA plugins" ON)
OPTION(WANT_VST "Include VST support" ON)
OPTION(WANT_VST_NOWINE "Include partial VST support (without wine)" OFF)
OPTION(WANT_VST_32 "Include 32-bit VST support" ON)
OPTION(WANT_VST_64 "Include 64-bit VST support" ON)
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
OPTION(WANT_DEBUG_FPE "Debug floating point exceptions" OFF)

View File

@@ -45,6 +45,9 @@ fi
# by FindWine.cmake
extra_args="-I@WINE_INCLUDE_DIR@ -I@WINE_INCLUDE_DIR@/wine/windows"
# Apply manually specified flags
extra_args="$extra_args @WINE_CXX_FLAGS@"
# Apply -m32 library fix if necessary
if [ "$win32" = true ] && [ "$no_link" != true ]; then
extra_args="$extra_args @WINE_32_FLAGS@"

8
debian/control vendored
View File

@@ -45,7 +45,8 @@ Architecture: any
Depends: lmms-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends},
stk
Recommends: tap-plugins, caps,
lmms-vst-server:i386 (>= ${source:Version})
lmms-vst-server:i386 (>= ${source:Version}),
lmms-vst-server:amd64 (>= ${source:Version})
Suggests: fil-plugins, mcp-plugins, omins, freepats, fluid-soundfont-gm,
ladspa-plugin
Replaces: lmms-common (<< 1.0.0-1)
@@ -99,9 +100,8 @@ Description: Linux Multimedia Studio - common files
and some example projects.
Package: lmms-vst-server
Architecture: i386
# Order matters to avoid wine64
Depends: wine32, wine, ${shlibs:Depends}, ${misc:Depends}
Architecture: amd64 i386
Depends: wine64 [amd64] | wine64-development [amd64] | wine32 [i386] | wine32-development [i386], ${shlibs:Depends}, ${misc:Depends}
Recommends: lmms-bin:any
Description: Linux Multimedia Studio - VST server
This package contains a helper application that loads VST plugins.

View File

@@ -1 +1 @@
usr/lib/*/lmms/RemoteVstPlugin*
usr/lib/*/lmms/{32/,}RemoteVstPlugin*

14
debian/rules vendored
View File

@@ -6,6 +6,7 @@ DH_CMAKE_BUILD_DIR=obj -${DEB_BUILD_GNU_TYPE}
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_ARCH_BIT ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
CMAKE_OPTS= -DCONTRIBUTORS=$(CURDIR)/doc/CONTRIBUTORS -DFORCE_VERSION=internal \
-DWANT_QT5=1
@@ -13,13 +14,18 @@ ifneq ($(DEB_HOST_ARCH_OS),linux)
CMAKE_OPTS+= -DWANT_ALSA=0
endif
ifeq ($(DEB_HOST_ARCH),i386)
ifeq ($(DEB_HOST_ARCH),amd64)
export PATH := $(PATH):/usr/lib/wine
WINE_PATH := /usr/lib/$(DEB_HOST_MULTIARCH)/wine
CMAKE_OPTS+= -DWINE_CXX_FLAGS=-Wl,--enable-new-dtags,-rpath=$(WINE_PATH)
CMAKE_OPTS+= -DWANT_VST_32=OFF -DREMOTE_VST_PLUGIN_FILEPATH_32=../../i386-linux-gnu/lmms/32/RemoteVstPlugin32 \
-DWINE_CXX_FLAGS=-Wl,--enable-new-dtags,-rpath=$(WINE_PATH)
else ifeq ($(DEB_HOST_ARCH),i386)
export PATH := $(PATH):/usr/lib/wine
WINE_PATH := /usr/lib/$(DEB_HOST_MULTIARCH)/wine
CMAKE_OPTS+= -DWANT_VST_64=OFF -DREMOTE_VST_PLUGIN_FILEPATH_64=../../x86_64-linux-gnu/lmms/RemoteVstPlugin64 \
-DWINE_CXX_FLAGS=-Wl,--enable-new-dtags,-rpath=$(WINE_PATH)
else
CMAKE_OPTS+= -DWANT_VST_NOWINE=1 \
-DREMOTE_VST_PLUGIN_FILEPATH=../../i386-linux-gnu/lmms/RemoteVstPlugin
CMAKE_OPTS+= -DWANT_VST=OFF
endif
# Define NDEBUG. This helps with reproducible builds.

View File

@@ -5,11 +5,11 @@ ENDIF()
INCLUDE(BuildPlugin)
INCLUDE(ExternalProject)
ADD_SUBDIRECTORY(vstbase)
# These variables are not meant to be used normally, except packaging
SET(REMOTE_VST_PLUGIN_FILEPATH_32 "32/RemoteVstPlugin32" CACHE STRING "Relative file path to RemoteVstPlugin32")
SET(REMOTE_VST_PLUGIN_FILEPATH_64 "RemoteVstPlugin64" CACHE STRING "Relative file path to RemoteVstPlugin64")
IF(LMMS_BUILD_LINUX AND WANT_VST_NOWINE)
RETURN()
ENDIF()
ADD_SUBDIRECTORY(vstbase)
SET(LMMS_BINARY_DIR ${CMAKE_BINARY_DIR})
SET(LMMS_SOURCE_DIR ${CMAKE_SOURCE_DIR})
@@ -29,6 +29,10 @@ SET(EXTERNALPROJECT_CMAKE_ARGS
)
# build 32 bit version of RemoteVstPlugin
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin32.cmake")
IF(WANT_VST_32)
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin32.cmake")
ENDIF()
# build 64 bit version of RemoteVstPlugin
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin64.cmake")
IF(WANT_VST_64)
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin64.cmake")
ENDIF()

View File

@@ -149,10 +149,10 @@ VstPlugin::VstPlugin( const QString & _plugin ) :
switch(machineType)
{
case PE::MachineType::amd64:
tryLoad( "RemoteVstPlugin64" );
tryLoad( REMOTE_VST_PLUGIN_FILEPATH_64 ); // Default: RemoteVstPlugin64
break;
case PE::MachineType::i386:
tryLoad( "32/RemoteVstPlugin32" );
tryLoad( REMOTE_VST_PLUGIN_FILEPATH_32 ); // Default: 32/RemoteVstPlugin32
break;
default:
m_failed = true;

View File

@@ -1,3 +1,6 @@
ADD_DEFINITIONS(-DREMOTE_VST_PLUGIN_FILEPATH_32="${REMOTE_VST_PLUGIN_FILEPATH_32}")
ADD_DEFINITIONS(-DREMOTE_VST_PLUGIN_FILEPATH_64="${REMOTE_VST_PLUGIN_FILEPATH_64}")
BUILD_PLUGIN(vstbase
../vst_base.cpp ../VstPlugin.cpp ../VstPlugin.h ../communication.h
MOCFILES ../VstPlugin.h