Browse Source

Introjucer: fix for projects without an export target that can be launched on the current OS.

tags/2021-05-28
jules 13 years ago
parent
commit
a25bddb7ff
2 changed files with 24 additions and 4 deletions
  1. +23
    -4
      extras/Introjucer/Source/Project/jucer_Module.cpp
  2. +1
    -0
      extras/Introjucer/Source/Project/jucer_Module.h

+ 23
- 4
extras/Introjucer/Source/Project/jucer_Module.cpp View File

@@ -98,22 +98,41 @@ File ModuleList::getModulesFolderForJuceOrModulesFolder (const File& f)
return f;
}
File ModuleList::getModulesFolderForExporter (const ProjectExporter& exporter)
{
File f (exporter.getProject().resolveFilename (exporter.getJuceFolderString()));
f = getModulesFolderForJuceOrModulesFolder (f);
return f;
}
File ModuleList::getDefaultModulesFolder (Project* project)
{
if (project != nullptr)
{
ScopedPointer <ProjectExporter> exp (ProjectExporter::createPlatformDefaultExporter (*project));
{
// Try the platform default exporter first..
ScopedPointer <ProjectExporter> exp (ProjectExporter::createPlatformDefaultExporter (*project));
if (exp != nullptr)
{
const File f (getModulesFolderForExporter (*exp));
if (ModuleList::isModulesFolder (f))
return f;
}
}
if (exp != nullptr)
// If that didn't work, try all the other exporters..
for (Project::ExporterIterator exporter (*project); exporter.next();)
{
File f (project->resolveFilename (exp->getJuceFolderString()));
f = getModulesFolderForJuceOrModulesFolder (f);
const File f (getModulesFolderForExporter (*exporter));
if (ModuleList::isModulesFolder (f))
return f;
}
}
// Fall back to a default..
#if JUCE_WINDOWS
return File::getSpecialLocation (File::userDocumentsDirectory)
#else


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

@@ -133,6 +133,7 @@ public:
static void setLocalModulesFolder (const File& newFile);
static File getModulesFolderForJuceOrModulesFolder (const File& f);
static File getModulesFolderForExporter (const ProjectExporter&);
StringArray getExtraDependenciesNeeded (Project&, const Module&);


Loading…
Cancel
Save