Browse Source

AAX: Use unity build style for the AAX_SDK

JUCE no longer depends on built artifacts of the AAX_SDK
v7.0.9
attila Attila Szarvas 2 years ago
parent
commit
d037d45e3b
6 changed files with 141 additions and 86 deletions
  1. +26
    -0
      BREAKING-CHANGES.txt
  2. +1
    -7
      extras/Build/CMake/JUCEUtils.cmake
  3. +0
    -10
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
  4. +4
    -26
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  5. +7
    -43
      modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp
  6. +103
    -0
      modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp

+ 26
- 0
BREAKING-CHANGES.txt View File

@@ -4,6 +4,32 @@ JUCE breaking changes
develop
=======

Change
------
The minimum supported AAX library version has been bumped to 2.4.0 and the
library is now built automatically while building an AAX plugin. The
JucePlugin_AAXLibs_path preprocessor definition is no longer defined in AAX
plugin builds.

Possible Issues
---------------
Projects that use the JucePlugin_AAXLibs_path definition may no longer build
correctly. Projects that reference an AAX library version earlier than 2.4.0
will fail to build.

Workaround
----------
You must download an AAX library distribution with a version of at least 2.4.0.
Use the definition JucePlugin_Build_AAX to check whether the AAX format is
enabled at build time.

Rationale
---------
The JUCE framework now requires features only present in version 2.4.0 of the
AAX library. The build change removes steps from the build process, and ensures
that the same compiler flags are used across the entire project.


Change
------
The implementation of ColourGradient::createLookupTable has been updated to use


+ 1
- 7
extras/Build/CMake/JUCEUtils.cmake View File

@@ -2007,12 +2007,7 @@ function(juce_set_aax_sdk_path path)
message(FATAL_ERROR "Could not find AAX SDK at the specified path: ${path}")
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
add_library(juce_aax_sdk STATIC IMPORTED GLOBAL)
set_target_properties(juce_aax_sdk PROPERTIES
IMPORTED_LOCATION_DEBUG "${path}/Libs/Debug/libAAXLibrary_libcpp.a"
IMPORTED_LOCATION "${path}/Libs/Release/libAAXLibrary_libcpp.a")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if((CMAKE_SYSTEM_NAME STREQUAL "Darwin") OR (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
add_library(juce_aax_sdk INTERFACE IMPORTED GLOBAL)
else()
return()
@@ -2022,7 +2017,6 @@ function(juce_set_aax_sdk_path path)
"${path}"
"${path}/Interfaces"
"${path}/Interfaces/ACF")
target_compile_definitions(juce_aax_sdk INTERFACE JucePlugin_AAXLibs_path="${path}/Libs")
set_target_properties(juce_aax_sdk PROPERTIES INTERFACE_JUCE_AAX_DEFAULT_ICON "${path}/Utilities/PlugIn.ico")
endfunction()



+ 0
- 10
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h View File

@@ -1172,7 +1172,6 @@ public:
}
defines = mergePreprocessorDefs (defines, getOwner().getAllPreprocessorDefs (config, type));
addExtraPreprocessorDefines (defines);
if (getTargetFileType() == staticLibrary || getTargetFileType() == sharedLibraryOrDLL)
defines.set("_LIB", "");
@@ -1352,15 +1351,6 @@ public:
return preBuild + String (preBuild.isNotEmpty() && extraPreBuild.isNotEmpty() ? "\r\n" : "") + extraPreBuild;
}
void addExtraPreprocessorDefines (StringPairArray& defines) const
{
if (type == AAXPlugIn)
{
auto aaxLibsFolder = build_tools::RelativePath (owner.getAAXPathString(), build_tools::RelativePath::projectFolder).getChildFile ("Libs");
defines.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder));
}
}
String getBinaryNameWithSuffix (const MSVCBuildConfiguration& config) const
{
return config.getOutputFilename (getTargetSuffix(), true, type);


+ 4
- 26
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -1718,8 +1718,8 @@ public:
s.set ("COMBINE_HIDPI_IMAGES", "YES");
{
StringArray linkerFlags, librarySearchPaths;
getLinkerSettings (config, linkerFlags, librarySearchPaths);
StringArray linkerFlags;
getLinkerSettings (config, linkerFlags);
for (const auto& weakFramework : owner.xcodeWeakFrameworks)
linkerFlags.add ("-weak_framework " + weakFramework);
@@ -1727,6 +1727,7 @@ public:
if (linkerFlags.size() > 0)
s.set ("OTHER_LDFLAGS", linkerFlags.joinIntoString (" ").quoted());
StringArray librarySearchPaths;
librarySearchPaths.addArray (config.getLibrarySearchPaths());
if (type == LV2PlugIn)
@@ -1819,23 +1820,13 @@ public:
}
//==============================================================================
void getLinkerSettings (const BuildConfiguration& config, StringArray& flags, StringArray& librarySearchPaths) const
void getLinkerSettings (const BuildConfiguration& config, StringArray& flags) const
{
if (getTargetFileType() == pluginBundle)
flags.add (owner.isiOS() ? "-bitcode_bundle" : "-bundle");
if (type != Target::SharedCodeTarget && type != Target::LV2TurtleProgram)
{
Array<build_tools::RelativePath> extraLibs;
addExtraLibsForTargetType (config, extraLibs);
for (auto& lib : extraLibs)
{
flags.add (getLinkerFlagForLib (lib.getFileNameWithoutExtension()));
librarySearchPaths.add (owner.getSearchPathForStaticLibrary (lib));
}
if (owner.project.isAudioPluginProject())
{
if (owner.getTargetOfType (Target::SharedCodeTarget) != nullptr)
@@ -2016,19 +2007,6 @@ public:
xcodeFrameworks.add ("AudioUnit");
}
void addExtraLibsForTargetType (const BuildConfiguration& config, Array<build_tools::RelativePath>& extraLibs) const
{
if (type == AAXPlugIn)
{
auto aaxLibsFolder = build_tools::RelativePath (owner.getAAXPathString(), build_tools::RelativePath::projectFolder).getChildFile ("Libs");
String libraryPath (config.isDebug() ? "Debug" : "Release");
libraryPath += "/libAAXLibrary_libcpp.a";
extraLibs.add (aaxLibsFolder.getChildFile (libraryPath));
}
}
//==============================================================================
const XcodeProjectExporter& owner;


+ 7
- 43
modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp View File

@@ -26,7 +26,7 @@
#include <juce_core/system/juce_TargetPlatform.h>
#include "../utility/juce_CheckSettingMacros.h"
#if JucePlugin_Build_AAX && (JUCE_INCLUDED_AAX_IN_MM || defined (_WIN32) || defined (_WIN64))
#if JucePlugin_Build_AAX && (JUCE_MAC || JUCE_WINDOWS)
#include "../utility/juce_IncludeSystemHeaders.h"
#include "../utility/juce_IncludeModuleHeaders.h"
@@ -48,7 +48,9 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wnon-virtual-dtor",
#include <AAX_Version.h>
static_assert (AAX_SDK_CURRENT_REVISION >= AAX_SDK_2p3p0_REVISION, "JUCE requires AAX SDK version 2.3.0 or higher");
static_assert (AAX_SDK_CURRENT_REVISION >= AAX_SDK_2p4p0_REVISION, "JUCE requires AAX SDK version 2.4.0 or higher");
#define INITACFIDS
#include <AAX_Exports.cpp>
#include <AAX_ICollection.h>
@@ -70,49 +72,15 @@ static_assert (AAX_SDK_CURRENT_REVISION >= AAX_SDK_2p3p0_REVISION, "JUCE require
#include <AAX_IDescriptionHost.h>
#include <AAX_IFeatureInfo.h>
#include <AAX_UIDs.h>
#if defined (AAX_SDK_2p3p1_REVISION) && AAX_SDK_2p3p1_REVISION <= AAX_SDK_CURRENT_REVISION
#include <AAX_Exception.h>
#include <AAX_Assert.h>
#endif
#if defined (AAX_SDK_2p4p0_REVISION) && AAX_SDK_2p4p0_REVISION <= AAX_SDK_CURRENT_REVISION
#define JUCE_AAX_HAS_TRANSPORT_NOTIFICATION 1
#else
#define JUCE_AAX_HAS_TRANSPORT_NOTIFICATION 0
#endif
#if JUCE_AAX_HAS_TRANSPORT_NOTIFICATION
#include <AAX_TransportTypes.h>
#endif
#include <AAX_Exception.h>
#include <AAX_Assert.h>
#include <AAX_TransportTypes.h>
JUCE_END_IGNORE_WARNINGS_MSVC
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfour-char-constants")
#if JUCE_WINDOWS
#ifndef JucePlugin_AAXLibs_path
#error "You need to define the JucePlugin_AAXLibs_path macro. (This is best done via the Projucer)"
#endif
#if JUCE_64BIT
#define JUCE_AAX_LIB "AAXLibrary_x64"
#else
#define JUCE_AAX_LIB "AAXLibrary"
#endif
#if JUCE_DEBUG
#define JUCE_AAX_LIB_PATH "\\Debug\\"
#define JUCE_AAX_LIB_SUFFIX "_D"
#else
#define JUCE_AAX_LIB_PATH "\\Release\\"
#define JUCE_AAX_LIB_SUFFIX ""
#endif
#pragma comment(lib, JucePlugin_AAXLibs_path JUCE_AAX_LIB_PATH JUCE_AAX_LIB JUCE_AAX_LIB_SUFFIX ".lib")
#endif
#undef check
#include "juce_AAX_Modifier_Injector.h"
@@ -1260,7 +1228,6 @@ namespace AAXClasses
break;
}
#if JUCE_AAX_HAS_TRANSPORT_NOTIFICATION
case AAX_eNotificationEvent_TransportStateChanged:
if (data != nullptr)
{
@@ -1268,7 +1235,6 @@ namespace AAXClasses
recordingState.set (info.mIsRecording);
}
break;
#endif
}
return AAX_CEffectParameters::NotificationReceived (type, data, size);
@@ -2415,9 +2381,7 @@ namespace AAXClasses
properties->AddProperty (AAX_eProperty_SupportsSaveRestore, false);
#endif
#if JUCE_AAX_HAS_TRANSPORT_NOTIFICATION
properties->AddProperty (AAX_eProperty_ObservesTransportState, true);
#endif
if (fullLayout.getChannelSet (true, 1) == AudioChannelSet::mono())
{


+ 103
- 0
modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp View File

@@ -0,0 +1,103 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
Agreement and JUCE Privacy Policy.
End User License Agreement: www.juce.com/juce-7-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#include <juce_core/system/juce_TargetPlatform.h>
#if JucePlugin_Build_AAX && (JUCE_MAC || JUCE_WINDOWS)
#include <AAX_Version.h>
static_assert (AAX_SDK_CURRENT_REVISION >= AAX_SDK_2p4p0_REVISION, "JUCE requires AAX SDK version 2.4.0 or higher");
#if JUCE_INTEL || (JUCE_MAC && JUCE_ARM)
#include <juce_core/system/juce_CompilerWarnings.h>
// Utilities
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
#include <Libs/AAXLibrary/source/AAX_CAutoreleasePool.Win.cpp>
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunused-parameter",
"-Wshift-sign-overflow",
"-Wextra-semi",
"-Wzero-as-null-pointer-constant",
"-Winconsistent-missing-destructor-override",
"-Wdeprecated-declarations")
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (6001 6053 4996 5033 4068 4996)
#include <Libs/AAXLibrary/source/AAX_CChunkDataParser.cpp>
#include <Libs/AAXLibrary/source/AAX_CHostServices.cpp>
#if defined(_WIN32) && ! defined(WIN32)
#define WIN32
#endif
#include <Libs/AAXLibrary/source/AAX_CMutex.cpp>
#include <Libs/AAXLibrary/source/AAX_CommonConversions.cpp>
#include <Libs/AAXLibrary/source/AAX_CPacketDispatcher.cpp>
#include <Libs/AAXLibrary/source/AAX_CString.cpp>
// Versioned Interfaces
#include <Interfaces/ACF/CACFClassFactory.cpp>
#include <Libs/AAXLibrary/source/AAX_CACFUnknown.cpp>
#include <Libs/AAXLibrary/source/AAX_CUIDs.cpp>
#include <Libs/AAXLibrary/source/AAX_IEffectDirectData.cpp>
#include <Libs/AAXLibrary/source/AAX_IEffectGUI.cpp>
#include <Libs/AAXLibrary/source/AAX_IEffectParameters.cpp>
#include <Libs/AAXLibrary/source/AAX_IHostProcessor.cpp>
#include <Libs/AAXLibrary/source/AAX_Properties.cpp>
#include <Libs/AAXLibrary/source/AAX_VAutomationDelegate.cpp>
#include <Libs/AAXLibrary/source/AAX_VCollection.cpp>
#include <Libs/AAXLibrary/source/AAX_VComponentDescriptor.cpp>
#include <Libs/AAXLibrary/source/AAX_VController.cpp>
#include <Libs/AAXLibrary/source/AAX_VDescriptionHost.cpp>
#include <Libs/AAXLibrary/source/AAX_VEffectDescriptor.cpp>
#include <Libs/AAXLibrary/source/AAX_VFeatureInfo.cpp>
#include <Libs/AAXLibrary/source/AAX_VHostProcessorDelegate.cpp>
#include <Libs/AAXLibrary/source/AAX_VHostServices.cpp>
#include <Libs/AAXLibrary/source/AAX_VPageTable.cpp>
#include <Libs/AAXLibrary/source/AAX_VPrivateDataAccess.cpp>
#include <Libs/AAXLibrary/source/AAX_VPropertyMap.cpp>
#include <Libs/AAXLibrary/source/AAX_VTransport.cpp>
#include <Libs/AAXLibrary/source/AAX_VViewContainer.cpp>
#include <Libs/AAXLibrary/source/AAX_CEffectDirectData.cpp>
#include <Libs/AAXLibrary/source/AAX_CEffectGUI.cpp>
#include <Libs/AAXLibrary/source/AAX_CEffectParameters.cpp>
#include <Libs/AAXLibrary/source/AAX_CHostProcessor.cpp>
#include <Libs/AAXLibrary/source/AAX_CParameter.cpp>
#include <Libs/AAXLibrary/source/AAX_CParameterManager.cpp>
#include <Libs/AAXLibrary/source/AAX_Init.cpp>
#include <Libs/AAXLibrary/source/AAX_SliderConversions.cpp>
JUCE_END_IGNORE_WARNINGS_MSVC
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#else
#error "This version of the AAX SDK does not support the current platform."
#endif
#endif

Loading…
Cancel
Save