Browse Source

Projucer: Only add example assets path to projects generated from JUCE example PIPs

tags/2021-05-28
ed 6 years ago
parent
commit
ec46ad4891
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp

+ 4
- 3
extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp View File

@@ -92,9 +92,10 @@ static bool isValidExporterName (StringRef exporterName)
return ProjectExporter::getExporterValueTreeNames().contains (exporterName, true); 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); 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(); auto juceDir = getAppSettings().getStoredPath (Ids::jucePath, TargetOS::getThisOS()).get().toString();


Loading…
Cancel
Save