From ec46ad48918228b3cd4d71c3cccf4543fda540c7 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 6 Dec 2018 09:46:12 +0000 Subject: [PATCH] Projucer: Only add example assets path to projects generated from JUCE example PIPs --- extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp b/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp index 53e5d9af65..f9a5b912c8 100644 --- a/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp +++ b/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp @@ -92,9 +92,10 @@ static bool isValidExporterName (StringRef exporterName) return ProjectExporter::getExporterValueTreeNames().contains (exporterName, true); } -static bool isMobileExporter (const String& exporterName) +static bool exporterRequiresExampleAssets (const String& exporterName, const String& projectName) { - return exporterName == "XCODE_IPHONE" || exporterName == "ANDROIDSTUDIO"; + return (exporterName == "XCODE_IPHONE" || exporterName == "ANDROIDSTUDIO") + || (exporterName == "XCODE_MAC" && projectName == "AUv3SynthPlugin"); } //============================================================================== @@ -251,7 +252,7 @@ ValueTree PIPGenerator::createExporterChild (const String& exporterName) exporter.setProperty (Ids::targetFolder, "Builds/" + ProjectExporter::getTargetFolderForExporter (exporterName), nullptr); - if (isMobileExporter (exporterName) || (metadata[Ids::name] == "AUv3SynthPlugin" && exporterName == "XCODE_MAC")) + if (isJUCEExample (pipFile) && exporterRequiresExampleAssets (exporterName, metadata[Ids::name])) { auto juceDir = getAppSettings().getStoredPath (Ids::jucePath, TargetOS::getThisOS()).get().toString();