From 38bcc73f1c7a8af5f977cb2b611de8765c56d66f Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 30 Oct 2015 22:20:59 +0100 Subject: [PATCH 1/5] Revert "Find relative LADSPA plugins when running from build" This reverts commit 37a2252236d3e02e64a491ec085c0bcbbcb92151. --- src/core/ConfigManager.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 73db610bb..692489bf3 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -77,17 +77,10 @@ ConfigManager::ConfigManager() : QString line = stream.readLine(); if (line.startsWith("lmms_SOURCE_DIR:")) { - // Current source directory contains respective data directory QString srcDir = line.section('=', -1).trimmed(); QDir::addSearchPath("data", srcDir + "/data/"); + break; } - if (line.startsWith("lmms_BINARY_DIR:")) { - // Current build directory contains respective LADSPA plugins - QString binDir = line.section('=', -1).trimmed(); - m_ladDir = binDir + "/plugins/ladspa/"; - m_ladDir += "," + userLadspaDir(); - } - } cmakeCache.close(); From a54e55b2779ae8853b83bd1d9c28cb9798bb3611 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 30 Oct 2015 22:22:05 +0100 Subject: [PATCH 2/5] Revert "Fixes the build location of the LADSPA effect plugin" This reverts commit 119ff99f27e240744d4f651024e907bbce744a78. --- plugins/LadspaEffect/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/LadspaEffect/CMakeLists.txt b/plugins/LadspaEffect/CMakeLists.txt index 80802ec35..37a32ff24 100644 --- a/plugins/LadspaEffect/CMakeLists.txt +++ b/plugins/LadspaEffect/CMakeLists.txt @@ -1,3 +1,5 @@ +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") + IF(WANT_CAPS) ADD_SUBDIRECTORY(caps) ENDIF(WANT_CAPS) From 81a2fe5e69b712f36f39aafefdb7aabad89031f3 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 30 Oct 2015 22:22:22 +0100 Subject: [PATCH 3/5] Revert "Reinstates the build of the LADSPA plugins in the ladspa directory" This reverts commit ff6cbf90a35c28b9cfb1cf80f7d233fd1baa7646. --- plugins/LadspaEffect/calf/CMakeLists.txt | 2 -- plugins/LadspaEffect/caps/CMakeLists.txt | 2 -- plugins/LadspaEffect/cmt/CMakeLists.txt | 2 -- plugins/LadspaEffect/swh/CMakeLists.txt | 2 -- plugins/LadspaEffect/tap/CMakeLists.txt | 2 -- 5 files changed, 10 deletions(-) diff --git a/plugins/LadspaEffect/calf/CMakeLists.txt b/plugins/LadspaEffect/calf/CMakeLists.txt index 06cd10f83..3bd4ae0f8 100644 --- a/plugins/LadspaEffect/calf/CMakeLists.txt +++ b/plugins/LadspaEffect/calf/CMakeLists.txt @@ -1,5 +1,3 @@ -SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") - FILE(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") ADD_LIBRARY(calf MODULE ${SOURCES}) INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include" diff --git a/plugins/LadspaEffect/caps/CMakeLists.txt b/plugins/LadspaEffect/caps/CMakeLists.txt index f8ee888e9..cb4ce1a00 100644 --- a/plugins/LadspaEffect/caps/CMakeLists.txt +++ b/plugins/LadspaEffect/caps/CMakeLists.txt @@ -1,5 +1,3 @@ -SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") - INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") FILE(GLOB SOURCES *.cc) ADD_LIBRARY(caps MODULE ${SOURCES}) diff --git a/plugins/LadspaEffect/cmt/CMakeLists.txt b/plugins/LadspaEffect/cmt/CMakeLists.txt index 215761638..81bb13dc2 100644 --- a/plugins/LadspaEffect/cmt/CMakeLists.txt +++ b/plugins/LadspaEffect/cmt/CMakeLists.txt @@ -1,5 +1,3 @@ -SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") - INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") FILE(GLOB_RECURSE SOURCES src/*.cpp) ADD_LIBRARY(cmt MODULE ${SOURCES}) diff --git a/plugins/LadspaEffect/swh/CMakeLists.txt b/plugins/LadspaEffect/swh/CMakeLists.txt index c5699525c..e140b1793 100644 --- a/plugins/LadspaEffect/swh/CMakeLists.txt +++ b/plugins/LadspaEffect/swh/CMakeLists.txt @@ -1,5 +1,3 @@ -SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") - ADD_DEFINITIONS(-DFFTW3) INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/plugins/LadspaEffect/tap/CMakeLists.txt b/plugins/LadspaEffect/tap/CMakeLists.txt index 71dc668ef..499dbf046 100644 --- a/plugins/LadspaEffect/tap/CMakeLists.txt +++ b/plugins/LadspaEffect/tap/CMakeLists.txt @@ -1,5 +1,3 @@ -SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") - INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") FILE(GLOB PLUGIN_SOURCES *.c) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings -fomit-frame-pointer -fno-strict-aliasing -fstrength-reduce -funroll-loops -ffast-math") From 45cafd3f601b08c7cf675394f78351d65d342b4c Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 30 Oct 2015 22:53:28 +0100 Subject: [PATCH 4/5] Fix ladspa plugin discovery --- plugins/LadspaEffect/CMakeLists.txt | 11 ++++------- src/core/ConfigManager.cpp | 11 ++--------- src/core/LadspaManager.cpp | 5 ++++- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/plugins/LadspaEffect/CMakeLists.txt b/plugins/LadspaEffect/CMakeLists.txt index 37a32ff24..07d4cb0aa 100644 --- a/plugins/LadspaEffect/CMakeLists.txt +++ b/plugins/LadspaEffect/CMakeLists.txt @@ -1,3 +1,7 @@ +INCLUDE(BuildPlugin) + +BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") IF(WANT_CAPS) @@ -19,10 +23,3 @@ ENDIF(WANT_CMT) IF(WANT_CALF) ADD_SUBDIRECTORY(calf) ENDIF(WANT_CALF) - - -INCLUDE(BuildPlugin) - -BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") - - diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 692489bf3..374659102 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -448,15 +448,8 @@ void ConfigManager::loadConfigFile() if( m_ladDir.isEmpty() ) { -#if defined(LMMS_BUILD_WIN32) - m_ladDir = qApp->applicationDirPath() + "/plugins/ladspa" + QDir::separator(); -#elif defined(LMMS_BUILD_APPLE) - m_ladDir = qApp->applicationDirPath() + "/../lib/lmms/ladspa/"; -#else - m_ladDir = qApp->applicationDirPath() + '/' + LIB_DIR + "/lmms/ladspa/"; -#endif - m_ladDir = QDir::cleanPath( m_ladDir ); - m_ladDir += ","+userLadspaDir(); + m_ladDir = "plugins:ladspa/"; + m_ladDir = ","+userLadspaDir(); } #ifdef LMMS_HAVE_STK diff --git a/src/core/LadspaManager.cpp b/src/core/LadspaManager.cpp index a397efc86..f21c00e47 100644 --- a/src/core/LadspaManager.cpp +++ b/src/core/LadspaManager.cpp @@ -34,16 +34,19 @@ #include "ConfigManager.h" #include "LadspaManager.h" +#include "PluginFactory.h" LadspaManager::LadspaManager() { + // Make sure plugin search paths are set up + PluginFactory::instance(); + QStringList ladspaDirectories = QString( getenv( "LADSPA_PATH" ) ). split( LADSPA_PATH_SEPERATOR ); ladspaDirectories += ConfigManager::inst()->ladspaDir().split( ',' ); - ladspaDirectories.push_back( "plugins:ladspa" ); #ifndef LMMS_BUILD_WIN32 ladspaDirectories.push_back( qApp->applicationDirPath() + '/' + LIB_DIR + "ladspa" ); ladspaDirectories.push_back( "/usr/lib/ladspa" ); From 8b65ae37b4c9b9b9286b180b1b1b31f5d7ba44d4 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Tue, 3 Nov 2015 20:43:01 +0100 Subject: [PATCH 5/5] ConfigManager: Move plugin:ladspa init to LadspaManager --- src/core/ConfigManager.cpp | 3 +-- src/core/LadspaManager.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 374659102..114a12202 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -448,8 +448,7 @@ void ConfigManager::loadConfigFile() if( m_ladDir.isEmpty() ) { - m_ladDir = "plugins:ladspa/"; - m_ladDir = ","+userLadspaDir(); + m_ladDir = userLadspaDir(); } #ifdef LMMS_HAVE_STK diff --git a/src/core/LadspaManager.cpp b/src/core/LadspaManager.cpp index f21c00e47..cd3fee9ac 100644 --- a/src/core/LadspaManager.cpp +++ b/src/core/LadspaManager.cpp @@ -47,6 +47,7 @@ LadspaManager::LadspaManager() split( LADSPA_PATH_SEPERATOR ); ladspaDirectories += ConfigManager::inst()->ladspaDir().split( ',' ); + ladspaDirectories.push_back( "plugins:ladspa" ); #ifndef LMMS_BUILD_WIN32 ladspaDirectories.push_back( qApp->applicationDirPath() + '/' + LIB_DIR + "ladspa" ); ladspaDirectories.push_back( "/usr/lib/ladspa" );