| @@ -87,6 +87,13 @@ public: | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| //============================================================================== | |||||
| void initialiseDependencyPathValues() override | |||||
| { | |||||
| sdkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidSDKPath), Ids::androidSDKPath, TargetOS::getThisOS()))); | |||||
| ndkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidNDKPath), Ids::androidNDKPath, TargetOS::getThisOS()))); | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| CachedValue<String> androidRepositories, androidDependencies, | CachedValue<String> androidRepositories, androidDependencies, | ||||
| androidScreenOrientation, androidActivityClass, androidActivitySubClassName, | androidScreenOrientation, androidActivityClass, androidActivitySubClassName, | ||||
| @@ -132,7 +139,6 @@ public: | |||||
| buildToolsVersion (settings, Ids::buildToolsVersion, nullptr, "26.0.0"), | buildToolsVersion (settings, Ids::buildToolsVersion, nullptr, "26.0.0"), | ||||
| AndroidExecutable (findAndroidExecutable()) | AndroidExecutable (findAndroidExecutable()) | ||||
| { | { | ||||
| initialiseDependencyPathValues(); | |||||
| name = getName(); | name = getName(); | ||||
| if (getTargetLocationString().isEmpty()) | if (getTargetLocationString().isEmpty()) | ||||
| @@ -872,12 +878,6 @@ private: | |||||
| return s + CodeHelpers::makeValidIdentifier (project.getProjectFilenameRoot(), false, true, false); | return s + CodeHelpers::makeValidIdentifier (project.getProjectFilenameRoot(), false, true, false); | ||||
| } | } | ||||
| void initialiseDependencyPathValues() | |||||
| { | |||||
| sdkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidSDKPath), Ids::androidSDKPath, TargetOS::getThisOS()))); | |||||
| ndkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidNDKPath), Ids::androidNDKPath, TargetOS::getThisOS()))); | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| void copyActivityJavaFiles (const OwnedArray<LibraryModule>& modules, const File& targetFolder, const String& package) const | void copyActivityJavaFiles (const OwnedArray<LibraryModule>& modules, const File& targetFolder, const String& package) const | ||||
| { | { | ||||
| @@ -91,8 +91,6 @@ public: | |||||
| if (getTargetLocationString().isEmpty()) | if (getTargetLocationString().isEmpty()) | ||||
| getTargetLocationValue() = getDefaultBuildsRootFolder() + getTargetFolderName (os); | getTargetLocationValue() = getDefaultBuildsRootFolder() + getTargetFolderName (os); | ||||
| initialiseDependencyPathValues(); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -177,6 +175,21 @@ public: | |||||
| jassert (targets.size() > 0); | jassert (targets.size() > 0); | ||||
| } | } | ||||
| //============================================================================== | |||||
| void initialiseDependencyPathValues() override | |||||
| { | |||||
| DependencyPathOS pathOS = isLinux() ? TargetOS::linux | |||||
| : TargetOS::windows; | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, pathOS))); | |||||
| if (! isLinux()) | |||||
| { | |||||
| aaxPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), Ids::aaxPath, pathOS))); | |||||
| rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), Ids::rtasPath, pathOS))); | |||||
| } | |||||
| } | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| class CodeBlocksBuildConfiguration : public BuildConfiguration | class CodeBlocksBuildConfiguration : public BuildConfiguration | ||||
| @@ -723,20 +736,6 @@ private: | |||||
| xml.createNewChildElement ("Add")->setAttribute (nm, value); | xml.createNewChildElement ("Add")->setAttribute (nm, value); | ||||
| } | } | ||||
| void initialiseDependencyPathValues() | |||||
| { | |||||
| DependencyPathOS pathOS = isLinux() ? TargetOS::linux | |||||
| : TargetOS::windows; | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, pathOS))); | |||||
| if (! isLinux()) | |||||
| { | |||||
| aaxPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), Ids::aaxPath, pathOS))); | |||||
| rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), Ids::rtasPath, pathOS))); | |||||
| } | |||||
| } | |||||
| CodeBlocksOS os; | CodeBlocksOS os; | ||||
| OwnedArray<CodeBlocksTarget> targets; | OwnedArray<CodeBlocksTarget> targets; | ||||
| @@ -34,8 +34,6 @@ public: | |||||
| getTargetLocationValue() = getDefaultBuildsRootFolder() + folderName; | getTargetLocationValue() = getDefaultBuildsRootFolder() + folderName; | ||||
| updateOldSettings(); | updateOldSettings(); | ||||
| initialiseDependencyPathValues(); | |||||
| } | } | ||||
| virtual int getVisualStudioVersion() const = 0; | virtual int getVisualStudioVersion() const = 0; | ||||
| @@ -132,6 +130,22 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | |||||
| void initialiseDependencyPathValues() override | |||||
| { | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), | |||||
| Ids::vst3Path, | |||||
| TargetOS::windows))); | |||||
| aaxPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), | |||||
| Ids::aaxPath, | |||||
| TargetOS::windows))); | |||||
| rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), | |||||
| Ids::rtasPath, | |||||
| TargetOS::windows))); | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| class MSVCBuildConfiguration : public BuildConfiguration | class MSVCBuildConfiguration : public BuildConfiguration | ||||
| { | { | ||||
| @@ -1698,21 +1712,6 @@ protected: | |||||
| : (".\\" + filename); | : (".\\" + filename); | ||||
| } | } | ||||
| void initialiseDependencyPathValues() | |||||
| { | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), | |||||
| Ids::vst3Path, | |||||
| TargetOS::windows))); | |||||
| aaxPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), | |||||
| Ids::aaxPath, | |||||
| TargetOS::windows))); | |||||
| rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), | |||||
| Ids::rtasPath, | |||||
| TargetOS::windows))); | |||||
| } | |||||
| static bool shouldUseStdCall (const RelativePath& path) | static bool shouldUseStdCall (const RelativePath& path) | ||||
| { | { | ||||
| return path.getFileNameWithoutExtension().startsWithIgnoreCase ("juce_audio_plugin_client_RTAS_"); | return path.getFileNameWithoutExtension().startsWithIgnoreCase ("juce_audio_plugin_client_RTAS_"); | ||||
| @@ -310,8 +310,6 @@ public: | |||||
| if (getTargetLocationString().isEmpty()) | if (getTargetLocationString().isEmpty()) | ||||
| getTargetLocationValue() = getDefaultBuildsRootFolder() + "LinuxMakefile"; | getTargetLocationValue() = getDefaultBuildsRootFolder() + "LinuxMakefile"; | ||||
| initialiseDependencyPathValues(); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -401,6 +399,14 @@ public: | |||||
| jassert (targets.size() > 0); | jassert (targets.size() > 0); | ||||
| } | } | ||||
| //============================================================================== | |||||
| void initialiseDependencyPathValues() override | |||||
| { | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), | |||||
| Ids::vst3Path, | |||||
| TargetOS::linux))); | |||||
| } | |||||
| private: | private: | ||||
| bool isWebBrowserComponentEnabled() const | bool isWebBrowserComponentEnabled() const | ||||
| { | { | ||||
| @@ -746,13 +752,6 @@ private: | |||||
| return phonyTargetLine.toString(); | return phonyTargetLine.toString(); | ||||
| } | } | ||||
| void initialiseDependencyPathValues() | |||||
| { | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), | |||||
| Ids::vst3Path, | |||||
| TargetOS::linux))); | |||||
| } | |||||
| OwnedArray<MakefileTarget> targets; | OwnedArray<MakefileTarget> targets; | ||||
| JUCE_DECLARE_NON_COPYABLE (MakefileProjectExporter) | JUCE_DECLARE_NON_COPYABLE (MakefileProjectExporter) | ||||
| @@ -61,8 +61,6 @@ public: | |||||
| if (getTargetLocationString().isEmpty()) | if (getTargetLocationString().isEmpty()) | ||||
| getTargetLocationValue() = getDefaultBuildsRootFolder() + (iOS ? "iOS" : "MacOSX"); | getTargetLocationValue() = getDefaultBuildsRootFolder() + (iOS ? "iOS" : "MacOSX"); | ||||
| initialiseDependencyPathValues(); | |||||
| if (iOS) | if (iOS) | ||||
| { | { | ||||
| if (getScreenOrientationValue().toString().isEmpty()) | if (getScreenOrientationValue().toString().isEmpty()) | ||||
| @@ -362,6 +360,14 @@ public: | |||||
| return (MD5 (getPostBuildScript().toUTF8()).toHexString() == "265ac212a7e734c5bbd6150e1eae18a1"); | return (MD5 (getPostBuildScript().toUTF8()).toHexString() == "265ac212a7e734c5bbd6150e1eae18a1"); | ||||
| } | } | ||||
| //============================================================================== | |||||
| void initialiseDependencyPathValues() override | |||||
| { | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, TargetOS::osx))); | |||||
| aaxPath. referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), Ids::aaxPath, TargetOS::osx))); | |||||
| rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), Ids::rtasPath, TargetOS::osx))); | |||||
| } | |||||
| protected: | protected: | ||||
| //============================================================================== | //============================================================================== | ||||
| class XcodeBuildConfiguration : public BuildConfiguration | class XcodeBuildConfiguration : public BuildConfiguration | ||||
| @@ -2865,12 +2871,5 @@ private: | |||||
| return getOSXVersionName (version) + " SDK"; | return getOSXVersionName (version) + " SDK"; | ||||
| } | } | ||||
| void initialiseDependencyPathValues() | |||||
| { | |||||
| vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, TargetOS::osx))); | |||||
| aaxPath. referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), Ids::aaxPath, TargetOS::osx))); | |||||
| rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), Ids::rtasPath, TargetOS::osx))); | |||||
| } | |||||
| JUCE_DECLARE_NON_COPYABLE (XCodeProjectExporter) | JUCE_DECLARE_NON_COPYABLE (XCodeProjectExporter) | ||||
| }; | }; | ||||
| @@ -500,7 +500,7 @@ String ProjectExporter::getPathForModuleString (const String& moduleID) const | |||||
| auto exporterPath = settings.getChildWithName (Ids::MODULEPATHS) | auto exporterPath = settings.getChildWithName (Ids::MODULEPATHS) | ||||
| .getChildWithProperty (Ids::ID, moduleID) [Ids::path].toString(); | .getChildWithProperty (Ids::ID, moduleID) [Ids::path].toString(); | ||||
| if (exporterPath.isEmpty() || project.getModules().shouldUseGlobalPath (moduleID).getValue()) | |||||
| if (exporterPath.isEmpty() || project.getModules().shouldUseGlobalPath (moduleID)) | |||||
| { | { | ||||
| auto id = EnabledModuleList::isJuceModule (moduleID) ? Ids::defaultJuceModulePath | auto id = EnabledModuleList::isJuceModule (moduleID) ? Ids::defaultJuceModulePath | ||||
| : Ids::defaultUserModulePath; | : Ids::defaultUserModulePath; | ||||
| @@ -81,6 +81,7 @@ public: | |||||
| virtual bool canCopeWithDuplicateFiles() = 0; | virtual bool canCopeWithDuplicateFiles() = 0; | ||||
| virtual bool supportsUserDefinedConfigurations() const = 0; // false if exporter only supports two configs Debug and Release | virtual bool supportsUserDefinedConfigurations() const = 0; // false if exporter only supports two configs Debug and Release | ||||
| virtual void updateDeprecatedProjectSettingsInteractively(); | virtual void updateDeprecatedProjectSettingsInteractively(); | ||||
| virtual void initialiseDependencyPathValues() {} | |||||
| // IDE targeted by exporter | // IDE targeted by exporter | ||||
| virtual bool isXcode() const = 0; | virtual bool isXcode() const = 0; | ||||
| @@ -674,6 +674,8 @@ private: | |||||
| if (specifiedExporterToSave.isNotEmpty() && exporter->getName() != specifiedExporterToSave) | if (specifiedExporterToSave.isNotEmpty() && exporter->getName() != specifiedExporterToSave) | ||||
| continue; | continue; | ||||
| exporter->initialiseDependencyPathValues(); | |||||
| if (exporter->getTargetFolder().createDirectory()) | if (exporter->getTargetFolder().createDirectory()) | ||||
| { | { | ||||
| exporter->copyMainGroupFromProject(); | exporter->copyMainGroupFromProject(); | ||||
| @@ -32,6 +32,7 @@ public: | |||||
| : project (p), exporter (e), configListTree (exporter->getConfigurations()), | : project (p), exporter (e), configListTree (exporter->getConfigurations()), | ||||
| exporterIndex (index) | exporterIndex (index) | ||||
| { | { | ||||
| exporter->initialiseDependencyPathValues(); | |||||
| configListTree.addListener (this); | configListTree.addListener (this); | ||||
| targetLocationValue.referTo (exporter->getTargetLocationValue()); | targetLocationValue.referTo (exporter->getTargetLocationValue()); | ||||
| targetLocationValue.addListener (this); | targetLocationValue.addListener (this); | ||||
| @@ -124,7 +124,6 @@ private: | |||||
| void refresh() | void refresh() | ||||
| { | { | ||||
| auto& modules = project.getModules(); | auto& modules = project.getModules(); | ||||
| const auto& isUsingGlobalPathValue = modules.shouldUseGlobalPath (moduleID); | |||||
| setEnabled (modules.isModuleEnabled (moduleID)); | setEnabled (modules.isModuleEnabled (moduleID)); | ||||
| @@ -158,11 +157,11 @@ private: | |||||
| "must be valid on the filesystem of the target machine that will be performing this build. If this " | "must be valid on the filesystem of the target machine that will be performing this build. If this " | ||||
| "is empty then the global path will be used."); | "is empty then the global path will be used."); | ||||
| pathComponent->setEnabled (! isUsingGlobalPathValue.getValue()); | |||||
| pathComponent->setEnabled (! modules.shouldUseGlobalPath (moduleID)); | |||||
| pathComponent->getValue().addListener (this); | pathComponent->getValue().addListener (this); | ||||
| } | } | ||||
| globalPathValue.referTo (isUsingGlobalPathValue); | |||||
| globalPathValue.referTo (modules.getShouldUseGlobalPathValue (moduleID)); | |||||
| auto menuItemString = (TargetOS::getThisOS() == TargetOS::osx ? "\"Projucer->Global Search Paths...\"" | auto menuItemString = (TargetOS::getThisOS() == TargetOS::osx ? "\"Projucer->Global Search Paths...\"" | ||||
| : "\"File->Global Search Paths...\""); | : "\"File->Global Search Paths...\""); | ||||
| @@ -222,7 +222,7 @@ static Array<File> getAllPossibleModulePathsFromExporters (Project& project) | |||||
| { | { | ||||
| auto id = modules.getModuleID (i); | auto id = modules.getModuleID (i); | ||||
| if (modules.shouldUseGlobalPath (id).getValue()) | |||||
| if (modules.shouldUseGlobalPath (id)) | |||||
| continue; | continue; | ||||
| const auto path = exporter->getPathForModuleString (id); | const auto path = exporter->getPathForModuleString (id); | ||||
| @@ -651,7 +651,13 @@ bool EnabledModuleList::isAudioPluginModuleMissing() const | |||||
| && ! isModuleEnabled ("juce_audio_plugin_client"); | && ! isModuleEnabled ("juce_audio_plugin_client"); | ||||
| } | } | ||||
| Value EnabledModuleList::shouldUseGlobalPath (const String& moduleID) const | |||||
| bool EnabledModuleList::shouldUseGlobalPath (const String& moduleID) const | |||||
| { | |||||
| return static_cast<bool> (state.getChildWithProperty (Ids::ID, moduleID) | |||||
| .getProperty (Ids::useGlobalPath)); | |||||
| } | |||||
| Value EnabledModuleList::getShouldUseGlobalPathValue (const String& moduleID) const | |||||
| { | { | ||||
| return state.getChildWithProperty (Ids::ID, moduleID) | return state.getChildWithProperty (Ids::ID, moduleID) | ||||
| .getPropertyAsValue (Ids::useGlobalPath, getUndoManager()); | .getPropertyAsValue (Ids::useGlobalPath, getUndoManager()); | ||||
| @@ -704,7 +710,7 @@ File EnabledModuleList::findUserModuleFolder (const String& possiblePaths, const | |||||
| File EnabledModuleList::getModuleFolder (const String& moduleID) | File EnabledModuleList::getModuleFolder (const String& moduleID) | ||||
| { | { | ||||
| if (shouldUseGlobalPath (moduleID).getValue()) | |||||
| if (shouldUseGlobalPath (moduleID)) | |||||
| { | { | ||||
| if (isJuceModule (moduleID)) | if (isJuceModule (moduleID)) | ||||
| return getModuleFolderFromPathIfItExists (getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString(), moduleID, project); | return getModuleFolderFromPathIfItExists (getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString(), moduleID, project); | ||||
| @@ -761,7 +767,7 @@ void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, b | |||||
| shouldShowAllModuleFilesInProject (moduleID) = true; | shouldShowAllModuleFilesInProject (moduleID) = true; | ||||
| shouldCopyModuleFilesLocally (moduleID) = copyLocally; | shouldCopyModuleFilesLocally (moduleID) = copyLocally; | ||||
| shouldUseGlobalPath (moduleID) = useGlobalPath; | |||||
| getShouldUseGlobalPathValue (moduleID) = useGlobalPath; | |||||
| RelativePath path (moduleFolder.getParentDirectory(), | RelativePath path (moduleFolder.getParentDirectory(), | ||||
| project.getProjectFolder(), RelativePath::projectFolder); | project.getProjectFolder(), RelativePath::projectFolder); | ||||
| @@ -842,7 +848,7 @@ bool EnabledModuleList::areMostModulesUsingGlobalPath() const | |||||
| for (auto i = getNumModules(); --i >= 0;) | for (auto i = getNumModules(); --i >= 0;) | ||||
| { | { | ||||
| if (shouldUseGlobalPath (getModuleID (i)).getValue()) | |||||
| if (shouldUseGlobalPath (getModuleID (i))) | |||||
| ++numYes; | ++numYes; | ||||
| else | else | ||||
| ++numNo; | ++numNo; | ||||
| @@ -144,7 +144,9 @@ public: | |||||
| bool isModuleEnabled (const String& moduleID) const; | bool isModuleEnabled (const String& moduleID) const; | ||||
| Value shouldUseGlobalPath (const String& moduleID) const; | |||||
| bool shouldUseGlobalPath (const String& moduleID) const; | |||||
| Value getShouldUseGlobalPathValue (const String& moduleID) const; | |||||
| Value shouldShowAllModuleFilesInProject (const String& moduleID); | Value shouldShowAllModuleFilesInProject (const String& moduleID); | ||||
| Value shouldCopyModuleFilesLocally (const String& moduleID) const; | Value shouldCopyModuleFilesLocally (const String& moduleID) const; | ||||
| @@ -142,7 +142,7 @@ public: | |||||
| //====================================================================== | //====================================================================== | ||||
| String pathText; | String pathText; | ||||
| if (project.getModules().shouldUseGlobalPath (moduleID).getValue()) | |||||
| if (project.getModules().shouldUseGlobalPath (moduleID)) | |||||
| { | { | ||||
| pathText = "Global"; | pathText = "Global"; | ||||
| } | } | ||||
| @@ -250,14 +250,14 @@ private: | |||||
| auto moduleIDs = moduleList.getAllModules(); | auto moduleIDs = moduleList.getAllModules(); | ||||
| for (auto id : moduleIDs) | for (auto id : moduleIDs) | ||||
| moduleList.shouldUseGlobalPath (id).setValue (enableGlobalPaths); | |||||
| moduleList.getShouldUseGlobalPathValue (id).setValue (enableGlobalPaths); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| auto selected = list.getSelectedRows(); | auto selected = list.getSelectedRows(); | ||||
| for (auto i = 0; i < selected.size(); ++i) | for (auto i = 0; i < selected.size(); ++i) | ||||
| moduleList.shouldUseGlobalPath (moduleList.getModuleID (selected[i])).setValue (enableGlobalPaths); | |||||
| moduleList.getShouldUseGlobalPathValue (moduleList.getModuleID (selected[i])).setValue (enableGlobalPaths); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||