Fix for #42: Make search path for plugins relative

Makes the search path that is compiled into the lmms executable relative.
This commit is contained in:
Lukas W
2014-01-18 20:07:35 +01:00
parent e2575fe0fe
commit 7f602cd6c0
5 changed files with 17 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ configManager::configManager() :
m_pluginDir( qApp->applicationDirPath()
+ QDir::separator() + "plugins" + QDir::separator() ),
#else
m_pluginDir( QString( PLUGIN_DIR ) ),
m_pluginDir( qApp->applicationDirPath() + '/' + PLUGIN_DIR ),
#endif
m_vstDir( m_workingDir + "vst" + QDir::separator() ),
m_flDir( QDir::home().absolutePath() )
@@ -347,7 +347,7 @@ void configManager::loadConfigFile()
#ifdef LMMS_BUILD_WIN32
m_ladDir = m_pluginDir + "ladspa" + QDir::separator();
#else
m_ladDir = QString( LIB_DIR ) + "/ladspa/";
m_ladDir = qApp->applicationDirPath() + '/' + LIB_DIR + "/ladspa/";
#endif
}

View File

@@ -24,6 +24,7 @@
*
*/
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
@@ -44,7 +45,7 @@ ladspaManager::ladspaManager()
ladspaDirectories.push_back( configManager::inst()->pluginDir() + "ladspa" );
#ifndef LMMS_BUILD_WIN32
ladspaDirectories.push_back( QString( LIB_DIR ) + "ladspa" );
ladspaDirectories.push_back( qApp->applicationDirPath() + '/' + LIB_DIR + "ladspa" );
ladspaDirectories.push_back( "/usr/lib/lmms/ladspa" );
ladspaDirectories.push_back( "/usr/local/lib/lmms/ladspa" );
ladspaDirectories.push_back( "/usr/lib/ladspa" );