Browse Source

Fixed some more RTAS build errors and marked it as deprecated

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
2fc4404a74
4 changed files with 19 additions and 15 deletions
  1. +1
    -1
      extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h
  2. +1
    -1
      extras/Projucer/Source/Project/jucer_Project.cpp
  3. +9
    -10
      modules/juce_audio_plugin_client/RTAS/juce_RTAS_WinUtilities.cpp
  4. +8
    -3
      modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp

+ 1
- 1
extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h View File

@@ -214,7 +214,7 @@ private:
{ {
builder.add (new FilePathPropertyComponent (aaxPathValue, "AAX SDK", true, isThisOS), builder.add (new FilePathPropertyComponent (aaxPathValue, "AAX SDK", true, isThisOS),
"If you are building AAX plug-ins, this should be the path to the AAX SDK folder."); "If you are building AAX plug-ins, this should be the path to the AAX SDK folder.");
builder.add (new FilePathPropertyComponent (rtasPathValue, "RTAS SDK", true, isThisOS),
builder.add (new FilePathPropertyComponent (rtasPathValue, "RTAS SDK (deprecated)", true, isThisOS),
"If you are building RTAS plug-ins, this should be the path to the RTAS SDK folder."); "If you are building RTAS plug-ins, this should be the path to the RTAS SDK folder.");
} }


+ 1
- 1
extras/Projucer/Source/Project/jucer_Project.cpp View File

@@ -1064,7 +1064,7 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props) void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props)
{ {
props.add (new MultiChoicePropertyComponent (pluginFormatsValue, "Plugin Formats", props.add (new MultiChoicePropertyComponent (pluginFormatsValue, "Plugin Formats",
{ "VST3", "AU", "AUv3", "RTAS", "AAX", "Standalone", "Unity", "Enable IAA", "VST (Legacy)" },
{ "VST3", "AU", "AUv3", "RTAS (deprecated)", "AAX", "Standalone", "Unity", "Enable IAA", "VST (Legacy)" },
{ Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildAUv3.toString(), { Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildAUv3.toString(),
Ids::buildRTAS.toString(), Ids::buildAAX.toString(), Ids::buildStandalone.toString(), Ids::buildUnity.toString(), Ids::buildRTAS.toString(), Ids::buildAAX.toString(), Ids::buildStandalone.toString(), Ids::buildUnity.toString(),
Ids::enableIAA.toString(), Ids::buildVST.toString() }), Ids::enableIAA.toString(), Ids::buildVST.toString() }),


+ 9
- 10
modules/juce_audio_plugin_client/RTAS/juce_RTAS_WinUtilities.cpp View File

@@ -24,11 +24,11 @@
============================================================================== ==============================================================================
*/ */
#if JucePlugin_Build_RTAS
#include "../../juce_core/system/juce_TargetPlatform.h" #include "../../juce_core/system/juce_TargetPlatform.h"
#include "../utility/juce_CheckSettingMacros.h" #include "../utility/juce_CheckSettingMacros.h"
#if JucePlugin_Build_RTAS
// (these functions are in their own file because of problems including windows.h // (these functions are in their own file because of problems including windows.h
// at the same time as the Digi headers) // at the same time as the Digi headers)
@@ -45,14 +45,13 @@
#include "../utility/juce_IncludeModuleHeaders.h" #include "../utility/juce_IncludeModuleHeaders.h"
#pragma pack (pop) #pragma pack (pop)
namespace juce
{
//============================================================================== //==============================================================================
void JUCE_CALLTYPE attachSubWindow (void* hostWindow, void JUCE_CALLTYPE attachSubWindow (void* hostWindow,
int& titleW, int& titleH, int& titleW, int& titleH,
Component* comp) Component* comp)
{ {
using namespace juce;
RECT clientRect; RECT clientRect;
GetClientRect ((HWND) hostWindow, &clientRect); GetClientRect ((HWND) hostWindow, &clientRect);
@@ -77,6 +76,8 @@ void JUCE_CALLTYPE resizeHostWindow (void* hostWindow,
int& titleW, int& titleH, int& titleW, int& titleH,
Component* comp) Component* comp)
{ {
using namespace juce;
RECT clientRect, windowRect; RECT clientRect, windowRect;
GetClientRect ((HWND) hostWindow, &clientRect); GetClientRect ((HWND) hostWindow, &clientRect);
GetWindowRect ((HWND) hostWindow, &windowRect); GetWindowRect ((HWND) hostWindow, &windowRect);
@@ -94,12 +95,12 @@ extern "C" BOOL WINAPI DllMainRTAS (HINSTANCE, DWORD, LPVOID);
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID reserved) extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID reserved)
{ {
if (reason == DLL_PROCESS_ATTACH) if (reason == DLL_PROCESS_ATTACH)
Process::setCurrentModuleInstanceHandle (instance);
juce::Process::setCurrentModuleInstanceHandle (instance);
if (GetModuleHandleA ("DAE.DLL") != 0) if (GetModuleHandleA ("DAE.DLL") != 0)
return DllMainRTAS (instance, reason, reserved); return DllMainRTAS (instance, reason, reserved);
ignoreUnused (reserved);
juce::ignoreUnused (reserved);
return TRUE; return TRUE;
} }
@@ -121,7 +122,7 @@ namespace
TCHAR windowType [32] = { 0 }; TCHAR windowType [32] = { 0 };
GetClassName (parent, windowType, 31); GetClassName (parent, windowType, 31);
if (String (windowType).equalsIgnoreCase ("MDIClient"))
if (juce::String (windowType).equalsIgnoreCase ("MDIClient"))
{ {
w = parent; w = parent;
break; break;
@@ -154,6 +155,4 @@ void JUCE_CALLTYPE passFocusToHostWindow (void* hostWindow)
#endif #endif
} // namespace juce
#endif #endif

+ 8
- 3
modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp View File

@@ -171,14 +171,15 @@ class JucePlugInProcess : public CEffectProcessMIDI,
{ {
public: public:
//============================================================================== //==============================================================================
JucePlugInProcess()
// RTAS builds will be removed from JUCE in the next release
JUCE_DEPRECATED_WITH_BODY (JucePlugInProcess(),
{ {
juceFilter.reset (createPluginFilterOfType (AudioProcessor::wrapperType_RTAS)); juceFilter.reset (createPluginFilterOfType (AudioProcessor::wrapperType_RTAS));
AddChunk (juceChunkType, "Juce Audio Plugin Data"); AddChunk (juceChunkType, "Juce Audio Plugin Data");
++numInstances; ++numInstances;
}
})
~JucePlugInProcess() ~JucePlugInProcess()
{ {
@@ -316,7 +317,7 @@ public:
if (Component* const modalComponent = Component::getCurrentlyModalComponent()) if (Component* const modalComponent = Component::getCurrentlyModalComponent())
modalComponent->exitModalState (0); modalComponent->exitModalState (0);
filter->editorBeingDeleted (editorComp);
filter->editorBeingDeleted (editorComp.get());
editorComp.reset(); editorComp.reset();
wrapper.reset(); wrapper.reset();
@@ -951,6 +952,10 @@ public:
{ {
std::unique_ptr<AudioProcessor> plugin (createPluginFilterOfType (AudioProcessor::wrapperType_RTAS)); std::unique_ptr<AudioProcessor> plugin (createPluginFilterOfType (AudioProcessor::wrapperType_RTAS));
#ifndef JucePlugin_PreferredChannelConfigurations
#error You need to set the "Plugin Channel Configurations" field in the Projucer to build RTAS plug-ins
#endif
const short channelConfigs[][2] = { JucePlugin_PreferredChannelConfigurations }; const short channelConfigs[][2] = { JucePlugin_PreferredChannelConfigurations };
const int numConfigs = numElementsInArray (channelConfigs); const int numConfigs = numElementsInArray (channelConfigs);


Loading…
Cancel
Save