From 54bdb4897247897cb5ec025cb30159ef8a865b01 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 24 Apr 2012 13:34:37 +0100 Subject: [PATCH] Introjucer: minor internal changes. --- .../jucer_ProjectExport_Android.h | 1 + .../Project Saving/jucer_ProjectExporter.h | 1 + .../Source/Project/jucer_Module.cpp | 48 ++++++++++++++++--- .../Introjucer/Source/Project/jucer_Module.h | 1 + .../Source/Project/jucer_Project.cpp | 7 --- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h index 68959bf17b..1c8e74489b 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -82,6 +82,7 @@ public: #endif } + bool isAndroid() const { return true; } bool isPossibleForCurrentProject() { return projectType.isGUIApplication(); } bool usesMMFiles() const { return false; } bool canCopeWithDuplicateFiles() { return false; } diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h index 88c43cd26a..e16e81f0ca 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h @@ -64,6 +64,7 @@ public: virtual int getVisualStudioVersion() const { return 0; } virtual bool isLinux() const { return false; } virtual bool isOSX() const { return false; } + virtual bool isAndroid() const { return false; } //============================================================================== String getName() const { return name; } diff --git a/extras/Introjucer/Source/Project/jucer_Module.cpp b/extras/Introjucer/Source/Project/jucer_Module.cpp index dbebdcb41c..1e0c3c21ed 100644 --- a/extras/Introjucer/Source/Project/jucer_Module.cpp +++ b/extras/Introjucer/Source/Project/jucer_Module.cpp @@ -582,16 +582,23 @@ void LibraryModule::getConfigFlags (Project& project, OwnedArray& result) const @@ -643,6 +650,35 @@ void LibraryModule::findAndAddCompiledCode (ProjectExporter& exporter, ProjectSa } } +void LibraryModule::getLocalCompiledFiles (Array& result) const +{ + const var compileArray (moduleInfo ["compile"]); // careful to keep this alive while the array is in use! + const Array* const files = compileArray.getArray(); + + if (files != nullptr) + { + 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 + ) + { + const File compiledFile (moduleFolder.getChildFile (filename)); + result.add (compiledFile); + } + } + } +} + static void addFileWithGroups (Project::Item& group, const RelativePath& file, const String& path) { const int slash = path.indexOfChar (File::separator); diff --git a/extras/Introjucer/Source/Project/jucer_Module.h b/extras/Introjucer/Source/Project/jucer_Module.h index b14a5e8570..9036e413e1 100644 --- a/extras/Introjucer/Source/Project/jucer_Module.h +++ b/extras/Introjucer/Source/Project/jucer_Module.h @@ -50,6 +50,7 @@ public: void prepareExporter (ProjectExporter&, ProjectSaver&) const; void createPropertyEditors (ProjectExporter&, PropertyListBuilder&) const; void getConfigFlags (Project&, OwnedArray& flags) const; + void getLocalCompiledFiles (Array& files) const; static String getInfoFileName() { return "juce_module_info"; } diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index 9f52917b08..6bcb6bc830 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -115,13 +115,6 @@ void Project::setMissingDefaultValues() moveOldPropertyFromProjectToAllExporters (Ids::bigIcon); moveOldPropertyFromProjectToAllExporters (Ids::smallIcon); - for (Project::ExporterIterator exporter (*this); exporter.next();) - if (exporter->getNumConfigurations() == 0) - exporter->createDefaultConfigs(); - - if (! projectRoot.getChildWithName (Tags::exporters).isValid()) - createDefaultExporters(); - getProjectType().setMissingProjectProperties (*this); if (! projectRoot.hasProperty (Ids::bundleIdentifier))