| @@ -51,9 +51,6 @@ public: | |||||
| writeMainProjectFile(); | writeMainProjectFile(); | ||||
| if (! project.getGeneratedCodeFolder().createDirectory()) | |||||
| errors.add ("Couldn't create folder: " + project.getGeneratedCodeFolder().getFullPathName()); | |||||
| if (errors.size() == 0) | if (errors.size() == 0) | ||||
| writeAppConfigFile(); | writeAppConfigFile(); | ||||
| @@ -74,6 +71,12 @@ public: | |||||
| bool saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData) | bool saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData) | ||||
| { | { | ||||
| if (! project.getGeneratedCodeFolder().createDirectory()) | |||||
| { | |||||
| errors.add ("Couldn't create folder: " + project.getGeneratedCodeFolder().getFullPathName()); | |||||
| return false; | |||||
| } | |||||
| const File file (project.getGeneratedCodeFolder().getChildFile (filePath)); | const File file (project.getGeneratedCodeFolder().getChildFile (filePath)); | ||||
| if (replaceFileIfDifferent (file, newData)) | if (replaceFileIfDifferent (file, newData)) | ||||
| @@ -80,8 +80,40 @@ public: | |||||
| } | } | ||||
| String getID() const { return moduleInfo ["id"]; } | String getID() const { return moduleInfo ["id"]; } | ||||
| bool isValid() const { return getID().isNotEmpty(); } | bool isValid() const { return getID().isNotEmpty(); } | ||||
| File getInclude() const | |||||
| { | |||||
| return getFileFromPath (moduleInfo ["include"]); | |||||
| } | |||||
| Array<File> getCompiledFiles() const | |||||
| { | |||||
| Array<File> result; | |||||
| const Array<var>* const files = moduleInfo ["compile"].getArray(); | |||||
| if (files != nullptr) | |||||
| { | |||||
| for (int i = 0; i < files->size(); ++i) | |||||
| { | |||||
| const var& file = files->getReference(i); | |||||
| String filename (file ["file"].toString()); | |||||
| if (filename.isNotEmpty()) | |||||
| result.add (getFileFromPath (filename)); | |||||
| } | |||||
| } | |||||
| return result; | |||||
| } | |||||
| File getFileFromPath (const String& path) const | |||||
| { | |||||
| return moduleFolder.getChildFile (path); | |||||
| } | |||||
| void getDependencies (OwnedArray<JuceModule>& dependencies) const | void getDependencies (OwnedArray<JuceModule>& dependencies) const | ||||
| { | { | ||||
| const Array<var>* const deps = moduleInfo ["dependencies"].getArray(); | const Array<var>* const deps = moduleInfo ["dependencies"].getArray(); | ||||
| @@ -119,7 +151,8 @@ private: | |||||
| static File getModulesFolder() | static File getModulesFolder() | ||||
| { | { | ||||
| return StoredSettings::getInstance()->getLastKnownJuceFolder().getChildFile ("modules"); | |||||
| return File ("/Volumes/CODE/code/juce2/modules"); | |||||
| //return StoredSettings::getInstance()->getLastKnownJuceFolder().getChildFile ("modules"); | |||||
| } | } | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceModule); | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceModule); | ||||
| @@ -828,6 +861,8 @@ ProjectType::ProjectType (const String& type_, const String& desc_) | |||||
| ProjectType::~ProjectType() | ProjectType::~ProjectType() | ||||
| { | { | ||||
| JuceModule::findAllModuleIDs(); | |||||
| getAllTypes().removeValue (this); | getAllTypes().removeValue (this); | ||||
| } | } | ||||
| @@ -849,18 +884,6 @@ const ProjectType* ProjectType::findType (const String& typeCode) | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| void ProjectType::setMissingProjectProperties (Project&) const | |||||
| { | |||||
| } | |||||
| void ProjectType::createPropertyEditors (const Project& project, Array <PropertyComponent*>& props) const | |||||
| { | |||||
| } | |||||
| void ProjectType::prepareExporter (ProjectExporter& exporter) const | |||||
| { | |||||
| } | |||||
| void ProjectType::createRequiredModules (Project& project, OwnedArray<LibraryModule>& modules) const | void ProjectType::createRequiredModules (Project& project, OwnedArray<LibraryModule>& modules) const | ||||
| { | { | ||||
| modules.add (new JuceLibraryModule()); | modules.add (new JuceLibraryModule()); | ||||
| @@ -71,9 +71,9 @@ public: | |||||
| static const char* getConsoleAppTypeName(); | static const char* getConsoleAppTypeName(); | ||||
| static const char* getAudioPluginTypeName(); | static const char* getAudioPluginTypeName(); | ||||
| virtual void setMissingProjectProperties (Project&) const; | |||||
| virtual void createPropertyEditors (const Project&, Array <PropertyComponent*>&) const; | |||||
| virtual void prepareExporter (ProjectExporter&) const; | |||||
| virtual void setMissingProjectProperties (Project&) const = 0; | |||||
| virtual void createPropertyEditors (const Project&, Array <PropertyComponent*>&) const = 0; | |||||
| virtual void prepareExporter (ProjectExporter&) const = 0; | |||||
| virtual void createRequiredModules (Project&, OwnedArray<LibraryModule>& modules) const; | virtual void createRequiredModules (Project&, OwnedArray<LibraryModule>& modules) const; | ||||
| protected: | protected: | ||||
| @@ -285102,6 +285102,7 @@ QuickTimeMovieComponent::QuickTimeMovieComponent() | |||||
| QTMovieView* view = [[NonInterceptingQTMovieView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)]; | QTMovieView* view = [[NonInterceptingQTMovieView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)]; | ||||
| setView (view); | setView (view); | ||||
| [view setWantsLayer: YES]; // prevents the view failing to redraw correctly when paused. | |||||
| [view release]; | [view release]; | ||||
| } | } | ||||
| @@ -82,6 +82,7 @@ QuickTimeMovieComponent::QuickTimeMovieComponent() | |||||
| QTMovieView* view = [[NonInterceptingQTMovieView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)]; | QTMovieView* view = [[NonInterceptingQTMovieView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)]; | ||||
| setView (view); | setView (view); | ||||
| [view setWantsLayer: YES]; // prevents the view failing to redraw correctly when paused. | |||||
| [view release]; | [view release]; | ||||
| } | } | ||||