1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-24 01:54:22 +00:00

Projucer: Update to ValueTreePropertyWithDefault class

This commit is contained in:
ed 2021-12-10 15:02:18 +00:00
parent 2b6dc9f7d2
commit fdcdda3463
17 changed files with 166 additions and 142 deletions

View file

@ -267,7 +267,7 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props)
if ((shouldBuildTargetType (build_tools::ProjectType::Target::VSTPlugIn) && project.shouldBuildVST()) || (project.isVSTPluginHost() && supportsTargetType (build_tools::ProjectType::Target::VSTPlugIn)))
{
props.add (new FilePathPropertyComponent (vstLegacyPathValueWrapper.getWrappedValueWithDefault(), "VST (Legacy) SDK Folder", true,
props.add (new FilePathPropertyComponent (vstLegacyPathValueWrapper.getWrappedValueTreePropertyWithDefault(), "VST (Legacy) SDK Folder", true,
getTargetOSForExporter() == TargetOS::getThisOS(), "*", project.getProjectFolder()),
"If you're building a VST plug-in or host, you can use this field to override the global VST (Legacy) SDK path with a project-specific path. "
"This can be an absolute path, or a path relative to the Projucer project file.");
@ -275,14 +275,14 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props)
if (shouldBuildTargetType (build_tools::ProjectType::Target::AAXPlugIn) && project.shouldBuildAAX())
{
props.add (new FilePathPropertyComponent (aaxPathValueWrapper.getWrappedValueWithDefault(), "AAX SDK Folder", true,
props.add (new FilePathPropertyComponent (aaxPathValueWrapper.getWrappedValueTreePropertyWithDefault(), "AAX SDK Folder", true,
getTargetOSForExporter() == TargetOS::getThisOS(), "*", project.getProjectFolder()),
"If you're building an AAX plug-in, 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 (build_tools::ProjectType::Target::RTASPlugIn) && project.shouldBuildRTAS())
{
props.add (new FilePathPropertyComponent (rtasPathValueWrapper.getWrappedValueWithDefault(), "RTAS SDK Folder", true,
props.add (new FilePathPropertyComponent (rtasPathValueWrapper.getWrappedValueTreePropertyWithDefault(), "RTAS SDK Folder", true,
getTargetOSForExporter() == TargetOS::getThisOS(), "*", project.getProjectFolder()),
"If you're building an RTAS plug-in, this must be the folder containing the RTAS SDK. This can be an absolute path, or a path relative to the Projucer project file.");
}
@ -295,7 +295,7 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props)
"Extra command-line flags to be passed to the compiler. This string can contain references to preprocessor definitions in the "
"form ${NAME_OF_DEFINITION}, which will be replaced with their values.");
for (HashMap<String, ValueWithDefault>::Iterator i (compilerFlagSchemesMap); i.next();)
for (HashMap<String, ValueTreePropertyWithDefault>::Iterator i (compilerFlagSchemesMap); i.next();)
props.add (new TextPropertyComponent (compilerFlagSchemesMap.getReference (i.getKey()), "Compiler Flags for " + i.getKey().quoted(), 8192, false),
"The exporter-specific compiler flags that will be added to files using this scheme.");
@ -560,7 +560,7 @@ static var getStoredPathForModule (const String& id, const ProjectExporter& exp)
exp.getTargetOSForExporter()).get();
}
ValueWithDefault ProjectExporter::getPathForModuleValue (const String& moduleID)
ValueTreePropertyWithDefault ProjectExporter::getPathForModuleValue (const String& moduleID)
{
auto* um = getUndoManager();
@ -909,20 +909,22 @@ void ProjectExporter::BuildConfiguration::addGCCOptimisationProperty (PropertyLi
void ProjectExporter::BuildConfiguration::addRecommendedLinuxCompilerWarningsProperty (PropertyListBuilder& props)
{
recommendedWarningsValue.setDefault ("");
props.add (new ChoicePropertyComponent (recommendedWarningsValue, "Add Recommended Compiler Warning Flags",
{ CompilerNames::gcc, CompilerNames::llvm, "Disabled" },
{ CompilerNames::gcc, CompilerNames::llvm, "" }),
"Enable this to add a set of recommended compiler warning flags.");
recommendedWarningsValue.setDefault ("");
}
void ProjectExporter::BuildConfiguration::addRecommendedLLVMCompilerWarningsProperty (PropertyListBuilder& props)
{
recommendedWarningsValue.setDefault ("");
props.add (new ChoicePropertyComponent (recommendedWarningsValue, "Add Recommended Compiler Warning Flags",
{ "Enabled", "Disabled" },
{ CompilerNames::llvm, "" }),
"Enable this to add a set of recommended compiler warning flags.");
recommendedWarningsValue.setDefault ("");
}
ProjectExporter::BuildConfiguration::CompilerWarningFlags ProjectExporter::BuildConfiguration::getRecommendedCompilerWarningFlags() const