mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Fixed a bug in scanning exporter module paths when there are no compatible exporters on the current OS
This commit is contained in:
parent
82f16e82ec
commit
33baa50986
1 changed files with 15 additions and 5 deletions
|
|
@ -1920,13 +1920,13 @@ EnabledModuleList& Project::getEnabledModules()
|
|||
return *enabledModuleList;
|
||||
}
|
||||
|
||||
static Array<File> getModulePathsFromCompatibleExporters (Project& project)
|
||||
static StringArray getModulePathsFromExporters (Project& project, bool onlyThisOS)
|
||||
{
|
||||
StringArray paths;
|
||||
|
||||
for (Project::ExporterIterator exporter (project); exporter.next();)
|
||||
{
|
||||
if (! exporter->mayCompileOnCurrentOS())
|
||||
if (onlyThisOS && ! exporter->mayCompileOnCurrentOS())
|
||||
continue;
|
||||
|
||||
auto& modules = project.getEnabledModules();
|
||||
|
|
@ -1951,9 +1951,19 @@ static Array<File> getModulePathsFromCompatibleExporters (Project& project)
|
|||
paths.addIfNotAlreadyThere (oldPath);
|
||||
}
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
static Array<File> getExporterModulePathsToScan (Project& project)
|
||||
{
|
||||
auto exporterPaths = getModulePathsFromExporters (project, true);
|
||||
|
||||
if (exporterPaths.isEmpty())
|
||||
exporterPaths = getModulePathsFromExporters (project, false);
|
||||
|
||||
Array<File> files;
|
||||
|
||||
for (auto& path : paths)
|
||||
for (auto& path : exporterPaths)
|
||||
{
|
||||
auto f = project.resolveFilename (path);
|
||||
|
||||
|
|
@ -1977,9 +1987,9 @@ AvailableModuleList& Project::getExporterPathsModuleList()
|
|||
void Project::rescanExporterPathModules (bool async)
|
||||
{
|
||||
if (async)
|
||||
exporterPathsModuleList->scanPathsAsync (getModulePathsFromCompatibleExporters (*this));
|
||||
exporterPathsModuleList->scanPathsAsync (getExporterModulePathsToScan (*this));
|
||||
else
|
||||
exporterPathsModuleList->scanPaths (getModulePathsFromCompatibleExporters (*this));
|
||||
exporterPathsModuleList->scanPaths (getExporterModulePathsToScan (*this));
|
||||
}
|
||||
|
||||
ModuleIDAndFolder Project::getModuleWithID (const String& id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue