Browse Source

Introjucer: made modules work better when the project doesn't contain any targets that will build on the current OS.

tags/2021-05-28
jules 11 years ago
parent
commit
5ffd878ebc
2 changed files with 22 additions and 13 deletions
  1. +20
    -13
      extras/Introjucer/Source/Project/jucer_Module.cpp
  2. +2
    -0
      extras/Introjucer/Source/Project/jucer_Module.h

+ 20
- 13
extras/Introjucer/Source/Project/jucer_Module.cpp View File

@@ -131,21 +131,18 @@ static Array<File> getAllPossibleModulePaths (Project& project)
for (Project::ExporterIterator exporter (project); exporter.next();) for (Project::ExporterIterator exporter (project); exporter.next();)
{ {
if (exporter->mayCompileOnCurrentOS())
for (int i = 0; i < project.getModules().getNumModules(); ++i)
{ {
for (int i = 0; i < project.getModules().getNumModules(); ++i)
{
const String path (exporter->getPathForModuleString (project.getModules().getModuleID (i)));
const String path (exporter->getPathForModuleString (project.getModules().getModuleID (i)));
if (path.isNotEmpty())
paths.addIfNotAlreadyThere (path);
}
if (path.isNotEmpty())
paths.addIfNotAlreadyThere (path);
}
String oldPath (exporter->getLegacyModulePath());
String oldPath (exporter->getLegacyModulePath());
if (oldPath.isNotEmpty())
paths.addIfNotAlreadyThere (oldPath);
}
if (oldPath.isNotEmpty())
paths.addIfNotAlreadyThere (oldPath);
} }
Array<File> files; Array<File> files;
@@ -619,11 +616,11 @@ Value EnabledModuleList::shouldShowAllModuleFilesInProject (const String& module
.getPropertyAsValue (Ids::showAllCode, getUndoManager()); .getPropertyAsValue (Ids::showAllCode, getUndoManager());
} }
File EnabledModuleList::getModuleInfoFile (const String& moduleID)
File EnabledModuleList::findLocalModuleInfoFile (const String& moduleID, bool useExportersForOtherOSes)
{ {
for (Project::ExporterIterator exporter (project); exporter.next();) for (Project::ExporterIterator exporter (project); exporter.next();)
{ {
if (exporter->mayCompileOnCurrentOS())
if (useExportersForOtherOSes || exporter->mayCompileOnCurrentOS())
{ {
const String path (exporter->getPathForModuleString (moduleID)); const String path (exporter->getPathForModuleString (moduleID));
@@ -658,6 +655,16 @@ File EnabledModuleList::getModuleInfoFile (const String& moduleID)
return File::nonexistent; return File::nonexistent;
} }
File EnabledModuleList::getModuleInfoFile (const String& moduleID)
{
const File f (findLocalModuleInfoFile (moduleID, false));
if (f != File::nonexistent)
return f;
return findLocalModuleInfoFile (moduleID, true);
}
File EnabledModuleList::getModuleFolder (const String& moduleID) File EnabledModuleList::getModuleFolder (const String& moduleID)
{ {
const File infoFile (getModuleInfoFile (moduleID)); const File infoFile (getModuleInfoFile (moduleID));


+ 2
- 0
extras/Introjucer/Source/Project/jucer_Module.h View File

@@ -155,6 +155,8 @@ public:
private: private:
UndoManager* getUndoManager() const { return project.getUndoManagerFor (state); } UndoManager* getUndoManager() const { return project.getUndoManagerFor (state); }
File findLocalModuleInfoFile (const String& moduleID, bool useExportersForOtherOSes);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EnabledModuleList) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EnabledModuleList)
}; };


Loading…
Cancel
Save