summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/SConscript6
-rw-r--r--src/soundsourceproxy.cpp32
-rw-r--r--src/vamp/vampanalyser.cpp10
3 files changed, 33 insertions, 15 deletions
diff --git a/plugins/SConscript b/plugins/SConscript
index 3d461a8188..f69081c8d3 100644
--- a/plugins/SConscript
+++ b/plugins/SConscript
@@ -7,19 +7,19 @@ plugins = []
soundsourcem4a = SConscript(
File('soundsourcem4a/SConscript'),
- variant_dir=Dir(build.build_dir + "/m4a"),
+ variant_dir=Dir(build.build_dir),
duplicate=0, exports=['build'])
plugins.extend(soundsourcem4a)
soundsourcewv = SConscript(
File('soundsourcewv/SConscript'),
- variant_dir=Dir(build.build_dir + "/wv"),
+ variant_dir=Dir(build.build_dir),
duplicate=0, exports=['build'])
plugins.extend(soundsourcewv)
soundsourcemediafoundation = SConscript(
File('soundsourcemediafoundation/SConscript'),
- variant_dir=Dir(build.build_dir + "/mediafoundation"),
+ variant_dir=Dir(build.build_dir),
duplicate=0, exports=['build'])
plugins.extend(soundsourcemediafoundation)
diff --git a/src/soundsourceproxy.cpp b/src/soundsourceproxy.cpp
index e7673e3ac8..e3348da491 100644
--- a/src/soundsourceproxy.cpp
+++ b/src/soundsourceproxy.cpp
@@ -98,6 +98,10 @@ void SoundSourceProxy::loadPlugins() {
pluginDirs << QDir(pluginPath);
}
+ const QString dataLocation = QDesktopServices::storageLocation(
+ QDesktopServices::DataLocation);
+ const QString applicationPath = QCoreApplication::applicationDirPath();
+
#ifdef __LINUX__
// TODO(rryan): Why can't we use applicationDirPath() and assume it's in the
// 'bin' folder of $PREFIX, so we just traverse
@@ -107,12 +111,22 @@ void SoundSourceProxy::loadPlugins() {
pluginDirs << libPluginDir;
}
- QDir dataPluginDir(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
+ QDir dataPluginDir(dataLocation);
if (dataPluginDir.cd("plugins") && dataPluginDir.cd("soundsource")) {
pluginDirs << dataPluginDir;
}
+
+ // For people who build from source.
+ QDir developer32Root(applicationPath);
+ if (developer32Root.cd("lin32_build") && developer32Root.cd("plugins")) {
+ pathElements << developer32Root.absolutePath();
+ }
+ QDir developer64Root(applicationPath);
+ if (developer64Root.cd("lin64_build") && developer64Root.cd("plugins")) {
+ pathElements << developer64Root.absolutePath();
+ }
#elif __WINDOWS__
- QDir appPluginDir(QCoreApplication::applicationDirPath());
+ QDir appPluginDir(applicationPath);
if (appPluginDir.cd("plugins") && appPluginDir.cd("soundsource")) {
pluginDirs << appPluginDir;
}
@@ -121,12 +135,22 @@ void SoundSourceProxy::loadPlugins() {
// TODO(XXX): Our SCons bundle target doesn't handle plugin subdirectories
// :( so we can't do:
//blah/Mixxx.app/Contents/PlugIns/soundsource
- QDir bundlePluginDir(QCoreApplication::applicationDirPath());
+ QDir bundlePluginDir(applicationPath);
if (bundlePluginDir.cdUp() && bundlePluginDir.cd("PlugIns")) {
pluginDirs << bundlePluginDir;
}
- QDir dataPluginDir(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
+ // For people who build from source.
+ QDir developer32Root(applicationPath);
+ if (developer32Root.cd("osx32_build") && developer32Root.cd("plugins")) {
+ pluginDirs << developer32Root.absolutePath();
+ }
+ QDir developer64Root(applicationPath);
+ if (developer64Root.cd("osx64_build") && developer64Root.cd("plugins")) {
+ pluginDirs << developer64Root.absolutePath();
+ }
+
+ QDir dataPluginDir(dataLocation);
if (dataPluginDir.cd("Plugins") && dataPluginDir.cd("soundsource")) {
pluginDirs << dataPluginDir;
}
diff --git a/src/vamp/vampanalyser.cpp b/src/vamp/vampanalyser.cpp
index ce8580718c..259200a57a 100644
--- a/src/vamp/vampanalyser.cpp
+++ b/src/vamp/vampanalyser.cpp
@@ -37,20 +37,14 @@ void VampAnalyser::initializePluginPaths() {
QStringList pathElements = vampPath.length() > 0 ? vampPath.split(PATH_SEPARATOR)
: QStringList();
- const QString homeLocation = QDesktopServices::storageLocation(
- QDesktopServices::HomeLocation);
const QString dataLocation = QDesktopServices::storageLocation(
QDesktopServices::DataLocation);
const QString applicationPath = QCoreApplication::applicationDirPath();
#ifdef __WINDOWS__
QDir winVampPath(applicationPath);
- if (winVampPath.cd("plugins")) {
- if (winVampPath.cd("vamp")) {
- pathElements << winVampPath.absolutePath().replace("/","\\");
- } else {
- qDebug() << winVampPath.absolutePath() << "does not exist!";
- }
+ if (winVampPath.cd("plugins") && winVampPath.cd("vamp")) {
+ pathElements << winVampPath.absolutePath().replace("/","\\");
} else {
qDebug() << winVampPath.absolutePath() << "does not exist!";
}