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

Projucer: Fixed live-build when app config is disabled

This commit is contained in:
ed 2020-05-19 16:27:22 +01:00
parent 71fa877454
commit 7ee2af23fc
5 changed files with 62 additions and 56 deletions

View file

@ -448,54 +448,11 @@ StringPairArray ProjectExporter::getAllPreprocessorDefs (const BuildConfiguratio
addTargetSpecificPreprocessorDefs (defs, targetType);
if (! project.shouldUseAppConfig())
defs = mergePreprocessorDefs (defs, getAppConfigDefs());
defs = mergePreprocessorDefs (defs, project.getAppConfigDefs());
return defs;
}
StringPairArray ProjectExporter::getAppConfigDefs() const
{
StringPairArray result;
result.set ("JUCE_DISPLAY_SPLASH_SCREEN", project.shouldDisplaySplashScreen() ? "1" : "0");
result.set ("JUCE_USE_DARK_SPLASH_SCREEN", project.getSplashScreenColourString() == "Dark" ? "1" : "0");
result.set ("JUCE_PROJUCER_VERSION", "0x" + String::toHexString (ProjectInfo::versionNumber));
OwnedArray<LibraryModule> modules;
project.getEnabledModules().createRequiredModules (modules);
for (auto& m : modules)
result.set ("JUCE_MODULE_AVAILABLE_" + m->getID(), "1");
result.set ("JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED", "1");
for (auto& m : modules)
{
OwnedArray<Project::ConfigFlag> flags;
m->getConfigFlags (project, flags);
for (auto* flag : flags)
if (! flag->value.isUsingDefault())
result.set (flag->symbol, flag->value.get() ? "1" : "0");
}
result.addArray (project.getAudioPluginFlags());
const auto& type = project.getProjectType();
const auto isStandaloneApplication = (! type.isAudioPlugin() && ! type.isDynamicLibrary());
const auto standaloneValue = [&]
{
if (result.containsKey ("JucePlugin_Name") && result.containsKey ("JucePlugin_Build_Standalone"))
return "JucePlugin_Build_Standalone";
return isStandaloneApplication ? "1" : "0";
}();
result.set ("JUCE_STANDALONE_APPLICATION", standaloneValue);
return result;
}
StringPairArray ProjectExporter::getAllPreprocessorDefs() const
{
auto defs = mergePreprocessorDefs (project.getPreprocessorDefs(),