aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 8f16573..19d14b5 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -55,13 +55,16 @@ void qmpPluginManager::scanPlugins(const std::vector<std::string> &pp)
{
QDirIterator *dir;
std::vector<std::string> cpluginpaths(pp);
-#ifdef QMP_BUILD_UNIX_PACKAGE
- dir=new QDirIterator("/usr/lib/qmidiplayer/");
+#ifdef NON_PORTABLE
+#define strify(s) #s
+ QString pdir=QString(strify(INSTALL_PREFIX))+"/lib/qmidiplayer/";
+#undef strify
+ dir=new QDirIterator(pdir);
while(dir->hasNext())
{
dir->next();
if(dir->fileInfo().suffix()=="so")
- cpluginpaths.push_back(std::string("/usr/lib/qmidiplayer/")+dir->fileName().toStdString());
+ cpluginpaths.push_back((pdir+dir->fileName()).toStdString());
}
delete dir;
#endif