diff --git a/extras/Introjucer/Source/Application/jucer_GlobalPreferences.cpp b/extras/Introjucer/Source/Application/jucer_GlobalPreferences.cpp index 6bfb7db16e..5948b27434 100644 --- a/extras/Introjucer/Source/Application/jucer_GlobalPreferences.cpp +++ b/extras/Introjucer/Source/Application/jucer_GlobalPreferences.cpp @@ -12,13 +12,7 @@ #include "jucer_GlobalPreferences.h" -//============================================================================== -const String PathSettingsTab::vst2KeyName = "vst2Path"; -const String PathSettingsTab::vst3KeyName = "vst3Path"; -const String PathSettingsTab::rtasKeyName = "rtasPath"; -const String PathSettingsTab::aaxKeyName = "aaxPath"; -const String PathSettingsTab::androidSdkKeyName = "androidSdkPath"; -const String PathSettingsTab::androidNdkKeyName = "androidNdkPath"; + //============================================================================== class AppearanceSettingsTab : public GlobalPreferencesTab, @@ -47,16 +41,16 @@ PathSettingsTab::PathSettingsTab (DependencyPathOS os) { const int maxChars = 1024; - vst2PathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (vst2KeyName, os), "VST SDK", maxChars, false)); - vst3PathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (vst3KeyName, os), "VST3 SDK", maxChars, false)); + vst2PathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (DependencyPath::vst2KeyName, os), "VST SDK", maxChars, false)); + vst3PathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (DependencyPath::vst3KeyName, os), "VST3 SDK", maxChars, false)); #if ! JUCE_LINUX - rtasPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (rtasKeyName, os), "RTAS SDK", maxChars, false)); - aaxPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (aaxKeyName, os), "AAX SDK", maxChars, false)); + rtasPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (DependencyPath::rtasKeyName, os), "RTAS SDK", maxChars, false)); + aaxPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (DependencyPath::aaxKeyName, os), "AAX SDK", maxChars, false)); #endif - androidSdkPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (androidSdkKeyName, os), "Android SDK", maxChars, false)); - androidNdkPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (androidNdkKeyName, os), "Android NDK", maxChars, false)); + androidSdkPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (DependencyPath::androidSdkKeyName, os), "Android SDK", maxChars, false)); + androidNdkPathComponent = pathComponents.add (new TextPropertyComponent (getPathByKey (DependencyPath::androidNdkKeyName, os), "Android NDK", maxChars, false)); for (TextPropertyComponent** component = pathComponents.begin(); component != pathComponents.end(); ++component) { @@ -80,12 +74,12 @@ void PathSettingsTab::textPropertyComponentChanged (TextPropertyComponent* textP String PathSettingsTab::getKeyForPropertyComponent (TextPropertyComponent* component) const { - if (component == vst2PathComponent) return vst2KeyName; - if (component == vst3PathComponent) return vst3KeyName; - if (component == rtasPathComponent) return rtasKeyName; - if (component == aaxPathComponent) return aaxKeyName; - if (component == androidSdkPathComponent) return androidSdkKeyName; - if (component == androidNdkPathComponent) return androidNdkKeyName; + if (component == vst2PathComponent) return DependencyPath::vst2KeyName; + if (component == vst3PathComponent) return DependencyPath::vst3KeyName; + if (component == rtasPathComponent) return DependencyPath::rtasKeyName; + if (component == aaxPathComponent) return DependencyPath::aaxKeyName; + if (component == androidSdkPathComponent) return DependencyPath::androidSdkKeyName; + if (component == androidNdkPathComponent) return DependencyPath::androidNdkKeyName; // this property component does not have a key associated to it! jassertfalse; @@ -128,11 +122,11 @@ Value& PathSettingsTab::getPathByKey (const String& key, DependencyPathOS os) //============================================================================== String PathSettingsTab::getFallbackPathByKey (const String& key, DependencyPathOS os) { - if (key == vst2KeyName || key == vst3KeyName) + if (key == DependencyPath::vst2KeyName || key == DependencyPath::vst3KeyName) return os == DependencyPath::windows ? "c:\\SDKs\\VST3 SDK" : "~/SDKs/VST3 SDK"; - if (key == rtasKeyName) + if (key == DependencyPath::rtasKeyName) { if (os == DependencyPath::windows) return "c:\\SDKs\\PT_80_SDK"; if (os == DependencyPath::osx) return "~/SDKs/PT_80_SDK"; @@ -142,7 +136,7 @@ String PathSettingsTab::getFallbackPathByKey (const String& key, DependencyPathO return String(); } - if (key == aaxKeyName) + if (key == DependencyPath::aaxKeyName) { if (os == DependencyPath::windows) return "c:\\SDKs\\AAX"; if (os == DependencyPath::osx) return "~/SDKs/AAX" ; @@ -152,11 +146,11 @@ String PathSettingsTab::getFallbackPathByKey (const String& key, DependencyPathO return String(); } - if (key == androidSdkKeyName) + if (key == DependencyPath::androidSdkKeyName) return os == DependencyPath::windows ? "c:\\SDKs\\android-sdk" : "~/Library/Android/sdk"; - if (key == androidNdkKeyName) + if (key == DependencyPath::androidNdkKeyName) return os == DependencyPath::windows ? "c:\\SDKs\\android-ndk" : "~/Library/Android/ndk"; @@ -170,23 +164,23 @@ bool PathSettingsTab::checkPathByKey (const String& key, const String& path) { String fileToCheckFor; - if (key == vst2KeyName) + if (key == DependencyPath::vst2KeyName) { fileToCheckFor = "public.sdk/source/vst2.x/audioeffectx.h"; } - else if (key == vst3KeyName) + else if (key == DependencyPath::vst3KeyName) { fileToCheckFor = "base/source/baseiids.cpp"; } - else if (key == rtasKeyName) + else if (key == DependencyPath::rtasKeyName) { fileToCheckFor = "AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses/CEffectProcessMIDI.cpp"; } - else if (key == aaxKeyName) + else if (key == DependencyPath::aaxKeyName) { fileToCheckFor = "Interfaces/AAX_Exports.cpp"; } - else if (key == androidSdkKeyName) + else if (key == DependencyPath::androidSdkKeyName) { #if JUCE_WINDOWS fileToCheckFor = "platform-tools/adb.exe"; @@ -194,7 +188,7 @@ bool PathSettingsTab::checkPathByKey (const String& key, const String& path) fileToCheckFor = "platform-tools/adb"; #endif } - else if (key == androidNdkKeyName) + else if (key == DependencyPath::androidNdkKeyName) { #if JUCE_WINDOWS fileToCheckFor = "ndk-depends.exe"; diff --git a/extras/Introjucer/Source/Application/jucer_GlobalPreferences.h b/extras/Introjucer/Source/Application/jucer_GlobalPreferences.h index d5a3a8330c..9e9f66714f 100644 --- a/extras/Introjucer/Source/Application/jucer_GlobalPreferences.h +++ b/extras/Introjucer/Source/Application/jucer_GlobalPreferences.h @@ -47,9 +47,6 @@ public: static String getFallbackPathByKey (const String& key, DependencyPathOS); static bool checkPathByKey (const String& key, const String& path); - const static String vst2KeyName, vst3KeyName, rtasKeyName, aaxKeyName, - androidSdkKeyName, androidNdkKeyName; - private: void textPropertyComponentChanged (TextPropertyComponent*) override; diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h index bc199430e6..52e1abe207 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -83,10 +83,10 @@ public: props.add (new TextPropertyComponent (getVersionCodeValue(), "Android Version Code", 32, false), "An integer value that represents the version of the application code, relative to other versions."); - props.add (new DependencyPathPropertyComponent (getSDKPathValue(), "Android SDK Path", PathSettingsTab::androidSdkKeyName), + props.add (new DependencyPathPropertyComponent (getSDKPathValue(), "Android SDK Path", DependencyPath::androidSdkKeyName), "The path to the Android SDK folder on the target build machine"); - props.add (new DependencyPathPropertyComponent (getNDKPathValue(), "Android NDK Path", PathSettingsTab::androidNdkKeyName), + props.add (new DependencyPathPropertyComponent (getNDKPathValue(), "Android NDK Path", DependencyPath::androidNdkKeyName), "The path to the Android NDK folder on the target build machine"); props.add (new TextPropertyComponent (getMinimumSDKVersionValue(), "Minimum SDK version", 32, false), diff --git a/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h b/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h index 66a3b9eca5..e581106d36 100644 --- a/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h +++ b/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h @@ -266,7 +266,7 @@ namespace VSTHelpers props.add (new DependencyPathPropertyComponent (getVSTFolder (exporter, isVST3), vstFormat + " Folder", - isVST3 ? PathSettingsTab::vst3KeyName : PathSettingsTab::vst2KeyName, + isVST3 ? DependencyPath::vst3KeyName : DependencyPath::vst2KeyName, getDependencyPathOS (exporter)), "If you're building a " + vstFormat + ", this must be the folder containing the " + vstFormat + " SDK. This should be an absolute path."); } @@ -476,7 +476,7 @@ namespace RTASHelpers props.add (new DependencyPathPropertyComponent (getRTASFolder (exporter), "RTAS Folder", - PathSettingsTab::rtasKeyName, + DependencyPath::rtasKeyName, getDependencyPathOS (exporter)), "If you're building an RTAS, this must be the folder containing the RTAS SDK. This should be an absolute path."); } @@ -663,7 +663,7 @@ namespace AAXHelpers props.add (new DependencyPathPropertyComponent (getAAXFolder (exporter), "AAX SDK Folder", - PathSettingsTab::aaxKeyName, + DependencyPath::aaxKeyName, getDependencyPathOS (exporter)), "If you're building an AAX, this must be the folder containing the AAX SDK. This should be an absolute path."); } diff --git a/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp b/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp index 757affefb2..1295867c7d 100644 --- a/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp +++ b/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp @@ -12,6 +12,13 @@ #include "jucer_DependencyPathPropertyComponent.h" #include "../Application/jucer_GlobalPreferences.h" +//============================================================================== +const String DependencyPath::vst2KeyName = "vst2Path"; +const String DependencyPath::vst3KeyName = "vst3Path"; +const String DependencyPath::rtasKeyName = "rtasPath"; +const String DependencyPath::aaxKeyName = "aaxPath"; +const String DependencyPath::androidSdkKeyName = "androidSdkPath"; +const String DependencyPath::androidNdkKeyName = "androidNdkPath"; //============================================================================== DependencyPathPropertyComponent::DependencyPathPropertyComponent (const Value& value, diff --git a/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.h b/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.h index cbe11ae324..62642c29e1 100644 --- a/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.h +++ b/extras/Introjucer/Source/Project/jucer_DependencyPathPropertyComponent.h @@ -12,8 +12,9 @@ #define JUCER_DEPENDENCYPATHPROPERTYCOMPONENT_H_INCLUDED //============================================================================== -namespace DependencyPath +class DependencyPath { +public: enum OS { windows = 0, @@ -34,6 +35,9 @@ namespace DependencyPath return DependencyPath::unknown; #endif } + + const static String vst2KeyName, vst3KeyName, rtasKeyName, aaxKeyName, + androidSdkKeyName, androidNdkKeyName; }; typedef DependencyPath::OS DependencyPathOS;