Skip to content

Commit

Permalink
[vst/lv2] Support more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jul 8, 2024
1 parent cbc417d commit e511dbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/plugins/score-plugin-lv2/LV2/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ void LV2::GlobalContext::loadPlugins()
if(parts.size() == 2)
{
QFileInfo libc{parts[1].trimmed()};
if(!libc.isDir())
libc = QFileInfo{libc.absoluteFilePath()};
if(QFileInfo lv2_folder{libc.path() + "/lv2"};
lv2_folder.exists() && lv2_folder.isDir())
{
Expand All @@ -271,6 +273,10 @@ void LV2::GlobalContext::loadPlugins()
qputenv("LV2_PATH", lv2_path.c_str());
break;
}
else
{
qDebug() << lv2_folder << " : no lv2 folder found?";
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/score-plugin-vst/Vst/ApplicationPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void ApplicationPlugin::rescanVSTs(QStringList paths)
// 0. Handle VST_PATH
if(QFileInfo vst_env_path{QString(qgetenv("VST_PATH"))}; vst_env_path.isDir())
{
paths += vst_env_path.canonicalPath();
paths += vst_env_path.absoluteFilePath();
}

// 1. List all plug-ins in new paths
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/score-plugin-vst3/Vst3/ApplicationPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void ApplicationPlugin::rescan()
// VST3_PATH
if(QFileInfo vst_env_path{QString(qgetenv("VST3_PATH"))}; vst_env_path.isDir())
{
paths += vst_env_path.canonicalPath();
paths += vst_env_path.absoluteFilePath();
}
rescan(paths);
}
Expand Down

0 comments on commit e511dbf

Please sign in to comment.