From 2eb14258c7026965ab9766a9983804280ea77196 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 28 Apr 2020 15:22:30 +0100 Subject: [PATCH] Projucer: Create plug-in binary destination directory before copying --- .../ProjectSaving/jucer_ProjectExport_Make.h | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h index 8d825f9995..49606e1b35 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h @@ -208,9 +208,21 @@ public: { String copyCmd ("JUCE_COPYCMD_" + getTargetVarName() + String (" := $(JUCE_OUTDIR)/")); - if (type == VST3PlugIn) s.add (copyCmd + "$(JUCE_VST3DIR) " + config.getVST3BinaryLocationString()); - else if (type == VSTPlugIn) s.add (copyCmd + targetName + " " + config.getVSTBinaryLocationString()); - else if (type == UnityPlugIn) s.add (copyCmd + "$(JUCE_UNITYDIR)/. " + config.getUnityPluginBinaryLocationString()); + if (type == VST3PlugIn) + { + s.add ("JUCE_VST3DESTDIR := " + config.getVST3BinaryLocationString()); + s.add (copyCmd + "$(JUCE_VST3DIR) $(JUCE_VST3DESTDIR)"); + } + else if (type == VSTPlugIn) + { + s.add ("JUCE_VSTDESTDIR := " + config.getVSTBinaryLocationString()); + s.add (copyCmd + targetName + " $(JUCE_VSTDESTDIR)"); + } + else if (type == UnityPlugIn) + { + s.add ("JUCE_UNITYDESTDIR := " + config.getUnityPluginBinaryLocationString()); + s.add (copyCmd + "$(JUCE_UNITYDIR)/. $(JUCE_UNITYDESTDIR)"); + } } return s; @@ -328,11 +340,13 @@ public: if (type == VST3PlugIn) { - out << "\t-$(V_AT)cp -R $(JUCE_COPYCMD_VST3)" << newLine; + out << "\t-$(V_AT)mkdir -p $(JUCE_VST3DESTDIR)" << newLine + << "\t-$(V_AT)cp -R $(JUCE_COPYCMD_VST3)" << newLine; } else if (type == VSTPlugIn) { - out << "\t-$(V_AT)cp $(JUCE_COPYCMD_VST)" << newLine; + out << "\t-$(V_AT)mkdir -p $(JUCE_VSTDESTDIR)" << newLine + << "\t-$(V_AT)cp -R $(JUCE_COPYCMD_VST)" << newLine; } else if (type == UnityPlugIn) { @@ -343,7 +357,8 @@ public: build_tools::RelativePath::projectFolder); out << "\t-$(V_AT)cp " + scriptPath.toUnixStyle() + " $(JUCE_OUTDIR)/$(JUCE_UNITYDIR)" << newLine - << "\t-$(V_AT)cp -R $(JUCE_COPYCMD_UNITY_PLUGIN)" << newLine; + << "\t-$(V_AT)mkdir -p $(JUCE_UNITYDESTDIR)" << newLine + << "\t-$(V_AT)cp -R $(JUCE_COPYCMD_UNITY_PLUGIN)" << newLine; } out << newLine;