Skip to content

Commit

Permalink
Install qt5 soundsources to a different folder to avoid crashes, fixe…
Browse files Browse the repository at this point in the history
…s lp1774639
  • Loading branch information
daschuer committed Jun 1, 2018
1 parent 7586b02 commit a489e77
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
19 changes: 14 additions & 5 deletions src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,14 @@ if build.platform_is_linux or build.platform_is_bsd:
os.path.join(unix_lib_path, 'mixxx', 'plugins', 'vamp'),
libmixxxminimal_vamp_plugin)

soundsource_plugins = env.Install(
os.path.join(unix_lib_path, 'mixxx', 'plugins', 'soundsource'),
soundsource_plugin_files)
if qt5:
soundsource_plugins = env.Install(
os.path.join(unix_lib_path, 'mixxx', 'plugins', 'soundsourceqt5'),
soundsource_plugin_files)
else:
soundsource_plugins = env.Install(
os.path.join(unix_lib_path, 'mixxx', 'plugins', 'soundsource'),
soundsource_plugin_files)
controllermappings = env.Install(os.path.join(unix_share_path, 'mixxx', 'controllers'), controllermappings_files)
translations = env.Install(os.path.join(unix_share_path, 'mixxx', 'translations'), translation_files)
keyboardmappings = env.Install(os.path.join(unix_share_path, 'mixxx', 'keyboard'), keyboardmappings_files)
Expand Down Expand Up @@ -554,8 +559,12 @@ if build.platform_is_windows:
docs = env.Install(os.path.join(base_dist_dir, "doc/"), docs_files)
#icon = env.Install(base_dist_dir+"", icon_files)
dlls = env.Install(base_dist_dir+"/", dll_files)
soundsource_plugins = env.Install(os.path.join(base_dist_dir, "plugins", "soundsource/"),
soundsource_plugin_files)
if qt5:
soundsource_plugins = env.Install(os.path.join(base_dist_dir, "plugins", "soundsourceqt5/"),
soundsource_plugin_files)
else:
soundsource_plugins = env.Install(os.path.join(base_dist_dir, "plugins", "soundsource/"),
soundsource_plugin_files)
vamp_plugins = env.Install(os.path.join(base_dist_dir, "plugins", "vamp/"),
libmixxxminimal_vamp_plugin)
binary = env.Install(base_dist_dir+"/", binary_files)
Expand Down
15 changes: 11 additions & 4 deletions src/sources/soundsourceproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ const QStringList SOUND_SOURCE_PLUGIN_FILENAME_PATTERN; // empty
#endif

QList<QDir> getSoundSourcePluginDirectories() {

#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QString soundsourceDir = "soundsourceqt5";
#else
QString soundsourceDir = "soundsource";
#endif

QList<QDir> pluginDirs;

const QString& pluginPath = CmdlineArgs::Instance().getPluginPath();
Expand All @@ -68,12 +75,12 @@ QList<QDir> getSoundSourcePluginDirectories() {
// 'bin' folder of $PREFIX, so we just traverse
// ../lib/mixxx/plugins/soundsource.
QDir libPluginDir(UNIX_LIB_PATH);
if (libPluginDir.cd("plugins") && libPluginDir.cd("soundsource")) {
if (libPluginDir.cd("plugins") && libPluginDir.cd(soundsourceDir)) {
pluginDirs << libPluginDir;
}

QDir dataPluginDir(dataLocation);
if (dataPluginDir.cd("plugins") && dataPluginDir.cd("soundsource")) {
if (dataPluginDir.cd("plugins") && dataPluginDir.cd(soundsourceDir)) {
pluginDirs << dataPluginDir;
}

Expand All @@ -88,7 +95,7 @@ QList<QDir> getSoundSourcePluginDirectories() {
}
#elif __WINDOWS__
QDir appPluginDir(applicationPath);
if (appPluginDir.cd("plugins") && appPluginDir.cd("soundsource")) {
if (appPluginDir.cd("plugins") && appPluginDir.cd(soundsourceDir)) {
pluginDirs << appPluginDir;
}
#elif __APPLE__
Expand All @@ -112,7 +119,7 @@ QList<QDir> getSoundSourcePluginDirectories() {
}

QDir dataPluginDir(dataLocation);
if (dataPluginDir.cd("Plugins") && dataPluginDir.cd("soundsource")) {
if (dataPluginDir.cd("Plugins") && dataPluginDir.cd(soundsourceDir)) {
pluginDirs << dataPluginDir;
}
#endif
Expand Down

0 comments on commit a489e77

Please sign in to comment.