mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Projucer: Added an option to the Xcode and VS exporters to enable/disable the post-build plugin binary copy step
This commit is contained in:
parent
463f1c840d
commit
a166f01fce
5 changed files with 120 additions and 44 deletions
|
|
@ -161,6 +161,7 @@ public:
|
|||
setValueIfVoid (shouldGenerateManifestValue(), true);
|
||||
setValueIfVoid (getArchitectureType(), get64BitArchName());
|
||||
setValueIfVoid (getDebugInformationFormatValue(), isDebug() ? "ProgramDatabase" : "None");
|
||||
setValueIfVoid (getPluginBinaryCopyStepEnabledValue(), false);
|
||||
|
||||
if (! isDebug())
|
||||
updateOldLTOSetting();
|
||||
|
|
@ -168,47 +169,51 @@ public:
|
|||
initialisePluginCachedValues();
|
||||
}
|
||||
|
||||
Value getWarningLevelValue() { return getValue (Ids::winWarningLevel); }
|
||||
int getWarningLevel() const { return config [Ids::winWarningLevel]; }
|
||||
Value getWarningLevelValue() { return getValue (Ids::winWarningLevel); }
|
||||
int getWarningLevel() const { return config [Ids::winWarningLevel]; }
|
||||
|
||||
Value getWarningsTreatedAsErrors() { return getValue (Ids::warningsAreErrors); }
|
||||
bool areWarningsTreatedAsErrors() const { return config [Ids::warningsAreErrors]; }
|
||||
Value getWarningsTreatedAsErrors() { return getValue (Ids::warningsAreErrors); }
|
||||
bool areWarningsTreatedAsErrors() const { return config [Ids::warningsAreErrors]; }
|
||||
|
||||
Value getPrebuildCommand() { return getValue (Ids::prebuildCommand); }
|
||||
String getPrebuildCommandString() const { return config [Ids::prebuildCommand]; }
|
||||
Value getPostbuildCommand() { return getValue (Ids::postbuildCommand); }
|
||||
String getPostbuildCommandString() const { return config [Ids::postbuildCommand]; }
|
||||
Value getPrebuildCommand() { return getValue (Ids::prebuildCommand); }
|
||||
String getPrebuildCommandString() const { return config [Ids::prebuildCommand]; }
|
||||
|
||||
Value shouldGenerateDebugSymbolsValue() { return getValue (Ids::alwaysGenerateDebugSymbols); }
|
||||
bool shouldGenerateDebugSymbols() const { return config [Ids::alwaysGenerateDebugSymbols]; }
|
||||
Value getPostbuildCommand() { return getValue (Ids::postbuildCommand); }
|
||||
String getPostbuildCommandString() const { return config [Ids::postbuildCommand]; }
|
||||
|
||||
Value shouldGenerateManifestValue() { return getValue (Ids::generateManifest); }
|
||||
bool shouldGenerateManifest() const { return config [Ids::generateManifest]; }
|
||||
Value shouldGenerateDebugSymbolsValue() { return getValue (Ids::alwaysGenerateDebugSymbols); }
|
||||
bool shouldGenerateDebugSymbols() const { return config [Ids::alwaysGenerateDebugSymbols]; }
|
||||
|
||||
Value shouldLinkIncrementalValue() { return getValue (Ids::enableIncrementalLinking); }
|
||||
bool shouldLinkIncremental() const { return config [Ids::enableIncrementalLinking]; }
|
||||
Value shouldGenerateManifestValue() { return getValue (Ids::generateManifest); }
|
||||
bool shouldGenerateManifest() const { return config [Ids::generateManifest]; }
|
||||
|
||||
Value getUsingRuntimeLibDLL() { return getValue (Ids::useRuntimeLibDLL); }
|
||||
bool isUsingRuntimeLibDLL() const { return config [Ids::useRuntimeLibDLL]; }
|
||||
Value shouldLinkIncrementalValue() { return getValue (Ids::enableIncrementalLinking); }
|
||||
bool shouldLinkIncremental() const { return config [Ids::enableIncrementalLinking]; }
|
||||
|
||||
String getIntermediatesPath() const { return config [Ids::intermediatesPath].toString(); }
|
||||
Value getIntermediatesPathValue() { return getValue (Ids::intermediatesPath); }
|
||||
Value getUsingRuntimeLibDLL() { return getValue (Ids::useRuntimeLibDLL); }
|
||||
bool isUsingRuntimeLibDLL() const { return config [Ids::useRuntimeLibDLL]; }
|
||||
|
||||
String getCharacterSet() const { return config [Ids::characterSet].toString(); }
|
||||
Value getCharacterSetValue() { return getValue (Ids::characterSet); }
|
||||
Value getIntermediatesPathValue() { return getValue (Ids::intermediatesPath); }
|
||||
String getIntermediatesPath() const { return config [Ids::intermediatesPath].toString(); }
|
||||
|
||||
Value getArchitectureType() { return getValue (Ids::winArchitecture); }
|
||||
bool is64Bit() const { return config [Ids::winArchitecture].toString() == get64BitArchName(); }
|
||||
Value getCharacterSetValue() { return getValue (Ids::characterSet); }
|
||||
String getCharacterSet() const { return config [Ids::characterSet].toString(); }
|
||||
|
||||
Value getFastMathValue() { return getValue (Ids::fastMath); }
|
||||
bool isFastMathEnabled() const { return config [Ids::fastMath]; }
|
||||
Value getArchitectureType() { return getValue (Ids::winArchitecture); }
|
||||
bool is64Bit() const { return config [Ids::winArchitecture].toString() == get64BitArchName(); }
|
||||
|
||||
String get64BitArchName() const { return "x64"; }
|
||||
String get32BitArchName() const { return "Win32"; }
|
||||
Value getFastMathValue() { return getValue (Ids::fastMath); }
|
||||
bool isFastMathEnabled() const { return config [Ids::fastMath]; }
|
||||
|
||||
String get64BitArchName() const { return "x64"; }
|
||||
String get32BitArchName() const { return "Win32"; }
|
||||
|
||||
Value getDebugInformationFormatValue() { return getValue (Ids::debugInformationFormat); }
|
||||
String getDebugInformationFormatString() const { return config [Ids::debugInformationFormat]; }
|
||||
|
||||
Value getPluginBinaryCopyStepEnabledValue() { return getValue (Ids::enablePluginBinaryCopyStep); }
|
||||
bool isPluginBinaryCopyStepEnabled() const { return config [Ids::enablePluginBinaryCopyStep]; }
|
||||
|
||||
String createMSVCConfigName() const
|
||||
{
|
||||
return getName() + "|" + (config [Ids::winArchitecture] == get64BitArchName() ? "x64" : "Win32");
|
||||
|
|
@ -331,20 +336,31 @@ public:
|
|||
|
||||
void addVisualStudioPluginInstallPathProperties (PropertyListBuilder& props)
|
||||
{
|
||||
auto isBuildingAnyPlugins = (project.shouldBuildVST() || project.shouldBuildVST3()
|
||||
|| project.shouldBuildRTAS() || project.shouldBuildAAX());
|
||||
|
||||
if (isBuildingAnyPlugins)
|
||||
props.add (new BooleanPropertyComponent (getPluginBinaryCopyStepEnabledValue(), "Enable Plugin Copy Step", "Enabled"),
|
||||
"Enable this to copy plugin binaries to a specified folder after building.");
|
||||
|
||||
if (project.shouldBuildVST())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (vstBinaryLocation, "VST Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (vstBinaryLocation, getPluginBinaryCopyStepEnabledValue(),
|
||||
"VST Binary Location", 1024),
|
||||
"The folder in which the compiled VST binary should be placed.");
|
||||
|
||||
if (project.shouldBuildVST3())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (vst3BinaryLocation, "VST3 Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (vst3BinaryLocation, getPluginBinaryCopyStepEnabledValue(),
|
||||
"VST3 Binary Location", 1024),
|
||||
"The folder in which the compiled VST3 binary should be placed.");
|
||||
|
||||
if (project.shouldBuildRTAS())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (rtasBinaryLocation, "RTAS Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (rtasBinaryLocation, getPluginBinaryCopyStepEnabledValue(),
|
||||
"RTAS Binary Location", 1024),
|
||||
"The folder in which the compiled RTAS binary should be placed.");
|
||||
|
||||
if (project.shouldBuildAAX())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (aaxBinaryLocation, "AAX Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (aaxBinaryLocation, getPluginBinaryCopyStepEnabledValue(),
|
||||
"AAX Binary Location", 1024),
|
||||
"The folder in which the compiled AAX binary should be placed.");
|
||||
}
|
||||
|
||||
|
|
@ -1073,10 +1089,13 @@ public:
|
|||
auto pkgScript = String ("copy /Y ") + getOutputFilePath (config).quoted() + String (" ") + executable.quoted() + String ("\r\ncall ")
|
||||
+ createRebasedPath (bundleScript) + String (" ") + macOSDir.quoted() + String (" ") + createRebasedPath (iconFilePath);
|
||||
|
||||
return pkgScript + "\r\n" + String ("xcopy ") + bundleDir.quoted() + " "
|
||||
+ String (config.aaxBinaryLocation.get() + "\\" + outputFilename + "\\").quoted() + " /E /Y";
|
||||
if (config.isPluginBinaryCopyStepEnabled())
|
||||
return pkgScript + "\r\n" + String ("xcopy ") + bundleDir.quoted() + " "
|
||||
+ String (config.aaxBinaryLocation.get() + "\\" + outputFilename + "\\").quoted() + " /E /Y";
|
||||
|
||||
return pkgScript;
|
||||
}
|
||||
else
|
||||
else if (config.isPluginBinaryCopyStepEnabled())
|
||||
{
|
||||
auto copyScript = String ("copy /Y \"$(OutDir)$(TargetFileName)\"") + String (" \"$COPYDIR$\\$(TargetFileName)\"");
|
||||
|
||||
|
|
|
|||
|
|
@ -412,12 +412,14 @@ protected:
|
|||
codeSignIdentity (config, Ids::codeSigningIdentity, nullptr, iOS ? "iPhone Developer" : "Mac Developer"),
|
||||
fastMathEnabled (config, Ids::fastMath, nullptr),
|
||||
stripLocalSymbolsEnabled (config, Ids::stripLocalSymbols, nullptr),
|
||||
pluginBinaryCopyStepEnabled (config, Ids::enablePluginBinaryCopyStep, nullptr),
|
||||
vstBinaryLocation (config, Ids::vstBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST/"),
|
||||
vst3BinaryLocation (config, Ids::vst3BinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST3/"),
|
||||
auBinaryLocation (config, Ids::auBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/Components/"),
|
||||
rtasBinaryLocation (config, Ids::rtasBinaryLocation, nullptr, "/Library/Application Support/Digidesign/Plug-Ins/"),
|
||||
aaxBinaryLocation (config, Ids::aaxBinaryLocation, nullptr, "/Library/Application Support/Avid/Audio/Plug-Ins/")
|
||||
{
|
||||
setValueIfVoid (pluginBinaryCopyStepEnabled.getPropertyAsValue(), true);
|
||||
updateOldPluginBinaryLocations();
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +428,7 @@ protected:
|
|||
|
||||
CachedValue<String> osxSDKVersion, osxDeploymentTarget, iosDeploymentTarget, osxArchitecture,
|
||||
customXcodeFlags, plistPreprocessorDefinitions, cppStandardLibrary, codeSignIdentity;
|
||||
CachedValue<bool> fastMathEnabled, stripLocalSymbolsEnabled;
|
||||
CachedValue<bool> fastMathEnabled, stripLocalSymbolsEnabled, pluginBinaryCopyStepEnabled;
|
||||
CachedValue<String> vstBinaryLocation, vst3BinaryLocation, auBinaryLocation, rtasBinaryLocation, aaxBinaryLocation;
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -515,24 +517,37 @@ protected:
|
|||
//==========================================================================
|
||||
void addXcodePluginInstallPathProperties (PropertyListBuilder& props)
|
||||
{
|
||||
auto isBuildingAnyPlugins = (project.shouldBuildVST() || project.shouldBuildVST3() || project.shouldBuildAU()
|
||||
|| project.shouldBuildRTAS() || project.shouldBuildAAX());
|
||||
|
||||
if (isBuildingAnyPlugins)
|
||||
props.add (new BooleanPropertyComponent (pluginBinaryCopyStepEnabled.getPropertyAsValue(),
|
||||
"Enable Plugin Copy Step", "Enabled"),
|
||||
"Enable this to copy plugin binaries to the specified folder after building.");
|
||||
|
||||
if (project.shouldBuildVST())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (vstBinaryLocation, "VST Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (vstBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
|
||||
"VST Binary Location", 1024),
|
||||
"The folder in which the compiled VST binary should be placed.");
|
||||
|
||||
if (project.shouldBuildVST3())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (vst3BinaryLocation, "VST3 Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (vst3BinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
|
||||
"VST3 Binary Location", 1024),
|
||||
"The folder in which the compiled VST3 binary should be placed.");
|
||||
|
||||
if (project.shouldBuildAU())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (auBinaryLocation, "AU Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (auBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
|
||||
"AU Binary Location", 1024),
|
||||
"The folder in which the compiled AU binary should be placed.");
|
||||
|
||||
if (project.shouldBuildRTAS())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (rtasBinaryLocation, "RTAS Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (rtasBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
|
||||
"RTAS Binary Location", 1024),
|
||||
"The folder in which the compiled RTAS binary should be placed.");
|
||||
|
||||
if (project.shouldBuildAAX())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (aaxBinaryLocation, "AAX Binary location", 1024),
|
||||
props.add (new TextWithDefaultPropertyComponentWithEnablement (aaxBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
|
||||
"AAX Binary Location", 1024),
|
||||
"The folder in which the compiled AAX binary should be placed.");
|
||||
}
|
||||
|
||||
|
|
@ -1154,11 +1169,11 @@ public:
|
|||
{
|
||||
case GUIApp: return "$(HOME)/Applications";
|
||||
case ConsoleApp: return "/usr/bin";
|
||||
case VSTPlugIn: return config.vstBinaryLocation.get();
|
||||
case VST3PlugIn: return config.vst3BinaryLocation.get();
|
||||
case AudioUnitPlugIn: return config.auBinaryLocation.get();
|
||||
case RTASPlugIn: return config.rtasBinaryLocation.get();
|
||||
case AAXPlugIn: return config.aaxBinaryLocation.get();
|
||||
case VSTPlugIn: return config.pluginBinaryCopyStepEnabled.get() ? config.vstBinaryLocation.get() : String();
|
||||
case VST3PlugIn: return config.pluginBinaryCopyStepEnabled.get() ? config.vst3BinaryLocation.get() : String();
|
||||
case AudioUnitPlugIn: return config.pluginBinaryCopyStepEnabled.get() ? config.auBinaryLocation.get() : String();
|
||||
case RTASPlugIn: return config.pluginBinaryCopyStepEnabled.get() ? config.rtasBinaryLocation.get() : String();
|
||||
case AAXPlugIn: return config.pluginBinaryCopyStepEnabled.get() ? config.aaxBinaryLocation.get() : String();
|
||||
case SharedCodeTarget: return owner.isiOS() ? "@executable_path/Frameworks" : "@executable_path/../Frameworks";
|
||||
default: return {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ namespace Ids
|
|||
DECLARE_ID (auBinaryLocation);
|
||||
DECLARE_ID (rtasBinaryLocation);
|
||||
DECLARE_ID (aaxBinaryLocation);
|
||||
DECLARE_ID (enablePluginBinaryCopyStep);
|
||||
DECLARE_ID (stripLocalSymbols);
|
||||
DECLARE_ID (osxSDK);
|
||||
DECLARE_ID (osxCompatibility);
|
||||
|
|
|
|||
|
|
@ -260,6 +260,11 @@ public:
|
|||
setEnabled (value.getValue());
|
||||
}
|
||||
|
||||
~TextPropertyComponentWithEnablement()
|
||||
{
|
||||
value.removeListener (this);
|
||||
}
|
||||
|
||||
private:
|
||||
Value value;
|
||||
|
||||
|
|
@ -287,6 +292,11 @@ public:
|
|||
setEnabled (value.getValue());
|
||||
}
|
||||
|
||||
~ChoicePropertyComponentWithEnablement()
|
||||
{
|
||||
value.removeListener (this);
|
||||
}
|
||||
|
||||
private:
|
||||
Value value;
|
||||
|
||||
|
|
|
|||
|
|
@ -169,3 +169,34 @@ private:
|
|||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextWithDefaultPropertyComponent)
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class TextWithDefaultPropertyComponentWithEnablement : public TextWithDefaultPropertyComponent<String>,
|
||||
private Value::Listener
|
||||
{
|
||||
public:
|
||||
TextWithDefaultPropertyComponentWithEnablement (CachedValue<String>& valueToControl,
|
||||
const Value& valueToListenTo,
|
||||
const String& propertyName,
|
||||
int maxNumChars)
|
||||
: TextWithDefaultPropertyComponent<String> (valueToControl, propertyName, maxNumChars),
|
||||
value (valueToListenTo)
|
||||
{
|
||||
value.addListener (this);
|
||||
setEnabled (value.getValue());
|
||||
}
|
||||
|
||||
~TextWithDefaultPropertyComponentWithEnablement()
|
||||
{
|
||||
value.removeListener (this);
|
||||
}
|
||||
|
||||
private:
|
||||
Value value;
|
||||
|
||||
void valueChanged (Value& v) override
|
||||
{
|
||||
setEnabled (v.getValue());
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue