From 3a77e522108d047143bd26725cabb5f9f7dac1d8 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 2 Nov 2018 14:17:41 +0000 Subject: [PATCH] Projucer: Define JucePlugin_Name earlier in AppConfig.h so that JUCE_STANDALONE_APPLICATION is set correctly --- .../Source/ProjectSaving/jucer_ProjectSaver.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h index 097c9390bc..616c227551 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h @@ -491,25 +491,24 @@ private: } } + if (extraAppConfigContent.isNotEmpty()) + out << newLine << extraAppConfigContent.trimEnd() << newLine; + { - int isStandaloneApplication = 1; auto& type = project.getProjectType(); - if (type.isAudioPlugin() || type.isDynamicLibrary()) - isStandaloneApplication = 0; + auto isStandaloneApplication = (! type.isAudioPlugin() && ! type.isDynamicLibrary()); - out << "//==============================================================================" << newLine + out << newLine + << "//==============================================================================" << newLine << "#ifndef JUCE_STANDALONE_APPLICATION" << newLine << " #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)" << newLine << " #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone" << newLine << " #else" << newLine - << " #define JUCE_STANDALONE_APPLICATION " << isStandaloneApplication << newLine + << " #define JUCE_STANDALONE_APPLICATION " << (isStandaloneApplication ? "1" : "0") << newLine << " #endif" << newLine << "#endif" << newLine; } - - if (extraAppConfigContent.isNotEmpty()) - out << newLine << extraAppConfigContent.trimEnd() << newLine; } void writeAppConfigFile (const OwnedArray& modules, const String& userContent)