| @@ -59,7 +59,6 @@ public: | |||
| menuModel = new MainMenuModel(); | |||
| MainWindow* main = createNewMainWindow (false); | |||
| doExtraInitialisation(); | |||
| ImageCache::setCacheTimeout (30 * 1000); | |||
| @@ -76,11 +75,12 @@ public: | |||
| openFile (projects.getReference(i)); | |||
| } | |||
| if (mainWindows.size() == 0) | |||
| createNewMainWindow()->makeVisible(); | |||
| #if JUCE_MAC | |||
| MenuBarModel::setMacMainMenu (menuModel); | |||
| #endif | |||
| main->setVisible (true); | |||
| } | |||
| void shutdown() | |||
| @@ -273,7 +273,10 @@ public: | |||
| else if (menuItemID >= 300 && menuItemID < 400) | |||
| { | |||
| OpenDocumentManager::Document* doc = OpenDocumentManager::getInstance()->getOpenDocument (menuItemID - 300); | |||
| getApp()->getOrCreateFrontmostWindow (true)->getProjectContentComponent()->showDocument (doc); | |||
| MainWindow* w = getApp()->getOrCreateFrontmostWindow(); | |||
| w->makeVisible(); | |||
| w->getProjectContentComponent()->showDocument (doc); | |||
| } | |||
| } | |||
| @@ -362,13 +365,13 @@ public: | |||
| void createNewProject() | |||
| { | |||
| MainWindow* mw = createNewMainWindow (false); | |||
| MainWindow* mw = createNewMainWindow(); | |||
| ScopedPointer <Project> newProj (NewProjectWizard::runNewProjectWizard (mw)); | |||
| if (newProj != nullptr) | |||
| { | |||
| mw->setProject (newProj.release()); | |||
| mw->setVisible (true); | |||
| mw->makeVisible(); | |||
| } | |||
| else | |||
| { | |||
| @@ -400,19 +403,21 @@ public: | |||
| { | |||
| ScopedPointer <Project> newDoc (new Project (file)); | |||
| if (file == File::nonexistent ? newDoc->loadFromUserSpecifiedFile (true) | |||
| : newDoc->loadFrom (file, true)) | |||
| if (newDoc->loadFrom (file, true)) | |||
| { | |||
| MainWindow* w = getOrCreateEmptyWindow (false); | |||
| MainWindow* w = getOrCreateEmptyWindow(); | |||
| w->setProject (newDoc.release()); | |||
| w->restoreWindowPosition(); | |||
| w->setVisible (true); | |||
| w->makeVisible(); | |||
| return true; | |||
| } | |||
| } | |||
| else if (file.exists()) | |||
| { | |||
| return getOrCreateFrontmostWindow (true)->openFile (file); | |||
| MainWindow* w = getOrCreateFrontmostWindow(); | |||
| const bool ok = w->openFile (file); | |||
| w->makeVisible(); | |||
| return ok; | |||
| } | |||
| return false; | |||
| @@ -454,7 +459,7 @@ public: | |||
| private: | |||
| OwnedArray <MainWindow> mainWindows; | |||
| MainWindow* createNewMainWindow (bool makeVisible) | |||
| MainWindow* createNewMainWindow() | |||
| { | |||
| MainWindow* mw = new MainWindow(); | |||
| @@ -463,18 +468,14 @@ private: | |||
| mw->setBounds (mw->getBounds().translated (20, 20)); | |||
| mainWindows.add (mw); | |||
| if (makeVisible) | |||
| mw->setVisible (true); | |||
| mw->restoreWindowPosition(); | |||
| return mw; | |||
| } | |||
| MainWindow* getOrCreateFrontmostWindow (bool makeVisible) | |||
| MainWindow* getOrCreateFrontmostWindow() | |||
| { | |||
| if (mainWindows.size() == 0) | |||
| return createNewMainWindow (makeVisible); | |||
| return createNewMainWindow(); | |||
| for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;) | |||
| { | |||
| @@ -486,10 +487,10 @@ private: | |||
| return mainWindows.getLast(); | |||
| } | |||
| MainWindow* getOrCreateEmptyWindow (bool makeVisible) | |||
| MainWindow* getOrCreateEmptyWindow() | |||
| { | |||
| if (mainWindows.size() == 0) | |||
| return createNewMainWindow (makeVisible); | |||
| return createNewMainWindow(); | |||
| for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;) | |||
| { | |||
| @@ -498,7 +499,7 @@ private: | |||
| return mw; | |||
| } | |||
| return createNewMainWindow (makeVisible); | |||
| return createNewMainWindow(); | |||
| } | |||
| }; | |||
| @@ -78,11 +78,6 @@ MainWindow::MainWindow() | |||
| //getPeer()->setCurrentRenderingEngine (0); | |||
| getLookAndFeel().setColour (ColourSelector::backgroundColourId, Colours::transparentBlack); | |||
| setVisible (true); | |||
| addToDesktop(); | |||
| getContentComponent()->grabKeyboardFocus(); | |||
| } | |||
| MainWindow::~MainWindow() | |||
| @@ -101,6 +96,15 @@ MainWindow::~MainWindow() | |||
| currentProject = nullptr; | |||
| } | |||
| void MainWindow::makeVisible() | |||
| { | |||
| setVisible (true); | |||
| restoreWindowPosition(); | |||
| addToDesktop(); | |||
| getContentComponent()->grabKeyboardFocus(); | |||
| } | |||
| ProjectContentComponent* MainWindow::getProjectContentComponent() const | |||
| { | |||
| return dynamic_cast <ProjectContentComponent*> (getContentComponent()); | |||
| @@ -181,14 +185,11 @@ bool MainWindow::openFile (const File& file) | |||
| { | |||
| ScopedPointer <Project> newDoc (new Project (file)); | |||
| if (file == File::nonexistent ? newDoc->loadFromUserSpecifiedFile (true) | |||
| : newDoc->loadFrom (file, true)) | |||
| if (newDoc->loadFrom (file, true) | |||
| && closeCurrentProject()) | |||
| { | |||
| if (closeCurrentProject()) | |||
| { | |||
| setProject (newDoc.release()); | |||
| return true; | |||
| } | |||
| setProject (newDoc.release()); | |||
| return true; | |||
| } | |||
| } | |||
| else if (file.exists()) | |||
| @@ -52,6 +52,7 @@ public: | |||
| void setProject (Project* newProject); | |||
| Project* getProject() const { return currentProject; } | |||
| void makeVisible(); | |||
| void restoreWindowPosition(); | |||
| bool closeProject (Project* project); | |||
| bool closeCurrentProject(); | |||
| @@ -276,18 +276,6 @@ String Project::getRelativePathForFile (const File& file) const | |||
| return filename; | |||
| } | |||
| //============================================================================== | |||
| bool Project::shouldBeAddedToBinaryResourcesByDefault (const File& file) | |||
| { | |||
| return ! file.hasFileExtension (sourceOrHeaderFileExtensions); | |||
| } | |||
| bool Project::shouldAddVSTFolderToPath() | |||
| { | |||
| return (getProjectType().isAudioPlugin() | |||
| && (bool) shouldBuildVST().getValue()) || getJuceConfigFlag ("JUCE_PLUGINHOST_VST").toString() == configFlagEnabled; | |||
| } | |||
| //============================================================================== | |||
| const ProjectType& Project::getProjectType() const | |||
| { | |||
| @@ -560,6 +548,14 @@ Project::Item::~Item() | |||
| String Project::Item::getID() const { return node [Ids::id_]; } | |||
| String Project::Item::getImageFileID() const { return "id:" + getID(); } | |||
| Project::Item Project::Item::createGroup (Project& project, const String& name) | |||
| { | |||
| Item group (project, ValueTree (Tags::group)); | |||
| group.initialiseNodeValues(); | |||
| group.getName() = name; | |||
| return group; | |||
| } | |||
| bool Project::Item::isFile() const { return node.hasType (Tags::file); } | |||
| bool Project::Item::isGroup() const { return node.hasType (Tags::group) || isMainGroup(); } | |||
| bool Project::Item::isMainGroup() const { return node.hasType (Tags::projectMainGroup); } | |||
| @@ -630,11 +626,16 @@ File Project::Item::getFile() const | |||
| void Project::Item::setFile (const File& file) | |||
| { | |||
| setFile (RelativePath (getProject().getRelativePathForFile (file), RelativePath::projectFolder)); | |||
| jassert (getFile() == file); | |||
| } | |||
| void Project::Item::setFile (const RelativePath& file) | |||
| { | |||
| jassert (file.getRoot() == RelativePath::projectFolder); | |||
| jassert (isFile()); | |||
| node.setProperty (Ids::file, getProject().getRelativePathForFile (file), getUndoManager()); | |||
| node.setProperty (Ids::file, file.toUnixStyle(), getUndoManager()); | |||
| node.setProperty (Ids::name, file.getFileName(), getUndoManager()); | |||
| jassert (getFile() == file); | |||
| } | |||
| bool Project::Item::renameFile (const File& newFile) | |||
| @@ -757,9 +758,7 @@ void Project::Item::sortAlphabetically() | |||
| Project::Item Project::Item::addNewSubGroup (const String& name, int insertIndex) | |||
| { | |||
| Item group (getProject(), ValueTree (Tags::group)); | |||
| group.initialiseNodeValues(); | |||
| group.getName() = name; | |||
| Item group (createGroup (getProject(), name)); | |||
| jassert (canContain (group)); | |||
| addChild (group, insertIndex); | |||
| @@ -809,6 +808,24 @@ bool Project::Item::addFile (const File& file, int insertIndex) | |||
| return true; | |||
| } | |||
| bool Project::Item::addRelativeFile (const RelativePath& file, int insertIndex) | |||
| { | |||
| Item item (getProject(), ValueTree (Tags::file)); | |||
| item.initialiseNodeValues(); | |||
| item.getName() = file.getFileName(); | |||
| item.getShouldCompileValue() = file.hasFileExtension ("cpp;mm;c;m;cc;cxx"); | |||
| item.getShouldAddToResourceValue() = getProject().shouldBeAddedToBinaryResourcesByDefault (file); | |||
| if (canContain (item)) | |||
| { | |||
| item.setFile (file); | |||
| addChild (item, insertIndex); | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| const Drawable* Project::Item::getIcon() const | |||
| { | |||
| if (isFile()) | |||
| @@ -829,15 +846,7 @@ const Drawable* Project::Item::getIcon() const | |||
| //============================================================================== | |||
| ValueTree Project::getJuceConfigNode() | |||
| { | |||
| ValueTree configNode = projectRoot.getChildWithName (Tags::configGroup); | |||
| if (! configNode.isValid()) | |||
| { | |||
| configNode = ValueTree (Tags::configGroup); | |||
| projectRoot.addChild (configNode, -1, 0); | |||
| } | |||
| return configNode; | |||
| return projectRoot.getOrCreateChildWithName (Tags::configGroup, nullptr); | |||
| } | |||
| void Project::getJuceConfigFlags (OwnedArray <JuceConfigFlag>& flags) | |||
| @@ -891,6 +900,11 @@ Value Project::getJuceConfigFlag (const String& name) | |||
| return v; | |||
| } | |||
| bool Project::isJuceConfigFlagEnabled (const String& name) const | |||
| { | |||
| return projectRoot.getChildWithName (Tags::configGroup).getProperty (name) == configFlagEnabled; | |||
| } | |||
| //============================================================================== | |||
| ValueTree Project::getConfigurations() const | |||
| { | |||
| @@ -56,7 +56,12 @@ public: | |||
| String getProjectUID() const { return projectRoot [Ids::id_]; } | |||
| //============================================================================== | |||
| bool shouldBeAddedToBinaryResourcesByDefault (const File& file); | |||
| template <class FileType> | |||
| bool shouldBeAddedToBinaryResourcesByDefault (const FileType& file) | |||
| { | |||
| return ! file.hasFileExtension (sourceOrHeaderFileExtensions); | |||
| } | |||
| File resolveFilename (String filename) const; | |||
| String getRelativePathForFile (const File& file) const; | |||
| @@ -104,7 +109,6 @@ public: | |||
| Value shouldBuildVST() const { return getProjectValue ("buildVST"); } | |||
| Value shouldBuildRTAS() const { return getProjectValue ("buildRTAS"); } | |||
| Value shouldBuildAU() const { return getProjectValue ("buildAU"); } | |||
| bool shouldAddVSTFolderToPath(); | |||
| Value getPluginName() const { return getProjectValue ("pluginName"); } | |||
| Value getPluginDesc() const { return getProjectValue ("pluginDesc"); } | |||
| @@ -149,6 +153,7 @@ public: | |||
| Item& operator= (const Item& other); | |||
| ~Item(); | |||
| static Item createGroup (Project& project, const String& name); | |||
| void initialiseNodeValues(); | |||
| //============================================================================== | |||
| @@ -173,6 +178,7 @@ public: | |||
| Value getName() const; | |||
| File getFile() const; | |||
| void setFile (const File& file); | |||
| void setFile (const RelativePath& file); | |||
| File determineGroupFolder() const; | |||
| bool renameFile (const File& newFile); | |||
| @@ -190,6 +196,7 @@ public: | |||
| Item addNewSubGroup (const String& name, int insertIndex); | |||
| void addChild (const Item& newChild, int insertIndex); | |||
| bool addFile (const File& file, int insertIndex); | |||
| bool addRelativeFile (const RelativePath& file, int insertIndex); | |||
| void removeItemFromProject(); | |||
| void sortAlphabetically(); | |||
| Item findItemForFile (const File& file) const; | |||
| @@ -290,6 +297,7 @@ public: | |||
| static const char* const configFlagEnabled; | |||
| static const char* const configFlagDisabled; | |||
| Value getJuceConfigFlag (const String& name); | |||
| bool isJuceConfigFlagEnabled (const String& name) const; | |||
| //============================================================================== | |||
| String getFileTemplate (const String& templateName); | |||
| @@ -209,10 +209,7 @@ private: | |||
| { | |||
| Array<RelativePath> files; | |||
| findAllFilesToCompile (project.getMainGroup(), files); | |||
| for (int i = 0; i < juceWrapperFiles.size(); ++i) | |||
| if (shouldFileBeCompiledByDefault (juceWrapperFiles.getReference(i))) | |||
| files.add (juceWrapperFiles.getReference(i)); | |||
| findAllFilesToCompile (libraryFilesGroup, files); | |||
| MemoryOutputStream mo; | |||
| writeAndroidMk (mo, files); | |||
| @@ -55,6 +55,7 @@ public: | |||
| //============================================================================== | |||
| bool isPossibleForCurrentProject() { return true; } | |||
| bool usesMMFiles() const { return false; } | |||
| bool isVisualStudio() const { return true; } | |||
| void createPropertyEditors (Array <PropertyComponent*>& props) | |||
| { | |||
| @@ -85,26 +86,6 @@ protected: | |||
| bool isLibraryDLL() const { return project.getProjectType().isLibrary() && getLibraryType() == 2; } | |||
| //============================================================================== | |||
| const Array<RelativePath> getRTASFilesRequired() const | |||
| { | |||
| Array<RelativePath> s; | |||
| if (isRTAS()) | |||
| { | |||
| static const char* files[] = { JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode1.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode2.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode3.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode_Header.h", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_WinUtilities.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_Wrapper.cpp" }; | |||
| for (int i = 0; i < numElementsInArray (files); ++i) | |||
| s.add (getJucePathFromTargetFolder().getChildFile (files[i])); | |||
| } | |||
| return s; | |||
| } | |||
| String getIntermediatesPath (const Project::BuildConfiguration& config) const | |||
| { | |||
| return ".\\" + File::createLegalFileName (config.getName().toString().trim()); | |||
| @@ -183,44 +164,7 @@ protected: | |||
| { | |||
| StringArray searchPaths (config.getHeaderSearchPaths()); | |||
| if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty()) | |||
| searchPaths.add (rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toWindowsStyle()); | |||
| if (project.getProjectType().isAudioPlugin()) | |||
| searchPaths.add (juceWrapperFolder.toWindowsStyle()); | |||
| if (isRTAS()) | |||
| { | |||
| static const char* rtasIncludePaths[] = { "AlturaPorts/TDMPlugins/PluginLibrary/EffectClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses/Interfaces", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Utilities", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/RTASP_Adapt", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/CoreClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Controls", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Meters", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/ViewClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/DSPClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Interfaces", | |||
| "AlturaPorts/TDMPlugins/common", | |||
| "AlturaPorts/TDMPlugins/common/Platform", | |||
| "AlturaPorts/TDMPlugins/SignalProcessing/Public", | |||
| "AlturaPorts/TDMPlugIns/DSPManager/Interfaces", | |||
| "AlturaPorts/SADriver/Interfaces", | |||
| "AlturaPorts/DigiPublic/Interfaces", | |||
| "AlturaPorts/Fic/Interfaces/DAEClient", | |||
| "AlturaPorts/NewFileLibs/Cmn", | |||
| "AlturaPorts/NewFileLibs/DOA", | |||
| "AlturaPorts/AlturaSource/PPC_H", | |||
| "AlturaPorts/AlturaSource/AppSupport", | |||
| "AvidCode/AVX2sdk/AVX/avx2/avx2sdk/inc", | |||
| "xplat/AVX/avx2/avx2sdk/inc" }; | |||
| RelativePath sdkFolder (getRTASFolder().toString(), RelativePath::projectFolder); | |||
| for (int i = 0; i < numElementsInArray (rtasIncludePaths); ++i) | |||
| searchPaths.add (rebaseFromProjectFolderToBuildTarget (sdkFolder.getChildFile (rtasIncludePaths[i])).toWindowsStyle()); | |||
| } | |||
| project.getProjectType().addExtraSearchPaths (*this, searchPaths); | |||
| return searchPaths; | |||
| } | |||
| @@ -455,8 +399,11 @@ public: | |||
| if (hasIcon) | |||
| { | |||
| juceWrapperFiles.add (RelativePath (iconFile.getFileName(), RelativePath::buildTargetFolder)); | |||
| juceWrapperFiles.add (RelativePath (rcFile.getFileName(), RelativePath::buildTargetFolder)); | |||
| libraryFilesGroup.addFile (iconFile, -1); | |||
| libraryFilesGroup.addFile (rcFile, -1); | |||
| libraryFilesGroup.findItemForFile (iconFile).getShouldAddToResourceValue() = false; | |||
| libraryFilesGroup.findItemForFile (rcFile).getShouldAddToResourceValue() = false; | |||
| } | |||
| { | |||
| @@ -537,14 +484,14 @@ protected: | |||
| return filter; | |||
| } | |||
| void addFiles (const Project::Item& projectItem, XmlElement& parent) | |||
| void addFiles (const Project::Item& projectItem, XmlElement& parent, const bool useStdcall) | |||
| { | |||
| if (projectItem.isGroup()) | |||
| { | |||
| XmlElement* filter = createGroup (projectItem.getName().toString(), parent); | |||
| for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
| addFiles (projectItem.getChild(i), *filter); | |||
| addFiles (projectItem.getChild(i), *filter, useStdcall); | |||
| } | |||
| else | |||
| { | |||
| @@ -554,7 +501,7 @@ protected: | |||
| addFile (path, parent, | |||
| projectItem.shouldBeAddedToBinaryResources() || (shouldFileBeCompiledByDefault (path) && ! projectItem.shouldBeCompiled()), | |||
| false); | |||
| useStdcall); | |||
| } | |||
| } | |||
| } | |||
| @@ -574,11 +521,13 @@ protected: | |||
| void createFiles (XmlElement& files) | |||
| { | |||
| addFiles (project.getMainGroup(), files); | |||
| addFiles (project.getMainGroup(), files, false); | |||
| addGroup (files, project.getJuceCodeGroupName(), juceWrapperFiles, false); | |||
| addGroup (files, "Juce VST Wrapper", getVSTFilesRequired(), false); | |||
| addGroup (files, "Juce RTAS Wrapper", getRTASFilesRequired(), true); | |||
| if (libraryFilesGroup.getNumChildren() > 0) | |||
| addFiles (libraryFilesGroup, files, false); | |||
| if (isVST()) addFiles (createVSTGroup (false), files, false); | |||
| if (isRTAS()) addFiles (createRTASGroup (false), files, true); | |||
| } | |||
| //============================================================================== | |||
| @@ -985,8 +934,12 @@ private: | |||
| << targetList; | |||
| writeFiles (out, project.getMainGroup()); | |||
| writeGroup (out, project.getJuceCodeGroupName(), juceWrapperFiles); | |||
| writeGroup (out, "Juce VST Wrapper", getVSTFilesRequired()); | |||
| if (libraryFilesGroup.getNumChildren() > 0) | |||
| writeFiles (out, libraryFilesGroup); | |||
| if (isVST()) | |||
| writeFiles (out, createVSTGroup (false)); | |||
| out << "# End Target" << newLine | |||
| << "# End Project" << newLine; | |||
| @@ -1335,10 +1288,16 @@ protected: | |||
| XmlElement* cppFiles = projectXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* headerFiles = projectXml.createNewChildElement ("ItemGroup"); | |||
| addFilesToCompile (project.getMainGroup(), *cppFiles, *headerFiles); | |||
| addFilesToCompile (juceWrapperFiles, *cppFiles, *headerFiles, false); | |||
| addFilesToCompile (getVSTFilesRequired(), *cppFiles, *headerFiles, false); | |||
| addFilesToCompile (getRTASFilesRequired(), *cppFiles, *headerFiles, true); | |||
| addFilesToCompile (project.getMainGroup(), *cppFiles, *headerFiles, false); | |||
| if (libraryFilesGroup.getNumChildren() > 0) | |||
| addFilesToCompile (libraryFilesGroup, *cppFiles, *headerFiles, false); | |||
| if (isVST()) | |||
| addFilesToCompile (createVSTGroup (false), *cppFiles, *headerFiles, false); | |||
| if (isRTAS()) | |||
| addFilesToCompile (createRTASGroup (false), *cppFiles, *headerFiles, true); | |||
| } | |||
| if (hasIcon) | |||
| @@ -1404,16 +1363,15 @@ protected: | |||
| void addFilesToCompile (const Array<RelativePath>& files, XmlElement& cpps, XmlElement& headers, bool useStdCall) | |||
| { | |||
| for (int i = 0; i < files.size(); ++i) | |||
| addFileToCompile (files.getReference(i), cpps, headers, false, | |||
| useStdCall && shouldFileBeCompiledByDefault (files.getReference(i))); | |||
| addFileToCompile (files.getReference(i), cpps, headers, false, useStdCall); | |||
| } | |||
| void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers) | |||
| void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers, bool useStdCall) | |||
| { | |||
| if (projectItem.isGroup()) | |||
| { | |||
| for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
| addFilesToCompile (projectItem.getChild(i), cpps, headers); | |||
| addFilesToCompile (projectItem.getChild(i), cpps, headers, useStdCall); | |||
| } | |||
| else | |||
| { | |||
| @@ -1422,7 +1380,7 @@ protected: | |||
| const RelativePath path (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder); | |||
| if (path.hasFileExtension (headerFileExtensions) || (path.hasFileExtension ("cpp;cc;c;cxx") && projectItem.shouldBeCompiled())) | |||
| addFileToCompile (path, cpps, headers, false, false); | |||
| addFileToCompile (path, cpps, headers, false, useStdCall); | |||
| } | |||
| } | |||
| } | |||
| @@ -1486,15 +1444,26 @@ protected: | |||
| filterXml.setAttribute ("ToolsVersion", "4.0"); | |||
| filterXml.setAttribute ("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003"); | |||
| XmlElement* groups = filterXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* cpps = filterXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* groups = filterXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* cpps = filterXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* headers = filterXml.createNewChildElement ("ItemGroup"); | |||
| addFilesToFilter (project.getMainGroup(), project.getProjectName().toString(), *cpps, *headers, *groups); | |||
| addFilesToFilter (juceWrapperFiles, project.getJuceCodeGroupName(), *cpps, *headers, *groups); | |||
| addFilesToFilter (getVSTFilesRequired(), "Juce VST Wrapper", *cpps, *headers, *groups); | |||
| addFilesToFilter (getRTASFilesRequired(), "Juce RTAS Wrapper", *cpps, *headers, *groups); | |||
| if (libraryFilesGroup.getNumChildren() > 0) | |||
| addFilesToFilter (libraryFilesGroup, project.getJuceCodeGroupName(), *cpps, *headers, *groups); | |||
| if (isVST()) | |||
| { | |||
| Project::Item vstGroup (createVSTGroup (false)); | |||
| addFilesToFilter (vstGroup, vstGroup.getName().toString(), *cpps, *headers, *groups); | |||
| } | |||
| if (isRTAS()) | |||
| { | |||
| Project::Item rtasGroup (createRTASGroup (false)); | |||
| addFilesToFilter (rtasGroup, rtasGroup.getName().toString(), *cpps, *headers, *groups); | |||
| } | |||
| if (iconFile.exists()) | |||
| { | |||
| @@ -71,6 +71,7 @@ public: | |||
| bool isPossibleForCurrentProject() { return true; } | |||
| bool usesMMFiles() const { return false; } | |||
| bool isLinux() const { return true; } | |||
| void launchProject() | |||
| { | |||
| @@ -87,14 +88,10 @@ public: | |||
| { | |||
| Array<RelativePath> files; | |||
| findAllFilesToCompile (project.getMainGroup(), files); | |||
| findAllFilesToCompile (libraryFilesGroup, files); | |||
| for (int i = 0; i < juceWrapperFiles.size(); ++i) | |||
| if (shouldFileBeCompiledByDefault (juceWrapperFiles.getReference(i))) | |||
| files.add (juceWrapperFiles.getReference(i)); | |||
| const Array<RelativePath> vstFiles (getVSTFilesRequired()); | |||
| for (int i = 0; i < vstFiles.size(); i++) | |||
| files.add (vstFiles.getReference(i)); | |||
| if (isVST()) | |||
| findAllFilesToCompile (createVSTGroup (false), files); | |||
| MemoryOutputStream mo; | |||
| writeMakefile (mo, files); | |||
| @@ -142,11 +139,7 @@ private: | |||
| headerPaths.insert (0, "/usr/include/freetype2"); | |||
| headerPaths.insert (0, "/usr/include"); | |||
| if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty()) | |||
| headerPaths.insert (0, rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toUnixStyle()); | |||
| if (isVST()) | |||
| headerPaths.insert (0, juceWrapperFolder.toUnixStyle()); | |||
| project.getProjectType().addExtraSearchPaths (*this, headerPaths); | |||
| for (int i = 0; i < headerPaths.size(); ++i) | |||
| out << " -I " << FileHelpers::unixStylePath (replacePreprocessorTokens (config, headerPaths[i])).quoted(); | |||
| @@ -93,6 +93,7 @@ public: | |||
| bool isPossibleForCurrentProject() { return project.getProjectType().isGUIApplication() || ! iPhone; } | |||
| bool usesMMFiles() const { return true; } | |||
| bool isXcode() const { return true; } | |||
| void createPropertyEditors (Array <PropertyComponent*>& props) | |||
| { | |||
| @@ -196,7 +197,7 @@ private: | |||
| resourceFileRefs.add (createID (iconPath)); | |||
| } | |||
| addProjectItem (project.getMainGroup()); | |||
| addProjectItem (project.getMainGroup(), String::empty, false); | |||
| for (int i = 0; i < project.getNumConfigurations(); ++i) | |||
| { | |||
| @@ -401,57 +402,7 @@ private: | |||
| { | |||
| StringArray searchPaths (config.getHeaderSearchPaths()); | |||
| if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty()) | |||
| searchPaths.add (rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toUnixStyle()); | |||
| if (project.getProjectType().isAudioPlugin()) | |||
| { | |||
| if (isAU()) | |||
| { | |||
| searchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/PublicUtility"); | |||
| searchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/Utility"); | |||
| } | |||
| if (isRTAS()) | |||
| { | |||
| searchPaths.add ("/Developer/Headers/FlatCarbon"); | |||
| static const char* rtasIncludePaths[] = { "AlturaPorts/TDMPlugIns/PlugInLibrary/Controls", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/CoreClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/DSPClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/Meters", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses/Interfaces", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/RTASP_Adapt", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/Utilities", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/ViewClasses", | |||
| "AlturaPorts/TDMPlugIns/DSPManager/**", | |||
| "AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption", | |||
| "AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions", | |||
| "AlturaPorts/TDMPlugIns/common", | |||
| "AlturaPorts/TDMPlugIns/common/PI_LibInterface", | |||
| "AlturaPorts/TDMPlugIns/PACEProtection/**", | |||
| "AlturaPorts/TDMPlugIns/SignalProcessing/**", | |||
| "AlturaPorts/OMS/Headers", | |||
| "AlturaPorts/Fic/Interfaces/**", | |||
| "AlturaPorts/Fic/Source/SignalNets", | |||
| "AlturaPorts/DSIPublicInterface/PublicHeaders", | |||
| "DAEWin/Include", | |||
| "AlturaPorts/DigiPublic/Interfaces", | |||
| "AlturaPorts/DigiPublic", | |||
| "AlturaPorts/NewFileLibs/DOA", | |||
| "AlturaPorts/NewFileLibs/Cmn", | |||
| "xplat/AVX/avx2/avx2sdk/inc", | |||
| "xplat/AVX/avx2/avx2sdk/utils" }; | |||
| RelativePath sdkFolder (getRTASFolder().toString(), RelativePath::projectFolder); | |||
| for (int i = 0; i < numElementsInArray (rtasIncludePaths); ++i) | |||
| searchPaths.add (rebaseFromProjectFolderToBuildTarget (sdkFolder.getChildFile (rtasIncludePaths[i])).toUnixStyle()); | |||
| } | |||
| } | |||
| project.getProjectType().addExtraSearchPaths (*this, searchPaths); | |||
| return searchPaths; | |||
| } | |||
| @@ -835,27 +786,27 @@ private: | |||
| return addFileReference (path); | |||
| } | |||
| String addProjectItem (const Project::Item& projectItem) | |||
| String addProjectItem (const Project::Item& projectItem, const String& groupID, bool inhibitWarnings) | |||
| { | |||
| if (projectItem.isGroup()) | |||
| { | |||
| StringArray childIDs; | |||
| for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
| { | |||
| const String childID (addProjectItem (projectItem.getChild(i))); | |||
| const String childID (addProjectItem (projectItem.getChild(i), String::empty, inhibitWarnings)); | |||
| if (childID.isNotEmpty()) | |||
| childIDs.add (childID); | |||
| } | |||
| return addGroup (projectItem, childIDs); | |||
| return addGroup (projectItem, childIDs, groupID); | |||
| } | |||
| else | |||
| { | |||
| if (projectItem.shouldBeAddedToTargetProject()) | |||
| { | |||
| const RelativePath path (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder); | |||
| return addFile (path, projectItem.shouldBeCompiled(), false); | |||
| return addFile (path, projectItem.shouldBeCompiled(), inhibitWarnings); | |||
| } | |||
| } | |||
| @@ -881,22 +832,7 @@ private: | |||
| groups.add (v); | |||
| } | |||
| String createGroup (const Array<RelativePath>& files, const String& groupName, const String& groupIDName, bool inhibitWarnings) | |||
| { | |||
| StringArray fileIDs; | |||
| for (int i = 0; i < files.size(); ++i) | |||
| { | |||
| addFile (files.getReference(i), shouldFileBeCompiledByDefault (files.getReference(i)), inhibitWarnings); | |||
| fileIDs.add (createID (files.getReference(i))); | |||
| } | |||
| const String groupID (createID (groupIDName)); | |||
| addGroup (groupID, groupName, fileIDs); | |||
| return groupID; | |||
| } | |||
| String addGroup (const Project::Item& item, StringArray& childIDs) | |||
| String addGroup (const Project::Item& item, StringArray& childIDs, String groupID) | |||
| { | |||
| String groupName (item.getName().toString()); | |||
| @@ -904,18 +840,17 @@ private: | |||
| { | |||
| groupName = "Source"; | |||
| // Add 'Juce Library Code' group | |||
| if (juceWrapperFiles.size() > 0) | |||
| childIDs.add (createGroup (juceWrapperFiles, project.getJuceCodeGroupName(), "__jucelibfiles", false)); | |||
| if (libraryFilesGroup.getNumChildren() > 0) | |||
| childIDs.add (addProjectItem (libraryFilesGroup, createID ("__jucelibfiles"), false)); | |||
| if (isVST()) | |||
| childIDs.add (createGroup (getVSTFilesRequired(), "Juce VST Wrapper", "__jucevstfiles", false)); | |||
| childIDs.add (addProjectItem (createVSTGroup (true), createID ("__jucevstfiles"), false)); | |||
| if (isAU()) | |||
| childIDs.add (createAUWrappersGroup()); | |||
| if (isRTAS()) | |||
| childIDs.add (createGroup (getRTASFilesRequired(), "Juce RTAS Wrapper", "__jucertasfiles", true)); | |||
| childIDs.add (addProjectItem (createRTASGroup (true), createID ("__jucertasfiles"), true)); | |||
| { // Add 'resources' group | |||
| String resourcesGroupID (createID ("__resources")); | |||
| @@ -938,7 +873,9 @@ private: | |||
| } | |||
| } | |||
| String groupID (getIDForGroup (item)); | |||
| if (groupID.isEmpty()) | |||
| groupID = getIDForGroup (item); | |||
| addGroup (groupID, groupName, childIDs); | |||
| return groupID; | |||
| } | |||
| @@ -1105,26 +1042,6 @@ private: | |||
| } | |||
| //============================================================================== | |||
| const Array<RelativePath> getRTASFilesRequired() const | |||
| { | |||
| Array<RelativePath> s; | |||
| if (isRTAS()) | |||
| { | |||
| const char* files[] = { JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode1.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode2.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode3.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode_Header.h", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_MacResources.r", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_MacUtilities.mm", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_Wrapper.cpp" }; | |||
| for (int i = 0; i < numElementsInArray (files); ++i) | |||
| s.add (getJucePathFromTargetFolder().getChildFile (files[i])); | |||
| } | |||
| return s; | |||
| } | |||
| String createAUWrappersGroup() | |||
| { | |||
| Array<RelativePath> auWrappers; | |||
| @@ -1135,56 +1052,59 @@ private: | |||
| for (i = 0; i < numElementsInArray (files); ++i) | |||
| auWrappers.add (getJucePathFromTargetFolder().getChildFile (files[i])); | |||
| const char* appleAUFiles[] = { "Extras/CoreAudio/PublicUtility/CADebugMacros.h", | |||
| "Extras/CoreAudio/PublicUtility/CAAUParameter.cpp", | |||
| "Extras/CoreAudio/PublicUtility/CAAUParameter.h", | |||
| "Extras/CoreAudio/PublicUtility/CAAudioChannelLayout.cpp", | |||
| "Extras/CoreAudio/PublicUtility/CAAudioChannelLayout.h", | |||
| "Extras/CoreAudio/PublicUtility/CAMutex.cpp", | |||
| "Extras/CoreAudio/PublicUtility/CAMutex.h", | |||
| "Extras/CoreAudio/PublicUtility/CAStreamBasicDescription.cpp", | |||
| "Extras/CoreAudio/PublicUtility/CAStreamBasicDescription.h", | |||
| "Extras/CoreAudio/PublicUtility/CAVectorUnitTypes.h", | |||
| "Extras/CoreAudio/PublicUtility/CAVectorUnit.cpp", | |||
| "Extras/CoreAudio/PublicUtility/CAVectorUnit.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUViewBase/AUViewLocalizedStringKeys.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewDispatch.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewControl.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewControl.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/CarbonEventHandler.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/CarbonEventHandler.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUInputElement.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUInputElement.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUResources.r", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUOutputBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUOutputBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUEffectBase.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUEffectBase.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBuffer.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBuffer.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUDebugDispatcher.cpp", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUDebugDispatcher.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUInputFormatConverter.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUSilentTimeout.h", | |||
| "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUTimestampGenerator.h" }; | |||
| #define JUCE_AU_PUBLICUTILITY "Extras/CoreAudio/PublicUtility/" | |||
| #define JUCE_AU_PUBLIC "Extras/CoreAudio/AudioUnits/AUPublic/" | |||
| const char* appleAUFiles[] = { JUCE_AU_PUBLICUTILITY "CADebugMacros.h", | |||
| JUCE_AU_PUBLICUTILITY "CAAUParameter.cpp", | |||
| JUCE_AU_PUBLICUTILITY "CAAUParameter.h", | |||
| JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.cpp", | |||
| JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.h", | |||
| JUCE_AU_PUBLICUTILITY "CAMutex.cpp", | |||
| JUCE_AU_PUBLICUTILITY "CAMutex.h", | |||
| JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.cpp", | |||
| JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.h", | |||
| JUCE_AU_PUBLICUTILITY "CAVectorUnitTypes.h", | |||
| JUCE_AU_PUBLICUTILITY "CAVectorUnit.cpp", | |||
| JUCE_AU_PUBLICUTILITY "CAVectorUnit.h", | |||
| JUCE_AU_PUBLIC "AUViewBase/AUViewLocalizedStringKeys.h", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewDispatch.cpp", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.cpp", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.h", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.cpp", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.h", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.cpp", | |||
| JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.h", | |||
| JUCE_AU_PUBLIC "AUBase/AUBase.cpp", | |||
| JUCE_AU_PUBLIC "AUBase/AUBase.h", | |||
| JUCE_AU_PUBLIC "AUBase/AUDispatch.cpp", | |||
| JUCE_AU_PUBLIC "AUBase/AUDispatch.h", | |||
| JUCE_AU_PUBLIC "AUBase/AUInputElement.cpp", | |||
| JUCE_AU_PUBLIC "AUBase/AUInputElement.h", | |||
| JUCE_AU_PUBLIC "AUBase/AUOutputElement.cpp", | |||
| JUCE_AU_PUBLIC "AUBase/AUOutputElement.h", | |||
| JUCE_AU_PUBLIC "AUBase/AUResources.r", | |||
| JUCE_AU_PUBLIC "AUBase/AUScopeElement.cpp", | |||
| JUCE_AU_PUBLIC "AUBase/AUScopeElement.h", | |||
| JUCE_AU_PUBLIC "AUBase/ComponentBase.cpp", | |||
| JUCE_AU_PUBLIC "AUBase/ComponentBase.h", | |||
| JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.cpp", | |||
| JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.h", | |||
| JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.cpp", | |||
| JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.h", | |||
| JUCE_AU_PUBLIC "OtherBases/AUOutputBase.cpp", | |||
| JUCE_AU_PUBLIC "OtherBases/AUOutputBase.h", | |||
| JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.cpp", | |||
| JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.h", | |||
| JUCE_AU_PUBLIC "OtherBases/AUEffectBase.cpp", | |||
| JUCE_AU_PUBLIC "OtherBases/AUEffectBase.h", | |||
| JUCE_AU_PUBLIC "Utility/AUBuffer.cpp", | |||
| JUCE_AU_PUBLIC "Utility/AUBuffer.h", | |||
| JUCE_AU_PUBLIC "Utility/AUDebugDispatcher.cpp", | |||
| JUCE_AU_PUBLIC "Utility/AUDebugDispatcher.h", | |||
| JUCE_AU_PUBLIC "Utility/AUInputFormatConverter.h", | |||
| JUCE_AU_PUBLIC "Utility/AUSilentTimeout.h", | |||
| JUCE_AU_PUBLIC "Utility/AUTimestampGenerator.h" }; | |||
| StringArray fileIDs, appleFileIDs; | |||
| @@ -32,7 +32,9 @@ | |||
| //============================================================================== | |||
| ProjectExporter::ProjectExporter (Project& project_, const ValueTree& settings_) | |||
| : project (project_), settings (settings_) | |||
| : libraryFilesGroup (Project::Item::createGroup (project_, project_.getJuceCodeGroupName())), | |||
| project (project_), | |||
| settings (settings_) | |||
| { | |||
| } | |||
| @@ -66,14 +68,14 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int | |||
| switch (index) | |||
| { | |||
| case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (false)), false); break; | |||
| case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (true)), true); break; | |||
| case 2: exp = new MSVCProjectExporterVC6 (project, ValueTree (MSVCProjectExporterVC6::getValueTreeTypeName())); break; | |||
| case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (false)), false); break; | |||
| case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (true)), true); break; | |||
| case 2: exp = new MSVCProjectExporterVC6 (project, ValueTree (MSVCProjectExporterVC6::getValueTreeTypeName())); break; | |||
| case 3: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break; | |||
| case 4: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break; | |||
| case 5: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break; | |||
| case 6: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter::getValueTreeTypeName())); break; | |||
| case 7: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter::getValueTreeTypeName())); break; | |||
| case 6: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter::getValueTreeTypeName())); break; | |||
| case 7: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter::getValueTreeTypeName())); break; | |||
| default: jassertfalse; return 0; | |||
| } | |||
| @@ -150,9 +152,14 @@ String ProjectExporter::getIncludePathForFileInJuceFolder (const String& pathFro | |||
| } | |||
| } | |||
| RelativePath ProjectExporter::getJucePathFromProjectFolder() const | |||
| { | |||
| return RelativePath (getJuceFolder().toString(), RelativePath::projectFolder); | |||
| } | |||
| RelativePath ProjectExporter::getJucePathFromTargetFolder() const | |||
| { | |||
| return rebaseFromProjectFolderToBuildTarget (RelativePath (getJuceFolder().toString(), RelativePath::projectFolder)); | |||
| return rebaseFromProjectFolderToBuildTarget (getJucePathFromProjectFolder()); | |||
| } | |||
| RelativePath ProjectExporter::rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const | |||
| @@ -173,20 +180,7 @@ void ProjectExporter::createPropertyEditors (Array <PropertyComponent*>& props) | |||
| props.add (new TextPropertyComponent (getJuceFolder(), "Juce Location", 1024, false)); | |||
| props.getLast()->setTooltip ("The location of the Juce library folder that the " + name + " project will use to when compiling. This can be an absolute path, or relative to the jucer project folder, but it must be valid on the filesystem of the machine you use to actually do the compiling."); | |||
| if (project.getProjectType().isAudioPlugin()) | |||
| { | |||
| if (project.shouldAddVSTFolderToPath()) | |||
| { | |||
| props.add (new TextPropertyComponent (getVSTFolder(), "VST Folder", 1024, false)); | |||
| props.getLast()->setTooltip ("If you're building a VST, this must be the folder containing the VST SDK. This should be an absolute path."); | |||
| } | |||
| if (isRTAS()) | |||
| { | |||
| props.add (new TextPropertyComponent (getRTASFolder(), "RTAS Folder", 1024, false)); | |||
| props.getLast()->setTooltip ("If you're building an RTAS, this must be the folder containing the RTAS SDK. This should be an absolute path."); | |||
| } | |||
| } | |||
| project.getProjectType().createPropertyEditors (*this, props); | |||
| props.add (new TextPropertyComponent (getExporterPreprocessorDefs(), "Extra Preprocessor Definitions", 32768, false)); | |||
| props.getLast()->setTooltip ("Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
| @@ -197,19 +191,47 @@ void ProjectExporter::createPropertyEditors (Array <PropertyComponent*>& props) | |||
| props.getLast()->setTooltip ("Extra command-line flags to be passed to the linker. You might want to use this for adding additional libraries. This string can contain references to preprocessor definitions in the form ${NAME_OF_VALUE}, which will be replaced with their values."); | |||
| } | |||
| const Array<RelativePath> ProjectExporter::getVSTFilesRequired() const | |||
| Project::Item ProjectExporter::createVSTGroup (bool forOSX) const | |||
| { | |||
| Array<RelativePath> s; | |||
| if (isVST()) | |||
| { | |||
| const char* files[] = { JUCE_PLUGINS_PATH_VST "juce_VST_Wrapper.cpp", | |||
| JUCE_PLUGINS_PATH_VST "juce_VST_Wrapper.mm" }; | |||
| jassert (isVST()); | |||
| for (int i = 0; i < numElementsInArray (files); ++i) | |||
| s.add (getJucePathFromTargetFolder().getChildFile (files[i])); | |||
| } | |||
| Project::Item group (Project::Item::createGroup (project, "Juce VST Wrapper")); | |||
| return s; | |||
| const char* osxFiles[] = { JUCE_PLUGINS_PATH_VST "juce_VST_Wrapper.cpp", | |||
| JUCE_PLUGINS_PATH_VST "juce_VST_Wrapper.mm", 0 }; | |||
| const char* winFiles[] = { JUCE_PLUGINS_PATH_VST "juce_VST_Wrapper.cpp", 0}; | |||
| for (const char** f = (forOSX ? osxFiles : winFiles); *f != 0; ++f) | |||
| group.addRelativeFile (getJucePathFromProjectFolder().getChildFile (*f), -1); | |||
| return group; | |||
| } | |||
| Project::Item ProjectExporter::createRTASGroup (bool forOSX) const | |||
| { | |||
| jassert (isRTAS()); | |||
| Project::Item group (Project::Item::createGroup (project, "Juce RTAS Wrapper")); | |||
| const char* osxFiles[] = { JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode1.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode2.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode3.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode_Header.h", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_MacResources.r", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_MacUtilities.mm", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_Wrapper.cpp", 0 }; | |||
| const char* winFiles[] = { JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode1.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode2.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode3.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_DigiCode_Header.h", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_WinUtilities.cpp", | |||
| JUCE_PLUGINS_PATH_RTAS "juce_RTAS_Wrapper.cpp" , 0}; | |||
| for (const char** f = (forOSX ? osxFiles : winFiles); *f != 0; ++f) | |||
| group.addRelativeFile (getJucePathFromProjectFolder().getChildFile (*f), -1); | |||
| return group; | |||
| } | |||
| StringPairArray ProjectExporter::getAllPreprocessorDefs (const Project::BuildConfiguration& config) const | |||
| @@ -58,10 +58,17 @@ public: | |||
| virtual void create() = 0; // may throw a SaveError | |||
| virtual bool shouldFileBeCompiledByDefault (const RelativePath& path) const; | |||
| virtual bool isXcode() const { return false; } | |||
| virtual bool isVisualStudio() const { return false; } | |||
| virtual bool isLinux() const { return false; } | |||
| //============================================================================== | |||
| String getName() const { return name; } | |||
| File getTargetFolder() const; | |||
| Project& getProject() noexcept { return project; } | |||
| const Project& getProject() const noexcept { return project; } | |||
| const ValueTree& getSettings() const { return settings; } | |||
| Value getSetting (const Identifier& name_) const { return settings.getPropertyAsValue (name_, project.getUndoManagerFor (settings)); } | |||
| @@ -92,14 +99,15 @@ public: | |||
| // This adds the quotes, and may return angle-brackets, eg: <foo/bar.h> or normal quotes. | |||
| String getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const; | |||
| RelativePath rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const; | |||
| String getExporterIdentifierMacro() const | |||
| { | |||
| return "JUCER_" + settings.getType().toString() + "_" | |||
| + String::toHexString (settings [Ids::targetFolder].toString().hashCode()).toUpperCase(); | |||
| } | |||
| Array<RelativePath> juceWrapperFiles; | |||
| RelativePath juceWrapperFolder; | |||
| Project::Item libraryFilesGroup; | |||
| // An exception that can be thrown by the create() method. | |||
| class SaveError | |||
| @@ -115,6 +123,8 @@ public: | |||
| String message; | |||
| }; | |||
| Project::Item& getMainGroup(); | |||
| protected: | |||
| //============================================================================== | |||
| Project& project; | |||
| @@ -122,10 +132,12 @@ protected: | |||
| String name; | |||
| RelativePath getJucePathFromTargetFolder() const; | |||
| RelativePath getJucePathFromProjectFolder() const; | |||
| static String getDefaultBuildsRootFolder() { return "Builds/"; } | |||
| const Array<RelativePath> getVSTFilesRequired() const; | |||
| Project::Item createVSTGroup (bool forOSX) const; | |||
| Project::Item createRTASGroup (bool forOSX) const; | |||
| static String getLibbedFilename (String name) | |||
| { | |||
| @@ -136,8 +148,6 @@ protected: | |||
| return name; | |||
| } | |||
| RelativePath rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const; | |||
| //============================================================================== | |||
| static void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData) | |||
| { | |||
| @@ -106,7 +106,7 @@ private: | |||
| if (xml != nullptr) | |||
| { | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| { | |||
| MemoryOutputStream mo; | |||
| project.getProjectRoot().writeToStream (mo); | |||
| @@ -118,7 +118,7 @@ private: | |||
| // This bit just tests that ValueTree save/load works reliably.. Let me know if this asserts for you! | |||
| jassert (xml->isEquivalentTo (xml2, true)); | |||
| } | |||
| #endif | |||
| #endif | |||
| MemoryOutputStream mo; | |||
| xml->writeToStream (mo, String::empty); | |||
| @@ -480,19 +480,18 @@ private: | |||
| if (targetFolder.createDirectory()) | |||
| { | |||
| exporter->juceWrapperFolder = RelativePath (project.getWrapperFolder(), targetFolder, RelativePath::buildTargetFolder); | |||
| Project::Item& libraryFiles = exporter->libraryFilesGroup; | |||
| if (hasAppConfigFile) | |||
| exporter->juceWrapperFiles.add (RelativePath (appConfigFile, targetFolder, RelativePath::buildTargetFolder)); | |||
| libraryFiles.addFile (appConfigFile, -1); | |||
| if (hasAppHeaderFile) | |||
| exporter->juceWrapperFiles.add (RelativePath (juceHeaderFile, targetFolder, RelativePath::buildTargetFolder)); | |||
| libraryFiles.addFile (juceHeaderFile, -1); | |||
| if (hasResources) | |||
| { | |||
| exporter->juceWrapperFiles.add (RelativePath (binaryDataCpp, targetFolder, RelativePath::buildTargetFolder)); | |||
| exporter->juceWrapperFiles.add (RelativePath (binaryDataCpp, targetFolder, RelativePath::buildTargetFolder) | |||
| .withFileExtension (".h")); | |||
| libraryFiles.addFile (binaryDataCpp, -1); | |||
| libraryFiles.addFile (binaryDataCpp.withFileExtension (".h"), -1); | |||
| } | |||
| if (numJuceSourceFiles > 0) | |||
| @@ -505,15 +504,15 @@ private: | |||
| if ((j == 0 && numJuceSourceFiles == 1) || (j != 0 && numJuceSourceFiles > 1)) | |||
| { | |||
| if (exporter->usesMMFiles()) | |||
| exporter->juceWrapperFiles.add (RelativePath (sourceWrapperMM, targetFolder, RelativePath::buildTargetFolder)); | |||
| libraryFiles.addFile (sourceWrapperMM, -1); | |||
| else | |||
| exporter->juceWrapperFiles.add (RelativePath (sourceWrapperCpp, targetFolder, RelativePath::buildTargetFolder)); | |||
| libraryFiles.addFile (sourceWrapperCpp, -1); | |||
| } | |||
| } | |||
| } | |||
| if (project.getProjectType().isAudioPlugin()) | |||
| exporter->juceWrapperFiles.add (RelativePath (pluginCharacteristicsFile, targetFolder, RelativePath::buildTargetFolder)); | |||
| libraryFiles.addFile (pluginCharacteristicsFile, -1); | |||
| try | |||
| { | |||
| @@ -24,6 +24,7 @@ | |||
| */ | |||
| #include "jucer_ProjectType.h" | |||
| #include "jucer_ProjectExporter.h" | |||
| //============================================================================== | |||
| static ProjectType_GUIApp guiType; | |||
| @@ -61,27 +62,174 @@ const ProjectType* ProjectType::findType (const String& typeCode) | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| Result ProjectType::createRequiredFiles (Project::Item& projectRoot, | |||
| Array<File>& filesCreated) const | |||
| { | |||
| return Result::ok(); | |||
| } | |||
| namespace | |||
| { | |||
| void addVSTFolderToPath (const ProjectExporter& exporter, StringArray& searchPaths) | |||
| { | |||
| const String vstFolder (exporter.getVSTFolder().toString()); | |||
| if (vstFolder.isNotEmpty()) | |||
| { | |||
| RelativePath path (exporter.rebaseFromProjectFolderToBuildTarget (RelativePath (vstFolder, RelativePath::projectFolder))); | |||
| if (exporter.isVisualStudio()) | |||
| searchPaths.add (path.toWindowsStyle()); | |||
| else if (exporter.isLinux() || exporter.isXcode()) | |||
| searchPaths.insert (0, path.toUnixStyle()); | |||
| } | |||
| } | |||
| void createVSTPathEditor (const ProjectExporter& exporter, Array <PropertyComponent*>& props) | |||
| { | |||
| props.add (new TextPropertyComponent (exporter.getVSTFolder(), "VST Folder", 1024, false)); | |||
| props.getLast()->setTooltip ("If you're building a VST, this must be the folder containing the VST SDK. This should be an absolute path."); | |||
| } | |||
| } | |||
| void ProjectType::addExtraSearchPaths (const ProjectExporter& exporter, StringArray& paths) const | |||
| { | |||
| if (exporter.getProject().isJuceConfigFlagEnabled ("JUCE_PLUGINHOST_VST")) | |||
| addVSTFolderToPath (exporter, paths); | |||
| } | |||
| void ProjectType::createPropertyEditors (const ProjectExporter& exporter, Array <PropertyComponent*>& props) const | |||
| { | |||
| if (exporter.getProject().isJuceConfigFlagEnabled ("JUCE_PLUGINHOST_VST")) | |||
| createVSTPathEditor (exporter, props); | |||
| } | |||
| //============================================================================== | |||
| Result ProjectType_GUIApp::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const | |||
| { | |||
| return Result::ok(); | |||
| return ProjectType::createRequiredFiles (projectRoot, filesCreated); | |||
| } | |||
| //============================================================================== | |||
| Result ProjectType_ConsoleApp::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const | |||
| { | |||
| return Result::ok(); | |||
| return ProjectType::createRequiredFiles (projectRoot, filesCreated); | |||
| } | |||
| //============================================================================== | |||
| Result ProjectType_StaticLibrary::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const | |||
| { | |||
| return Result::ok(); | |||
| return ProjectType::createRequiredFiles (projectRoot, filesCreated); | |||
| } | |||
| //============================================================================== | |||
| Result ProjectType_AudioPlugin::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const | |||
| { | |||
| return Result::ok(); | |||
| return ProjectType::createRequiredFiles (projectRoot, filesCreated); | |||
| } | |||
| void ProjectType_AudioPlugin::createPropertyEditors (const ProjectExporter& exporter, Array <PropertyComponent*>& props) const | |||
| { | |||
| if (exporter.isVST()) | |||
| createVSTPathEditor (exporter, props); | |||
| if (exporter.isRTAS()) | |||
| { | |||
| props.add (new TextPropertyComponent (exporter.getRTASFolder(), "RTAS Folder", 1024, false)); | |||
| props.getLast()->setTooltip ("If you're building an RTAS, this must be the folder containing the RTAS SDK. This should be an absolute path."); | |||
| } | |||
| } | |||
| void ProjectType_AudioPlugin::addExtraSearchPaths (const ProjectExporter& exporter, StringArray& searchPaths) const | |||
| { | |||
| const Project& project = exporter.getProject(); | |||
| RelativePath juceWrapperFolder (project.getWrapperFolder(), exporter.getTargetFolder(), RelativePath::buildTargetFolder); | |||
| if (exporter.isVST()) | |||
| addVSTFolderToPath (exporter, searchPaths); | |||
| if (exporter.isVisualStudio()) | |||
| searchPaths.add (juceWrapperFolder.toWindowsStyle()); | |||
| else if (exporter.isLinux() && exporter.isVST()) | |||
| searchPaths.insert (0, juceWrapperFolder.toUnixStyle()); | |||
| if (exporter.isAU() && exporter.isXcode()) | |||
| { | |||
| searchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/PublicUtility"); | |||
| searchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/Utility"); | |||
| } | |||
| if (exporter.isRTAS()) | |||
| { | |||
| RelativePath sdkFolder (exporter.getRTASFolder().toString(), RelativePath::projectFolder); | |||
| if (exporter.isVisualStudio()) | |||
| { | |||
| const char* paths[] = { "AlturaPorts/TDMPlugins/PluginLibrary/EffectClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses/Interfaces", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Utilities", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/RTASP_Adapt", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/CoreClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Controls", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Meters", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/ViewClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/DSPClasses", | |||
| "AlturaPorts/TDMPlugins/PluginLibrary/Interfaces", | |||
| "AlturaPorts/TDMPlugins/common", | |||
| "AlturaPorts/TDMPlugins/common/Platform", | |||
| "AlturaPorts/TDMPlugins/SignalProcessing/Public", | |||
| "AlturaPorts/TDMPlugIns/DSPManager/Interfaces", | |||
| "AlturaPorts/SADriver/Interfaces", | |||
| "AlturaPorts/DigiPublic/Interfaces", | |||
| "AlturaPorts/Fic/Interfaces/DAEClient", | |||
| "AlturaPorts/NewFileLibs/Cmn", | |||
| "AlturaPorts/NewFileLibs/DOA", | |||
| "AlturaPorts/AlturaSource/PPC_H", | |||
| "AlturaPorts/AlturaSource/AppSupport", | |||
| "AvidCode/AVX2sdk/AVX/avx2/avx2sdk/inc", | |||
| "xplat/AVX/avx2/avx2sdk/inc" }; | |||
| for (int i = 0; i < numElementsInArray (paths); ++i) | |||
| searchPaths.add (exporter.rebaseFromProjectFolderToBuildTarget (sdkFolder.getChildFile (paths[i])).toWindowsStyle()); | |||
| } | |||
| else if (exporter.isXcode()) | |||
| { | |||
| searchPaths.add ("/Developer/Headers/FlatCarbon"); | |||
| const char* paths[] = { "AlturaPorts/TDMPlugIns/PlugInLibrary/Controls", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/CoreClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/DSPClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/Meters", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses/Interfaces", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/RTASP_Adapt", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/Utilities", | |||
| "AlturaPorts/TDMPlugIns/PlugInLibrary/ViewClasses", | |||
| "AlturaPorts/TDMPlugIns/DSPManager/**", | |||
| "AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption", | |||
| "AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions", | |||
| "AlturaPorts/TDMPlugIns/common", | |||
| "AlturaPorts/TDMPlugIns/common/PI_LibInterface", | |||
| "AlturaPorts/TDMPlugIns/PACEProtection/**", | |||
| "AlturaPorts/TDMPlugIns/SignalProcessing/**", | |||
| "AlturaPorts/OMS/Headers", | |||
| "AlturaPorts/Fic/Interfaces/**", | |||
| "AlturaPorts/Fic/Source/SignalNets", | |||
| "AlturaPorts/DSIPublicInterface/PublicHeaders", | |||
| "DAEWin/Include", | |||
| "AlturaPorts/DigiPublic/Interfaces", | |||
| "AlturaPorts/DigiPublic", | |||
| "AlturaPorts/NewFileLibs/DOA", | |||
| "AlturaPorts/NewFileLibs/Cmn", | |||
| "xplat/AVX/avx2/avx2sdk/inc", | |||
| "xplat/AVX/avx2/avx2sdk/utils" }; | |||
| for (int i = 0; i < numElementsInArray (paths); ++i) | |||
| searchPaths.add (exporter.rebaseFromProjectFolderToBuildTarget (sdkFolder.getChildFile (paths[i])).toUnixStyle()); | |||
| } | |||
| } | |||
| } | |||
| @@ -28,6 +28,7 @@ | |||
| #include "../jucer_Headers.h" | |||
| #include "jucer_Project.h" | |||
| class ProjectExporter; | |||
| //============================================================================== | |||
| @@ -51,8 +52,9 @@ public: | |||
| virtual bool isAudioPlugin() const { return false; } | |||
| virtual bool isBrowserPlugin() const { return false; } | |||
| virtual Result createRequiredFiles (Project::Item& projectRoot, | |||
| Array<File>& filesCreated) const = 0; | |||
| virtual Result createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const; | |||
| virtual void addExtraSearchPaths (const ProjectExporter& exporter, StringArray& paths) const; | |||
| virtual void createPropertyEditors (const ProjectExporter& exporter, Array <PropertyComponent*>& props) const; | |||
| protected: | |||
| ProjectType (const String& type, const String& desc); | |||
| @@ -100,11 +102,13 @@ public: | |||
| class ProjectType_AudioPlugin : public ProjectType | |||
| { | |||
| public: | |||
| static const char* getTypeName() noexcept { return "library"; } | |||
| static const char* getTypeName() noexcept { return "audioplug"; } | |||
| ProjectType_AudioPlugin() : ProjectType (getTypeName(), "Audio Plug-in") {} | |||
| bool isAudioPlugin() const { return true; } | |||
| Result createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const; | |||
| void addExtraSearchPaths (const ProjectExporter& exporter, StringArray& paths) const; | |||
| void createPropertyEditors (const ProjectExporter& exporter, Array <PropertyComponent*>& props) const; | |||
| }; | |||
| @@ -49,7 +49,7 @@ OBJECTS := \ | |||
| $(OBJDIR)/JuceLibraryCode2_683aaa00.o \ | |||
| $(OBJDIR)/JuceLibraryCode3_6848c181.o \ | |||
| $(OBJDIR)/JuceLibraryCode4_6856d902.o \ | |||
| $(OBJDIR)/juce_VST_Wrapper_f1303484.o \ | |||
| $(OBJDIR)/juce_VST_Wrapper_812bffb1.o \ | |||
| .PHONY: clean | |||
| @@ -96,7 +96,7 @@ $(OBJDIR)/JuceLibraryCode4_6856d902.o: ../../JuceLibraryCode/JuceLibraryCode4.cp | |||
| @echo "Compiling JuceLibraryCode4.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_VST_Wrapper_f1303484.o: ../../../../../../juce/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp | |||
| $(OBJDIR)/juce_VST_Wrapper_812bffb1.o: ../../../../../src/audio/plugin_client/VST/juce_VST_Wrapper.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_VST_Wrapper.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| @@ -26,8 +26,8 @@ | |||
| 9551342606A895BB5BA07F2E = { isa = PBXBuildFile; fileRef = 6AE52580AD24BD551DB99758; }; | |||
| A1E844C7D2636CC38585B429 = { isa = PBXBuildFile; fileRef = B31CFE8BBA103078E19D1B97; }; | |||
| BD7E5458BE2F33DBBF5AF834 = { isa = PBXBuildFile; fileRef = FD33B687C6FBA3ABC581AFD7; }; | |||
| CC853B9E0B1F2B01A3CBE51D = { isa = PBXBuildFile; fileRef = E57935A1B395EC0D476DADFC; }; | |||
| 2B0B523A4C3265DA5568C523 = { isa = PBXBuildFile; fileRef = 8FF96124366EA3FF2462CB5D; }; | |||
| 3DFA294CC79D06F066723396 = { isa = PBXBuildFile; fileRef = 94A977DEE6BE2081CA0213FE; }; | |||
| 7C5B1DFA35A2EA8DFB2A40C9 = { isa = PBXBuildFile; fileRef = 00E2C89A148A2491288DF242; }; | |||
| 37A5CEF9F9B523B2580D3C1E = { isa = PBXBuildFile; fileRef = A2C6C4FD1DCE5EFAA2163E5C; }; | |||
| EB107FBF3FCD101D37454F1E = { isa = PBXBuildFile; fileRef = 7BA88B94922B5480855DD012; }; | |||
| B7D2D2868983939B35532885 = { isa = PBXBuildFile; fileRef = 6C254919C15224D13FE6D174; settings = {COMPILER_FLAGS = "-w"; }; }; | |||
| @@ -79,8 +79,8 @@ | |||
| B31CFE8BBA103078E19D1B97 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode3.mm; path = ../../JuceLibraryCode/JuceLibraryCode3.mm; sourceTree = "SOURCE_ROOT"; }; | |||
| FD33B687C6FBA3ABC581AFD7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode4.mm; path = ../../JuceLibraryCode/JuceLibraryCode4.mm; sourceTree = "SOURCE_ROOT"; }; | |||
| DF8AD10F6B21858C3378B63F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JucePluginCharacteristics.h; path = ../../JuceLibraryCode/JucePluginCharacteristics.h; sourceTree = "SOURCE_ROOT"; }; | |||
| E57935A1B395EC0D476DADFC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_VST_Wrapper.cpp"; path = "../../../../../../juce/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| 8FF96124366EA3FF2462CB5D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_VST_Wrapper.mm"; path = "../../../../../../juce/src/audio/plugin_client/VST/juce_VST_Wrapper.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| 94A977DEE6BE2081CA0213FE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_VST_Wrapper.cpp"; path = "../../../../../src/audio/plugin_client/VST/juce_VST_Wrapper.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| 00E2C89A148A2491288DF242 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_VST_Wrapper.mm"; path = "../../../../../src/audio/plugin_client/VST/juce_VST_Wrapper.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| A2C6C4FD1DCE5EFAA2163E5C = { isa = PBXFileReference; lastKnownFileType = file.r; name = "juce_AU_Resources.r"; path = "../../../../../../juce/src/audio/plugin_client/AU/juce_AU_Resources.r"; sourceTree = "SOURCE_ROOT"; }; | |||
| 7BA88B94922B5480855DD012 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_AU_Wrapper.mm"; path = "../../../../../../juce/src/audio/plugin_client/AU/juce_AU_Wrapper.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| 70DC3C63DDDFB1C5A22A8C36 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CADebugMacros.h; path = Extras/CoreAudio/PublicUtility/CADebugMacros.h; sourceTree = "DEVELOPER_DIR"; }; | |||
| @@ -147,8 +147,8 @@ | |||
| FD33B687C6FBA3ABC581AFD7, | |||
| DF8AD10F6B21858C3378B63F ); name = "Juce Library Code"; sourceTree = "<group>"; }; | |||
| B7F037957C49AE7943C354C9 = { isa = PBXGroup; children = ( | |||
| E57935A1B395EC0D476DADFC, | |||
| 8FF96124366EA3FF2462CB5D ); name = "Juce VST Wrapper"; sourceTree = "<group>"; }; | |||
| 94A977DEE6BE2081CA0213FE, | |||
| 00E2C89A148A2491288DF242 ); name = "Juce VST Wrapper"; sourceTree = "<group>"; }; | |||
| 17A9711DC035377B969B90C2 = { isa = PBXGroup; children = ( | |||
| 70DC3C63DDDFB1C5A22A8C36, | |||
| 6C254919C15224D13FE6D174, | |||
| @@ -317,8 +317,8 @@ | |||
| 9551342606A895BB5BA07F2E, | |||
| A1E844C7D2636CC38585B429, | |||
| BD7E5458BE2F33DBBF5AF834, | |||
| CC853B9E0B1F2B01A3CBE51D, | |||
| 2B0B523A4C3265DA5568C523, | |||
| 3DFA294CC79D06F066723396, | |||
| 7C5B1DFA35A2EA8DFB2A40C9, | |||
| EB107FBF3FCD101D37454F1E, | |||
| B7D2D2868983939B35532885, | |||
| 3723101DD64447FE9A530323, | |||
| @@ -145,7 +145,7 @@ | |||
| <File RelativePath="..\..\JuceLibraryCode\JucePluginCharacteristics.h"/> | |||
| </Filter> | |||
| <Filter Name="Juce VST Wrapper"> | |||
| <File RelativePath="..\..\..\..\..\..\juce\src\audio\plugin_client\VST\juce_VST_Wrapper.cpp"/> | |||
| <File RelativePath="..\..\..\..\..\src\audio\plugin_client\VST\juce_VST_Wrapper.cpp"/> | |||
| </Filter> | |||
| </Files> | |||
| <Globals/> | |||
| @@ -145,7 +145,7 @@ | |||
| <File RelativePath="..\..\JuceLibraryCode\JucePluginCharacteristics.h"/> | |||
| </Filter> | |||
| <Filter Name="Juce VST Wrapper"> | |||
| <File RelativePath="..\..\..\..\..\..\juce\src\audio\plugin_client\VST\juce_VST_Wrapper.cpp"/> | |||
| <File RelativePath="..\..\..\..\..\src\audio\plugin_client\VST\juce_VST_Wrapper.cpp"/> | |||
| </Filter> | |||
| </Files> | |||
| <Globals/> | |||
| @@ -60,7 +60,7 @@ static int numDOWID = 0, numJuceSO = 0; | |||
| //============================================================================== | |||
| static void juceVarToVariant (const var& v, VARIANT& dest); | |||
| static const var variantTojuceVar (const VARIANT& v); | |||
| static var variantTojuceVar (const VARIANT& v); | |||
| //============================================================================== | |||
| // Takes care of the logic in invoking var methods from IDispatch callbacks. | |||
| @@ -389,7 +389,7 @@ void juceVarToVariant (const var& v, VARIANT& dest) | |||
| } | |||
| } | |||
| const var variantTojuceVar (const VARIANT& v) | |||
| var variantTojuceVar (const VARIANT& v) | |||
| { | |||
| if ((v.vt & VT_ARRAY) != 0) | |||
| { | |||
| @@ -460,7 +460,7 @@ public: | |||
| child->setBounds (0, 0, getWidth(), getHeight()); | |||
| } | |||
| const var getObject() { return child->getJavascriptObject(); } | |||
| var getObject() { return child->getJavascriptObject(); } | |||
| void setWindow (IOleInPlaceSite* site) | |||
| { | |||
| @@ -511,7 +511,7 @@ public: | |||
| site->OnInPlaceActivate(); | |||
| } | |||
| const String getBrowserURL() const | |||
| String getBrowserURL() const | |||
| { | |||
| if (browser == nullptr) | |||
| return String::empty; | |||
| @@ -531,14 +531,14 @@ private: | |||
| //============================================================================== | |||
| extern String browserVersionDesc; | |||
| static const String getExePath() | |||
| static String getExePath() | |||
| { | |||
| TCHAR moduleFile [2048] = { 0 }; | |||
| GetModuleFileName (0, moduleFile, 2048); | |||
| return moduleFile; | |||
| } | |||
| static const String getExeVersion (const String& exeFileName, const String& fieldName) | |||
| static String getExeVersion (const String& exeFileName, const String& fieldName) | |||
| { | |||
| String resultString; | |||
| DWORD pointlessWin32Variable; | |||
| @@ -821,7 +821,7 @@ extern "C" BOOL WINAPI DllMain (HANDLE instance, DWORD reason, LPVOID) | |||
| return TRUE; | |||
| } | |||
| static const String CLSIDToJuceString (REFCLSID clsid) | |||
| static String CLSIDToJuceString (REFCLSID clsid) | |||
| { | |||
| LPWSTR s = nullptr; | |||
| StringFromIID (clsid, &s); | |||
| @@ -866,7 +866,7 @@ STDAPI DllCanUnloadNow() | |||
| } | |||
| //============================================================================== | |||
| static const String makeLegalRegistryName (const String& s) | |||
| static String makeLegalRegistryName (const String& s) | |||
| { | |||
| return s.retainCharacters ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_."); | |||
| } | |||
| @@ -7,6 +7,7 @@ | |||
| objects = { | |||
| /* Begin PBXBuildFile section */ | |||
| 842C606C13C308A6008CA875 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 842C606B13C308A6008CA875 /* QuartzCore.framework */; }; | |||
| 846C10D40DE33F4D00E8CCE8 /* juce_LibrarySource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 846C10D30DE33F4D00E8CCE8 /* juce_LibrarySource.mm */; }; | |||
| 846C10ED0DE33FA100E8CCE8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10DF0DE33FA100E8CCE8 /* Cocoa.framework */; }; | |||
| 846C10EE0DE33FA100E8CCE8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */; }; | |||
| @@ -54,6 +55,7 @@ | |||
| /* Begin PBXFileReference section */ | |||
| 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | |||
| 842C606B13C308A6008CA875 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; }; | |||
| 846C10D20DE33F4D00E8CCE8 /* juce_AppConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = juce_AppConfig.h; path = ../../src/juce_AppConfig.h; sourceTree = SOURCE_ROOT; }; | |||
| 846C10D30DE33F4D00E8CCE8 /* juce_LibrarySource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_LibrarySource.mm; path = ../../src/juce_LibrarySource.mm; sourceTree = SOURCE_ROOT; }; | |||
| 846C10DF0DE33FA100E8CCE8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; | |||
| @@ -183,6 +185,7 @@ | |||
| 8497844B10355C840020003B /* CoreMIDI.framework in Frameworks */, | |||
| 8497845610355CE30020003B /* Carbon.framework in Frameworks */, | |||
| 8497863010355E320020003B /* IOKit.framework in Frameworks */, | |||
| 842C606C13C308A6008CA875 /* QuartzCore.framework in Frameworks */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -247,6 +250,7 @@ | |||
| 846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */, | |||
| 8497844A10355C840020003B /* CoreMIDI.framework */, | |||
| 8497839D10355C6A0020003B /* WebKit.framework */, | |||
| 842C606B13C308A6008CA875 /* QuartzCore.framework */, | |||
| ); | |||
| name = "External Frameworks and Libraries"; | |||
| sourceTree = "<group>"; | |||
| @@ -40489,7 +40489,7 @@ MessageListener::~MessageListener() | |||
| MessageManager::instance->messageListeners.removeValue (this); | |||
| } | |||
| void MessageListener::postMessage (Message* const message) const noexcept | |||
| void MessageListener::postMessage (Message* const message) const | |||
| { | |||
| message->messageRecipient = const_cast <MessageListener*> (this); | |||
| @@ -273798,6 +273798,13 @@ public: | |||
| fontRef = CGFontCreateWithFontName ((CFStringRef) fontName); | |||
| if (fontRef == 0) | |||
| { | |||
| // Sometimes, UIFont manages to handle names that CGFontCreateWithFontName fails on... | |||
| UIFont* uiFont = [UIFont fontWithName: fontName size: 12]; | |||
| fontRef = CGFontCreateWithFontName ((CFStringRef) uiFont.fontName); | |||
| } | |||
| const int ascender = abs (CGFontGetAscent (fontRef)); | |||
| const float totalHeight = ascender + abs (CGFontGetDescent (fontRef)); | |||
| ascent = ascender / totalHeight; | |||
| @@ -275120,6 +275127,7 @@ Image juce_loadWithCoreImage (InputStream& input) | |||
| } | |||
| #endif | |||
| #if JUCE_MAC | |||
| Image juce_createImageFromCIImage (CIImage* im, int w, int h) | |||
| { | |||
| CoreGraphicsImage* cgImage = new CoreGraphicsImage (Image::ARGB, w, h, false); | |||
| @@ -275130,6 +275138,7 @@ Image juce_createImageFromCIImage (CIImage* im, int w, int h) | |||
| return Image (cgImage); | |||
| } | |||
| #endif | |||
| #endif | |||
| @@ -279294,6 +279303,13 @@ public: | |||
| fontRef = CGFontCreateWithFontName ((CFStringRef) fontName); | |||
| if (fontRef == 0) | |||
| { | |||
| // Sometimes, UIFont manages to handle names that CGFontCreateWithFontName fails on... | |||
| UIFont* uiFont = [UIFont fontWithName: fontName size: 12]; | |||
| fontRef = CGFontCreateWithFontName ((CFStringRef) uiFont.fontName); | |||
| } | |||
| const int ascender = abs (CGFontGetAscent (fontRef)); | |||
| const float totalHeight = ascender + abs (CGFontGetDescent (fontRef)); | |||
| ascent = ascender / totalHeight; | |||
| @@ -280617,6 +280633,7 @@ Image juce_loadWithCoreImage (InputStream& input) | |||
| } | |||
| #endif | |||
| #if JUCE_MAC | |||
| Image juce_createImageFromCIImage (CIImage* im, int w, int h) | |||
| { | |||
| CoreGraphicsImage* cgImage = new CoreGraphicsImage (Image::ARGB, w, h, false); | |||
| @@ -280627,6 +280644,7 @@ Image juce_createImageFromCIImage (CIImage* im, int w, int h) | |||
| return Image (cgImage); | |||
| } | |||
| #endif | |||
| #endif | |||
| @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 54 | |||
| #define JUCE_BUILDNUMBER 15 | |||
| #define JUCE_BUILDNUMBER 16 | |||
| /** Current Juce version number. | |||
| @@ -33343,7 +33343,7 @@ public: | |||
| references to it after calling this method. | |||
| @see handleMessage | |||
| */ | |||
| void postMessage (Message* message) const noexcept; | |||
| void postMessage (Message* message) const; | |||
| /** Checks whether this MessageListener has been deleted. | |||
| @@ -33,7 +33,7 @@ | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 54 | |||
| #define JUCE_BUILDNUMBER 15 | |||
| #define JUCE_BUILDNUMBER 16 | |||
| /** Current Juce version number. | |||
| @@ -47,7 +47,7 @@ MessageListener::~MessageListener() | |||
| MessageManager::instance->messageListeners.removeValue (this); | |||
| } | |||
| void MessageListener::postMessage (Message* const message) const noexcept | |||
| void MessageListener::postMessage (Message* const message) const | |||
| { | |||
| message->messageRecipient = const_cast <MessageListener*> (this); | |||
| @@ -72,7 +72,7 @@ public: | |||
| references to it after calling this method. | |||
| @see handleMessage | |||
| */ | |||
| void postMessage (Message* message) const noexcept; | |||
| void postMessage (Message* message) const; | |||
| //============================================================================== | |||
| /** Checks whether this MessageListener has been deleted. | |||
| @@ -922,6 +922,7 @@ Image juce_loadWithCoreImage (InputStream& input) | |||
| } | |||
| #endif | |||
| #if JUCE_MAC | |||
| Image juce_createImageFromCIImage (CIImage* im, int w, int h) | |||
| { | |||
| CoreGraphicsImage* cgImage = new CoreGraphicsImage (Image::ARGB, w, h, false); | |||
| @@ -932,5 +933,6 @@ Image juce_createImageFromCIImage (CIImage* im, int w, int h) | |||
| return Image (cgImage); | |||
| } | |||
| #endif | |||
| #endif | |||
| @@ -336,6 +336,13 @@ public: | |||
| fontRef = CGFontCreateWithFontName ((CFStringRef) fontName); | |||
| if (fontRef == 0) | |||
| { | |||
| // Sometimes, UIFont manages to handle names that CGFontCreateWithFontName fails on... | |||
| UIFont* uiFont = [UIFont fontWithName: fontName size: 12]; | |||
| fontRef = CGFontCreateWithFontName ((CFStringRef) uiFont.fontName); | |||
| } | |||
| const int ascender = abs (CGFontGetAscent (fontRef)); | |||
| const float totalHeight = ascender + abs (CGFontGetDescent (fontRef)); | |||
| ascent = ascender / totalHeight; | |||