Browse Source

Fix RTAS support

tags/2021-05-28
hogliux 9 years ago
parent
commit
dbf915603d
4 changed files with 35 additions and 26 deletions
  1. +27
    -24
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h
  2. +2
    -2
      modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp
  3. +0
    -0
      modules/juce_audio_plugin_client/juce_audio_plugin_client_AU.r
  4. +6
    -0
      modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS.r

+ 27
- 24
extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -2204,20 +2204,23 @@ private:
return refID;
}
String addRezFile (const RelativePath& path) const
String addRezFile (const Project::Item& projectItem, const RelativePath& path) const
{
const String pathAsString (path.toUnixStyle());
const String refID (addFileReference (path.toUnixStyle()));
Target* auTarget = getTargetOfType (Target::AudioUnitPlugIn);
if (auTarget == nullptr)
return String();
if (projectItem.isModuleCode())
{
if (Target* xcodeTarget = getTargetOfType (getTargetTypeFromFilePath (projectItem.getFile(), false)))
{
String rezFileID = addBuildFile (pathAsString, refID, false, false, xcodeTarget);
xcodeTarget->rezFileIDs.add (rezFileID);
String rezFileID = addBuildFile (pathAsString, refID, false, false, auTarget);
auTarget->rezFileIDs.add (rezFileID);
return refID;
}
}
return refID;
return String();
}
String getEntitlementsFileName() const
@@ -2270,25 +2273,12 @@ private:
else
path = RelativePath (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder);
if (path.hasFileExtension (".r") && LibraryModule::CompileUnit::hasSuffix (projectItem.getFile(), "_AU"))
return addRezFile (path);
if (path.hasFileExtension (".r"))
return addRezFile (projectItem, path);
Target* xcodeTarget = nullptr;
if (projectItem.isModuleCode() && projectItem.shouldBeCompiled())
{
const File& file = projectItem.getFile();
Target::Type targetType = Target::unspecified;
if (LibraryModule::CompileUnit::hasSuffix (file, "_AU")) targetType = Target::AudioUnitPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_AUv3")) targetType = Target::AudioUnitv3PlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_AAX")) targetType = Target::AAXPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_RTAS")) targetType = Target::RTASPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_VST2")) targetType = Target::VSTPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_VST3")) targetType = Target::VST3PlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_Standalone")) targetType = Target::StandalonePlugIn;
xcodeTarget = getTargetOfType (targetType);
}
xcodeTarget = getTargetOfType (getTargetTypeFromFilePath (projectItem.getFile(), false));
return addFile (path, projectItem.shouldBeCompiled(),
projectItem.shouldBeAddedToBinaryResources(),
@@ -2392,6 +2382,19 @@ private:
misc.add (v);
}
static Target::Type getTargetTypeFromFilePath (const File& file, bool returnSharedTargetIfNoValidSuffic)
{
if (LibraryModule::CompileUnit::hasSuffix (file, "_AU")) return Target::AudioUnitPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_AUv3")) return Target::AudioUnitv3PlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_AAX")) return Target::AAXPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_RTAS")) return Target::RTASPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_VST2")) return Target::VSTPlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_VST3")) return Target::VST3PlugIn;
else if (LibraryModule::CompileUnit::hasSuffix (file, "_Standalone")) return Target::StandalonePlugIn;
return (returnSharedTargetIfNoValidSuffic ? Target::SharedCodeTarget : Target::unspecified);
}
//==============================================================================
void removeMismatchedXcuserdata() const
{


+ 2
- 2
modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp View File

@@ -46,8 +46,6 @@
#pragma clang diagnostic ignored "-Wcomment"
#endif
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_RTAS);
/* Note about include paths
------------------------
@@ -107,6 +105,8 @@ JUCE_DEFINE_WRAPPER_TYPE (wrapperType_RTAS);
#include "../utility/juce_IncludeModuleHeaders.h"
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_RTAS);
#ifdef _MSC_VER
#pragma pack (pop)


modules/juce_audio_plugin_client/AU/juce_RezResources_AU.r → modules/juce_audio_plugin_client/juce_audio_plugin_client_AU.r View File


+ 6
- 0
modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS.r View File

@@ -0,0 +1,6 @@

/*
This dummy file is added to the resources section of the project to
force XCode to create some resources for the dpm. If there aren't any
resources, PT will refuse to load the plugin..
*/

Loading…
Cancel
Save