From ff263ecded0d72cc0c273cd0b894197e400cd16e Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 4 Sep 2018 14:16:36 +0100 Subject: [PATCH] Projucer: Removed the per-exporter AAX and RTAS SDK and Android SDK/NDK path settings as well as the unused VST3 SDK setting as this was interfering with the embedded VST3 SDK path --- BREAKING-CHANGES.txt | 22 ++++++++++++++++ .../UI/Sidebar/jucer_ExporterTreeItems.h | 1 - .../jucer_ProjectExport_Android.h | 18 ++----------- .../ProjectSaving/jucer_ProjectExport_CLion.h | 1 - .../jucer_ProjectExport_CodeBlocks.h | 3 --- .../ProjectSaving/jucer_ProjectExport_MSVC.h | 26 ++++--------------- .../ProjectSaving/jucer_ProjectExport_Make.h | 8 ------ .../ProjectSaving/jucer_ProjectExport_Xcode.h | 16 +++--------- .../ProjectSaving/jucer_ProjectExporter.cpp | 25 +++--------------- .../ProjectSaving/jucer_ProjectExporter.h | 9 +++---- .../ProjectSaving/jucer_ProjectSaver.cpp | 2 -- 11 files changed, 38 insertions(+), 93 deletions(-) diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index 5a5c21954b..22ec71ae6f 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -4,6 +4,28 @@ JUCE breaking changes Develop ======= +Change +------ +The per-exporter AAX/RTAS/VST3 SDK and Android SDK/NDK path options have been +removed. + +Possible Issues +--------------- +Projects that previously used these fields to set the paths to the above SDKs +may no longer build. + +Workaround +---------- +Use the Projucer's global paths settings to point to the location of these +SDKs, either by opening the "Projucer/File->Global Paths..." menu item or using +the "--set-global-search-path" command-line option. + +Rationale +--------- +Having multiple places where SDK paths could be set was confusing and +could interfere with the embedded VST3 SDK path in some cases. + + Change ------ SystemStats::getDeviceDescription() will now return the device code on iOS e.g. diff --git a/extras/Projucer/Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h b/extras/Projucer/Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h index c574ad7515..707801d91e 100644 --- a/extras/Projucer/Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h +++ b/extras/Projucer/Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h @@ -36,7 +36,6 @@ public: : project (p), exporter (e), configListTree (exporter->getConfigurations()), exporterIndex (index) { - exporter->initialiseDependencyPathValues(); configListTree.addListener (this); targetLocationValue.referTo (exporter->getTargetLocationValue()); targetLocationValue.addListener (this); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h index cb1bb7e43e..4fe0d425a0 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h @@ -92,13 +92,6 @@ public: 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()))); - } - //============================================================================== ValueWithDefault androidJavaLibs, androidRepositories, androidDependencies, androidScreenOrientation, androidActivityClass, androidActivitySubClassName, androidActivityBaseClassName, androidManifestCustomXmlElements, androidVersionCode, @@ -823,8 +816,8 @@ private: { String props; - props << "ndk.dir=" << sanitisePath (ndkPath.toString()) << newLine - << "sdk.dir=" << sanitisePath (sdkPath.toString()) << newLine; + props << "ndk.dir=" << sanitisePath (getAppSettings().getStoredPath (Ids::androidNDKPath).toString()) << newLine + << "sdk.dir=" << sanitisePath (getAppSettings().getStoredPath (Ids::androidSDKPath).toString()) << newLine; return props; } @@ -876,12 +869,6 @@ private: props.add (new TextPropertyComponent (androidVersionCode, "Android Version Code", 32, false), "An integer value that represents the version of the application code, relative to other versions."); - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), sdkPath, "Android SDK Path"), - "The path to the Android SDK folder on the target build machine"); - - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), ndkPath, "Android NDK Path"), - "The path to the Android NDK folder on the target build machine"); - props.add (new TextPropertyComponent (androidMinimumSDK, "Minimum SDK version", 32, false), "The number of the minimum version of the Android SDK that the app requires"); @@ -2015,7 +2002,6 @@ private: } //============================================================================== - Value sdkPath, ndkPath; const File AndroidExecutable; JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h index 4de53e7dd0..9e56c8fdd2 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h @@ -101,7 +101,6 @@ public: bool supportsTargetType (ProjectType::Target::Type) const override { return true; } void addPlatformSpecificSettingsForProjectType (const ProjectType&) override {} - void initialiseDependencyPathValues() override {} //============================================================================== bool canLaunchProject() override diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h index 7e8dcd2684..a3ca3500c2 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h @@ -180,9 +180,6 @@ public: jassert (targets.size() > 0); } - //============================================================================== - void initialiseDependencyPathValues() override {} - private: ValueWithDefault targetPlatformValue; diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h index 1af1f10a60..17b4c6dd31 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h @@ -118,22 +118,6 @@ 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, private Value::Listener @@ -1061,7 +1045,7 @@ public: //============================================================================== RelativePath getAAXIconFile() const { - RelativePath aaxSDK (getOwner().getAAXPathValue().toString(), RelativePath::projectFolder); + RelativePath aaxSDK (owner.getGlobalAAXPathString(), RelativePath::projectFolder); RelativePath projectIcon ("icon.ico", RelativePath::buildTargetFolder); if (getOwner().getTargetFolder().getChildFile ("icon.ico").existsAsFile()) @@ -1076,7 +1060,7 @@ public: { if (type == AAXPlugIn) { - RelativePath aaxSDK (getOwner().getAAXPathValue().toString(), RelativePath::projectFolder); + RelativePath aaxSDK (owner.getGlobalAAXPathString(), RelativePath::projectFolder); RelativePath aaxLibsFolder = aaxSDK.getChildFile ("Libs"); RelativePath bundleScript = aaxSDK.getChildFile ("Utilities").getChildFile ("CreatePackage.bat"); RelativePath iconFilePath = getAAXIconFile(); @@ -1167,13 +1151,13 @@ public: { case AAXPlugIn: { - auto aaxLibsFolder = RelativePath (getOwner().getAAXPathValue().toString(), RelativePath::projectFolder).getChildFile ("Libs"); + auto aaxLibsFolder = RelativePath (owner.getGlobalAAXPathString(), RelativePath::projectFolder).getChildFile ("Libs"); defines.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder)); } break; case RTASPlugIn: { - RelativePath rtasFolder (getOwner().getRTASPathValue().toString(), RelativePath::projectFolder); + RelativePath rtasFolder (owner.getGlobalRTASPathString(), RelativePath::projectFolder); defines.set ("JucePlugin_WinBag_path", createRebasedPath (rtasFolder.getChildFile ("WinBag"))); } break; @@ -1195,7 +1179,7 @@ public: StringArray searchPaths; if (type == RTASPlugIn) { - RelativePath rtasFolder (getOwner().getRTASPathValue().toString(), RelativePath::projectFolder); + RelativePath rtasFolder (owner.getGlobalRTASPathString(), RelativePath::projectFolder); static const char* p[] = { "AlturaPorts/TDMPlugins/PluginLibrary/EffectClasses", "AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses", diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h index e86d58141b..560fa2b53d 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h @@ -421,14 +421,6 @@ public: jassert (targets.size() > 0); } - //============================================================================== - void initialiseDependencyPathValues() override - { - vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), - Ids::vst3Path, - TargetOS::linux))); - } - private: ValueWithDefault extraPkgConfigValue; diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index f3e37834d3..d256f172d1 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -424,14 +424,6 @@ public: 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: //============================================================================== class XcodeBuildConfiguration : public BuildConfiguration @@ -1630,9 +1622,7 @@ public: { if (type == AAXPlugIn) { - auto aaxLibsFolder - = RelativePath (owner.getAAXPathValue().toString(), RelativePath::projectFolder) - .getChildFile ("Libs"); + auto aaxLibsFolder = RelativePath (owner.getGlobalAAXPathString(), RelativePath::projectFolder).getChildFile ("Libs"); String libraryPath (config.isDebug() ? "Debug" : "Release"); libraryPath += "/libAAXLibrary_libcpp.a"; @@ -1641,7 +1631,7 @@ public: } else if (type == RTASPlugIn) { - RelativePath rtasFolder (owner.getRTASPathValue().toString(), RelativePath::projectFolder); + RelativePath rtasFolder (owner.getGlobalRTASPathString(), RelativePath::projectFolder); extraLibs.add (rtasFolder.getChildFile ("MacBag/Libs/Debug/libPluginLibrary.a")); extraLibs.add (rtasFolder.getChildFile ("MacBag/Libs/Release/libPluginLibrary.a")); @@ -1654,7 +1644,7 @@ public: if (type == RTASPlugIn) { - RelativePath rtasFolder (owner.getRTASPathValue().toString(), RelativePath::projectFolder); + RelativePath rtasFolder (owner.getGlobalRTASPathString(), RelativePath::projectFolder); targetExtraSearchPaths.add ("$(DEVELOPER_DIR)/Headers/FlatCarbon"); targetExtraSearchPaths.add ("$(SDKROOT)/Developer/Headers/FlatCarbon"); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp index 485b81f803..40c0f8b418 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp @@ -296,8 +296,6 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props) "The location of the folder in which the " + name + " project will be created. " "This path can be absolute, but it's much more sensible to make it relative to the jucer project directory."); - createDependencyPathProperties (props); - props.add (new TextPropertyComponent (extraPPDefsValue, "Extra Preprocessor Definitions", 32768, true), "Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, " "or new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash."); @@ -327,23 +325,6 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props) "Extra comments: This field is not used for code or project generation, it's just a space where you can express your thoughts."); } -void ProjectExporter::createDependencyPathProperties (PropertyListBuilder& props) -{ - if (shouldBuildTargetType (ProjectType::Target::AAXPlugIn) && project.shouldBuildAAX()) - { - if (dynamic_cast (&getAAXPathValue().getValueSource()) != nullptr) - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getAAXPathValue(), "AAX SDK Folder"), - "If you're building an AAX plugin, this must be the folder containing the AAX SDK. This can be an absolute path, or a path relative to the Projucer project file."); - } - - if (shouldBuildTargetType (ProjectType::Target::RTASPlugIn) && project.shouldBuildRTAS()) - { - if (dynamic_cast (&getRTASPathValue().getValueSource()) != nullptr) - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getRTASPathValue(), "RTAS SDK Folder"), - "If you're building an RTAS, this must be the folder containing the RTAS SDK. This can be an absolute path, or a path relative to the Projucer project file."); - } -} - void ProjectExporter::createIconProperties (PropertyListBuilder& props) { OwnedArray images; @@ -403,7 +384,7 @@ RelativePath ProjectExporter::getInternalVST3SDKPath() void ProjectExporter::addVST3FolderToPath() { - auto vst3Folder = getVST3PathValue().toString(); + auto vst3Folder = getGlobalVST3PathString(); if (vst3Folder.isNotEmpty()) addToExtraSearchPaths (RelativePath (vst3Folder, RelativePath::projectFolder), 0); @@ -413,11 +394,11 @@ void ProjectExporter::addVST3FolderToPath() void ProjectExporter::addAAXFoldersToPath() { - auto aaxFolder = getAAXPathValue().toString(); + auto aaxFolder = getGlobalAAXPathString(); if (aaxFolder.isNotEmpty()) { - RelativePath aaxFolderPath (getAAXPathValue().toString(), RelativePath::projectFolder); + RelativePath aaxFolderPath (aaxFolder, RelativePath::projectFolder); addToExtraSearchPaths (aaxFolderPath); addToExtraSearchPaths (aaxFolderPath.getChildFile ("Interfaces")); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h index 89a32e35b7..00ca39d7ce 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h @@ -83,7 +83,6 @@ public: virtual bool canCopeWithDuplicateFiles() = 0; virtual bool supportsUserDefinedConfigurations() const = 0; // false if exporter only supports two configs Debug and Release virtual void updateDeprecatedProjectSettingsInteractively(); - virtual void initialiseDependencyPathValues() {} // IDE targeted by exporter virtual bool isXcode() const = 0; @@ -154,9 +153,9 @@ public: bool shouldUseGNUExtensions() const { return gnuExtensionsValue.get();} - Value getVST3PathValue() const { return vst3Path; } - Value getRTASPathValue() const { return rtasPath; } - Value getAAXPathValue() const { return aaxPath; } + String getGlobalVST3PathString() const { return getAppSettings().getStoredPath (Ids::vst3Path).toString(); } + String getGlobalRTASPathString() const { return getAppSettings().getStoredPath (Ids::rtasPath).toString(); } + String getGlobalAAXPathString() const { return getAppSettings().getStoredPath (Ids::aaxPath).toString(); } // NB: this is the path to the parent "modules" folder that contains the named module, not the // module folder itself. @@ -369,7 +368,6 @@ protected: const ProjectType& projectType; const String projectName; const File projectFolder; - Value vst3Path, rtasPath, aaxPath; // these must be initialised in the specific exporter c'tors! ValueWithDefault targetLocationValue, extraCompilerFlagsValue, extraLinkerFlagsValue, externalLibrariesValue, userNotesValue, gnuExtensionsValue, bigIconValue, smallIconValue, extraPPDefsValue; @@ -441,7 +439,6 @@ private: : name + suffix; } - void createDependencyPathProperties (PropertyListBuilder&); void createIconProperties (PropertyListBuilder&); void addVSTPathsIfPluginOrHost(); void addCommonAudioPluginSettings(); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp index da1459d6fc..af09a6589f 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp @@ -171,8 +171,6 @@ void ProjectSaver::writeProjects (const OwnedArray& modules, cons auto* exporter = exporters.add (exp.exporter.release()); - exporter->initialiseDependencyPathValues(); - if (exporter->getTargetFolder().createDirectory()) { if (exporter->isCLion())