1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Introjucer: fix to paths when copying modules locally.

This commit is contained in:
jules 2013-11-02 16:41:11 +00:00
parent b364573890
commit 14cb377f77
2 changed files with 6 additions and 29 deletions

View file

@ -340,7 +340,12 @@ void LibraryModule::prepareExporter (ProjectExporter& exporter, ProjectSaver& pr
{
Array<File> compiled;
findAndAddCompiledCode (exporter, projectSaver, moduleInfo.getFolder(), compiled);
const File localModuleFolder = project.getModules().shouldCopyModuleFilesLocally (getID()).getValue()
? projectSaver.getLocalModuleFolder (getID())
: moduleInfo.getFolder();
findAndAddCompiledCode (exporter, projectSaver, localModuleFolder, compiled);
if (project.getModules().shouldShowAllModuleFilesInProject (getID()).getValue())
addBrowsableCode (exporter, projectSaver, compiled, moduleInfo.getFolder());
@ -524,33 +529,6 @@ void LibraryModule::findAndAddCompiledCode (ProjectExporter& exporter, ProjectSa
}
}
void LibraryModule::getLocalCompiledFiles (const File& localModuleFolder, Array<File>& result) const
{
const var compileArray (moduleInfo.moduleInfo ["compile"]); // careful to keep this alive while the array is in use!
if (const Array<var>* const files = compileArray.getArray())
{
for (int i = 0; i < files->size(); ++i)
{
const var& file = files->getReference(i);
const String filename (file ["file"].toString());
if (filename.isNotEmpty()
#if JUCE_MAC
&& exporterTargetMatches ("xcode", file ["target"].toString())
#elif JUCE_WINDOWS
&& exporterTargetMatches ("msvc", file ["target"].toString())
#elif JUCE_LINUX
&& exporterTargetMatches ("linux", file ["target"].toString())
#endif
)
{
result.add (localModuleFolder.getChildFile (filename));
}
}
}
}
static void addFileWithGroups (Project::Item& group, const RelativePath& file, const String& path)
{
const int slash = path.indexOfChar (File::separator);

View file

@ -95,7 +95,6 @@ public:
void prepareExporter (ProjectExporter&, ProjectSaver&) const;
void createPropertyEditors (ProjectExporter&, PropertyListBuilder&) const;
void getConfigFlags (Project&, OwnedArray<Project::ConfigFlag>& flags) const;
void getLocalCompiledFiles (const File& localModuleFolder, Array<File>& files) const;
void findBrowseableFiles (const File& localModuleFolder, Array<File>& files) const;
ModuleDescription moduleInfo;