mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Only add plug-in properties to plug-in projects
This commit is contained in:
parent
c8da037147
commit
fdc9831e60
11 changed files with 46 additions and 45 deletions
|
|
@ -380,7 +380,7 @@ private:
|
|||
auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors")
|
||||
&& (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3") || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST"));
|
||||
|
||||
auto isPluginProject = proj.getProjectType().isAudioPlugin();
|
||||
auto isPluginProject = proj.isAudioPluginProject();
|
||||
|
||||
OwnedArray<LibraryModule> modules;
|
||||
proj.getEnabledModules().createRequiredModules (modules);
|
||||
|
|
@ -471,7 +471,7 @@ private:
|
|||
|
||||
auto customVst3Path = getAppSettings().getStoredPath (Ids::vst3Path, TargetOS::getThisOS()).get().toString();
|
||||
|
||||
if (customVst3Path.isNotEmpty() && (project.getProjectType().isAudioPlugin() || isVSTHost))
|
||||
if (customVst3Path.isNotEmpty() && (project.isAudioPluginProject() || isVSTHost))
|
||||
paths.add (customVst3Path);
|
||||
|
||||
OwnedArray<LibraryModule> modules;
|
||||
|
|
@ -481,7 +481,7 @@ private:
|
|||
{
|
||||
paths.addIfNotAlreadyThere (module->getFolder().getParentDirectory().getFullPathName());
|
||||
|
||||
if (customVst3Path.isEmpty() && (project.getProjectType().isAudioPlugin() || isVSTHost))
|
||||
if (customVst3Path.isEmpty() && (project.isAudioPluginProject() || isVSTHost))
|
||||
if (module->getID() == "juce_audio_processors")
|
||||
paths.addIfNotAlreadyThere (module->getFolder().getChildFile ("format_types").getChildFile ("VST3_SDK").getFullPathName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ bool EnabledModuleList::isModuleEnabled (const String& moduleID) const
|
|||
|
||||
bool EnabledModuleList::isAudioPluginModuleMissing() const
|
||||
{
|
||||
return project.getProjectType().isAudioPlugin()
|
||||
return project.isAudioPluginProject()
|
||||
&& ! isModuleEnabled ("juce_audio_plugin_client");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,7 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
|
|||
props.add (new TextPropertyComponent (bundleIdentifierValue, "Bundle Identifier", 256, false),
|
||||
"A unique identifier for this product, mainly for use in OSX/iOS builds. It should be something like 'com.yourcompanyname.yourproductname'");
|
||||
|
||||
if (getProjectType().isAudioPlugin())
|
||||
if (isAudioPluginProject())
|
||||
createAudioPluginPropertyEditors (props);
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ public:
|
|||
String getVSTNumMIDIInputsString() const { return pluginVSTNumMidiInputsValue.get(); }
|
||||
String getVSTNumMIDIOutputsString() const { return pluginVSTNumMidiOutputsValue.get(); }
|
||||
|
||||
//==============================================================================
|
||||
static bool checkMultiChoiceVar (const ValueWithDefault& valueToCheck, Identifier idToCheck) noexcept
|
||||
{
|
||||
if (! valueToCheck.get().isArray())
|
||||
|
|
@ -161,18 +160,18 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool shouldBuildVST() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST); }
|
||||
bool shouldBuildVST3() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST3); }
|
||||
bool shouldBuildAU() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildAU); }
|
||||
bool shouldBuildAUv3() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildAUv3); }
|
||||
bool shouldBuildRTAS() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildRTAS); }
|
||||
bool shouldBuildAAX() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildAAX); }
|
||||
bool shouldBuildStandalonePlugin() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildStandalone); }
|
||||
bool shouldBuildUnityPlugin() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildUnity); }
|
||||
bool shouldEnableIAA() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::enableIAA); }
|
||||
bool isAudioPluginProject() const { return getProjectType().isAudioPlugin(); }
|
||||
|
||||
bool shouldBuildVST() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST); }
|
||||
bool shouldBuildVST3() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST3); }
|
||||
bool shouldBuildAU() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildAU); }
|
||||
bool shouldBuildAUv3() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildAUv3); }
|
||||
bool shouldBuildRTAS() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildRTAS); }
|
||||
bool shouldBuildAAX() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildAAX); }
|
||||
bool shouldBuildStandalonePlugin() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildStandalone); }
|
||||
bool shouldBuildUnityPlugin() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildUnity); }
|
||||
bool shouldEnableIAA() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::enableIAA); }
|
||||
|
||||
//==============================================================================
|
||||
bool isPluginSynth() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginIsSynth); }
|
||||
bool pluginWantsMidiInput() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginWantsMidiIn); }
|
||||
bool pluginProducesMidiOutput() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginProducesMidiOut); }
|
||||
|
|
@ -183,7 +182,6 @@ public:
|
|||
bool isPluginAAXBypassDisabled() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginAAXDisableBypass); }
|
||||
bool isPluginAAXMultiMonoDisabled() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginAAXDisableMultiMono); }
|
||||
|
||||
//==============================================================================
|
||||
static StringArray getAllAUMainTypeStrings() noexcept;
|
||||
static Array<var> getAllAUMainTypeVars() noexcept;
|
||||
Array<var> getDefaultAUMainTypes() const noexcept;
|
||||
|
|
|
|||
|
|
@ -1350,7 +1350,7 @@ private:
|
|||
mo << " \"" << file.toUnixStyle() << "\"" << newLine;
|
||||
|
||||
if ((! projectItem.shouldBeCompiled()) || (! shouldFileBeCompiledByDefault (f))
|
||||
|| (getProject().getProjectType().isAudioPlugin()
|
||||
|| (getProject().isAudioPluginProject()
|
||||
&& targetType != ProjectType::Target::SharedCodeTarget
|
||||
&& targetType != ProjectType::Target::StandalonePlugIn))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ private:
|
|||
template <class Target, class Exporter>
|
||||
void getFileInfoList (Target& target, Exporter& exporter, const Project::Item& projectItem, std::vector<std::tuple<String, bool, String>>& fileInfoList) const
|
||||
{
|
||||
auto targetType = (getProject().getProjectType().isAudioPlugin() ? target.type : Target::Type::SharedCodeTarget);
|
||||
auto targetType = (getProject().isAudioPluginProject() ? target.type : Target::Type::SharedCodeTarget);
|
||||
|
||||
if (projectItem.isGroup())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ private:
|
|||
|
||||
if (config.exporter.isLinux())
|
||||
{
|
||||
if (target.isDynamicLibrary() || getProject().getProjectType().isAudioPlugin())
|
||||
if (target.isDynamicLibrary() || getProject().isAudioPluginProject())
|
||||
flags.add ("-fPIC");
|
||||
|
||||
auto packages = getPackages();
|
||||
|
|
@ -495,7 +495,7 @@ private:
|
|||
{
|
||||
auto librarySearchPaths = config.getLibrarySearchPaths();
|
||||
|
||||
if (getProject().getProjectType().isAudioPlugin() && target.type != ProjectType::Target::SharedCodeTarget)
|
||||
if (getProject().isAudioPluginProject() && target.type != ProjectType::Target::SharedCodeTarget)
|
||||
librarySearchPaths.add (RelativePath (getSharedCodePath (config), RelativePath::buildTargetFolder).getParentDirectory().toUnixStyle().quoted());
|
||||
|
||||
return librarySearchPaths;
|
||||
|
|
@ -601,7 +601,7 @@ private:
|
|||
xml.createNewChildElement ("Option")->setAttribute ("type", getTypeIndex (target.type));
|
||||
xml.createNewChildElement ("Option")->setAttribute ("compiler", "gcc");
|
||||
|
||||
if (getProject().getProjectType().isAudioPlugin() && target.type != ProjectType::Target::SharedCodeTarget)
|
||||
if (getProject().isAudioPluginProject() && target.type != ProjectType::Target::SharedCodeTarget)
|
||||
xml.createNewChildElement ("Option")->setAttribute ("external_deps", getSharedCodePath (config));
|
||||
|
||||
{
|
||||
|
|
@ -635,7 +635,7 @@ private:
|
|||
{
|
||||
auto* linker = xml.createNewChildElement ("Linker");
|
||||
|
||||
if (getProject().getProjectType().isAudioPlugin() && target.type != ProjectType::Target::SharedCodeTarget)
|
||||
if (getProject().isAudioPluginProject() && target.type != ProjectType::Target::SharedCodeTarget)
|
||||
setAddOption (*linker, "option", getSharedCodePath (config).quoted());
|
||||
|
||||
for (auto& flag : getLinkerFlags (config, target))
|
||||
|
|
@ -747,7 +747,7 @@ private:
|
|||
// the single target
|
||||
CodeBlocksTarget& getMainTarget() const
|
||||
{
|
||||
if (getProject().getProjectType().isAudioPlugin())
|
||||
if (getProject().isAudioPluginProject())
|
||||
return getTargetWithType (ProjectType::Target::SharedCodeTarget);
|
||||
|
||||
for (auto* target : targets)
|
||||
|
|
@ -761,7 +761,7 @@ private:
|
|||
|
||||
CodeBlocksTarget& getTargetForProjectItem (const Project::Item& projectItem) const
|
||||
{
|
||||
if (getProject().getProjectType().isAudioPlugin())
|
||||
if (getProject().isAudioPluginProject())
|
||||
{
|
||||
if (! projectItem.shouldBeCompiled())
|
||||
return getTargetWithType (ProjectType::Target::SharedCodeTarget);
|
||||
|
|
|
|||
|
|
@ -196,7 +196,8 @@ public:
|
|||
|
||||
void createConfigProperties (PropertyListBuilder& props) override
|
||||
{
|
||||
addVisualStudioPluginInstallPathProperties (props);
|
||||
if (project.isAudioPluginProject())
|
||||
addVisualStudioPluginInstallPathProperties (props);
|
||||
|
||||
props.add (new ChoicePropertyComponent (architectureTypeValue, "Architecture",
|
||||
{ get32BitArchName(), get64BitArchName() },
|
||||
|
|
@ -741,7 +742,7 @@ public:
|
|||
//==============================================================================
|
||||
void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const
|
||||
{
|
||||
auto targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget);
|
||||
auto targetType = (getOwner().getProject().isAudioPluginProject() ? type : SharedCodeTarget);
|
||||
|
||||
if (projectItem.isGroup())
|
||||
{
|
||||
|
|
@ -823,7 +824,7 @@ public:
|
|||
bool addFilesToFilter (const Project::Item& projectItem, const String& path,
|
||||
XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles, XmlElement& groups) const
|
||||
{
|
||||
auto targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget);
|
||||
auto targetType = (getOwner().getProject().isAudioPluginProject() ? type : SharedCodeTarget);
|
||||
|
||||
if (projectItem.isGroup())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
if (! getProject().getProjectType().isAudioPlugin())
|
||||
if (! getProject().isAudioPluginProject())
|
||||
out << "all : " << target->getBuildProduct() << newLine << newLine;
|
||||
|
||||
target->writeTargetLine (out, packages);
|
||||
|
|
@ -903,7 +903,7 @@ private:
|
|||
{
|
||||
Array<std::pair<File, String>> targetFiles;
|
||||
|
||||
auto targetType = (p.getProjectType().isAudioPlugin() ? target->type : MakefileTarget::SharedCodeTarget);
|
||||
auto targetType = (p.isAudioPluginProject() ? target->type : MakefileTarget::SharedCodeTarget);
|
||||
|
||||
for (auto& f : files)
|
||||
if (p.getTargetTypeFromFilePath (f.first, true) == targetType)
|
||||
|
|
@ -955,7 +955,7 @@ private:
|
|||
|
||||
phonyTargetLine << ".PHONY: clean all strip";
|
||||
|
||||
if (! getProject().getProjectType().isAudioPlugin())
|
||||
if (! getProject().isAudioPluginProject())
|
||||
return phonyTargetLine.toString();
|
||||
|
||||
for (auto target : targets)
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ public:
|
|||
"This way you can specify them for OS X and iOS separately, and modify the content of the resource folders "
|
||||
"without re-saving the Projucer project.");
|
||||
|
||||
if (getProject().getProjectType().isAudioPlugin())
|
||||
if (getProject().isAudioPluginProject())
|
||||
props.add (new ChoicePropertyComponent (duplicateAppExResourcesFolderValue, "Add Duplicate Resources Folder to App Extension"),
|
||||
"Disable this to prevent the Projucer from creating a duplicate resources folder for AUv3 app extensions.");
|
||||
|
||||
|
|
@ -674,7 +674,9 @@ protected:
|
|||
//==============================================================================
|
||||
void createConfigProperties (PropertyListBuilder& props) override
|
||||
{
|
||||
addXcodePluginInstallPathProperties (props);
|
||||
if (project.isAudioPluginProject())
|
||||
addXcodePluginInstallPathProperties (props);
|
||||
|
||||
addRecommendedLLVMCompilerWarningsProperty (props);
|
||||
addGCCOptimisationProperty (props);
|
||||
|
||||
|
|
@ -1024,7 +1026,7 @@ public:
|
|||
{
|
||||
Array<SourceFileInfo> result;
|
||||
|
||||
auto targetType = (owner.getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget);
|
||||
auto targetType = (owner.getProject().isAudioPluginProject() ? type : SharedCodeTarget);
|
||||
|
||||
if (projectItem.isGroup())
|
||||
{
|
||||
|
|
@ -1195,7 +1197,7 @@ public:
|
|||
|| (owner.isiOS() && owner.isiCloudPermissionsEnabled()))
|
||||
return true;
|
||||
|
||||
if (owner.project.getProjectType().isAudioPlugin()
|
||||
if (owner.project.isAudioPluginProject()
|
||||
&& ((owner.isOSX() && type == Target::AudioUnitv3PlugIn)
|
||||
|| (owner.isiOS() && type == Target::StandalonePlugIn && owner.getProject().shouldEnableIAA())))
|
||||
return true;
|
||||
|
|
@ -1512,7 +1514,7 @@ public:
|
|||
librarySearchPaths.add (owner.getSearchPathForStaticLibrary (lib));
|
||||
}
|
||||
|
||||
if (owner.project.getProjectType().isAudioPlugin())
|
||||
if (owner.project.isAudioPluginProject())
|
||||
{
|
||||
if (owner.getTargetOfType (Target::SharedCodeTarget) != nullptr)
|
||||
{
|
||||
|
|
@ -2233,7 +2235,7 @@ private:
|
|||
auto sourceFiles = target->sourceIDs;
|
||||
|
||||
if (target->type == XcodeTarget::SharedCodeTarget
|
||||
|| (! project.getProjectType().isAudioPlugin()))
|
||||
|| (! project.isAudioPluginProject()))
|
||||
sourceFiles.addArray (sourceIDs);
|
||||
|
||||
target->addBuildPhase ("PBXSourcesBuildPhase", sourceFiles);
|
||||
|
|
@ -2244,11 +2246,11 @@ private:
|
|||
|
||||
target->addShellScriptBuildPhase ("Post-build script", getPostBuildScript());
|
||||
|
||||
if (project.getProjectType().isAudioPlugin() && project.shouldBuildAUv3()
|
||||
if (project.isAudioPluginProject() && project.shouldBuildAUv3()
|
||||
&& project.shouldBuildStandalonePlugin() && target->type == XcodeTarget::StandalonePlugIn)
|
||||
embedAppExtension();
|
||||
|
||||
if (project.getProjectType().isAudioPlugin() && project.shouldBuildUnityPlugin()
|
||||
if (project.isAudioPluginProject() && project.shouldBuildUnityPlugin()
|
||||
&& target->type == XcodeTarget::UnityPlugIn)
|
||||
embedUnityScript();
|
||||
|
||||
|
|
@ -2355,7 +2357,7 @@ private:
|
|||
{
|
||||
StringArray dependencies;
|
||||
|
||||
if (project.getProjectType().isAudioPlugin())
|
||||
if (project.isAudioPluginProject())
|
||||
{
|
||||
if (target.type == XcodeTarget::StandalonePlugIn) // depends on AUv3 and shared code
|
||||
{
|
||||
|
|
@ -3114,7 +3116,7 @@ private:
|
|||
{
|
||||
StringPairArray entitlements;
|
||||
|
||||
if (project.getProjectType().isAudioPlugin())
|
||||
if (project.isAudioPluginProject())
|
||||
{
|
||||
if (isiOS() && project.shouldEnableIAA())
|
||||
entitlements.set ("inter-app-audio", "<true/>");
|
||||
|
|
@ -3144,7 +3146,7 @@ private:
|
|||
for (auto& option : getHardenedRuntimeOptions())
|
||||
entitlements.set (option, "<true/>");
|
||||
|
||||
if (isAppSandboxEnabled() || (project.getProjectType().isAudioPlugin() && target.type == XcodeTarget::AudioUnitv3PlugIn))
|
||||
if (isAppSandboxEnabled() || (project.isAudioPluginProject() && target.type == XcodeTarget::AudioUnitv3PlugIn))
|
||||
{
|
||||
entitlements.set ("com.apple.security.app-sandbox", "<true/>");
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public:
|
|||
|
||||
auto projectRootHash = project.getProjectRoot().toXmlString().hashCode();
|
||||
|
||||
if (project.getProjectType().isAudioPlugin())
|
||||
if (project.isAudioPluginProject())
|
||||
{
|
||||
writePluginCharacteristicsFile();
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ public:
|
|||
|
||||
if (errors.size() == 0)
|
||||
{
|
||||
if (project.getProjectType().isAudioPlugin())
|
||||
if (project.isAudioPluginProject())
|
||||
writePluginCharacteristicsFile();
|
||||
|
||||
writeAppConfigFile (modules, loadUserContentFromAppConfig());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue