| @@ -27,11 +27,7 @@ else | |||||
| fi | fi | ||||
| export MACOS="true" | export MACOS="true" | ||||
| if [ "${MACOS_VERSION_MIN}" == "10.12" ]; then | |||||
| export USING_JUCE="true" | |||||
| else | |||||
| export USING_JUCE="false" | |||||
| fi | |||||
| export USING_JUCE="true" | |||||
| export CC=clang | export CC=clang | ||||
| export CXX=clang++ | export CXX=clang++ | ||||
| @@ -42,7 +38,7 @@ unset CPPFLAGS | |||||
| # Complete 64bit build | # Complete 64bit build | ||||
| export CFLAGS="-I${TARGETDIR}/carla64/include -m64 -mmacosx-version-min=${MACOS_VERSION_MIN}" | export CFLAGS="-I${TARGETDIR}/carla64/include -m64 -mmacosx-version-min=${MACOS_VERSION_MIN}" | ||||
| export CXXFLAGS="${CFLAGS} -stdlib=libc++" | |||||
| export CXXFLAGS="${CFLAGS} -stdlib=libc++ -Wno-unused-private-field -Werror=auto-var-id" | |||||
| export LDFLAGS="-L${TARGETDIR}/carla64/lib -m64 -mmacosx-version-min=${MACOS_VERSION_MIN} -stdlib=libc++" | export LDFLAGS="-L${TARGETDIR}/carla64/lib -m64 -mmacosx-version-min=${MACOS_VERSION_MIN} -stdlib=libc++" | ||||
| export PATH=${TARGETDIR}/carla/bin:${TARGETDIR}/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin | export PATH=${TARGETDIR}/carla/bin:${TARGETDIR}/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin | ||||
| @@ -52,7 +48,7 @@ export MOC_QT5=moc | |||||
| export RCC_QT5=rcc | export RCC_QT5=rcc | ||||
| export UIC_QT5=uic | export UIC_QT5=uic | ||||
| make USING_JUCE=${USING_JUCE} USING_JUCE_AUDIO_DEVICES=${USING_JUCE} ${MAKE_ARGS} | |||||
| make USING_JUCE=${USING_JUCE} USING_JUCE_AUDIO_DEVICES=${USING_JUCE} ${MAKE_ARGS} -j 1 | |||||
| ############################################################################################## | ############################################################################################## | ||||
| # Build 32bit bridges | # Build 32bit bridges | ||||
| @@ -58,7 +58,11 @@ | |||||
| #endif | #endif | ||||
| #ifdef CARLA_OS_MAC | #ifdef CARLA_OS_MAC | ||||
| # define Component CocoaComponent | |||||
| # define Point CocoaPoint | |||||
| # import <Foundation/Foundation.h> | # import <Foundation/Foundation.h> | ||||
| # undef Component | |||||
| # undef Point | |||||
| #endif | #endif | ||||
| #ifdef CARLA_OS_WIN | #ifdef CARLA_OS_WIN | ||||
| @@ -236,8 +236,10 @@ private: | |||||
| { kAudioChannelLayoutTag_AAC_6_0, { centre, left, right, leftSurround, rightSurround, centreSurround } }, | { kAudioChannelLayoutTag_AAC_6_0, { centre, left, right, leftSurround, rightSurround, centreSurround } }, | ||||
| { kAudioChannelLayoutTag_AAC_6_1, { centre, left, right, leftSurround, rightSurround, centreSurround, LFE } }, | { kAudioChannelLayoutTag_AAC_6_1, { centre, left, right, leftSurround, rightSurround, centreSurround, LFE } }, | ||||
| { kAudioChannelLayoutTag_AAC_7_0, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear } }, | { kAudioChannelLayoutTag_AAC_7_0, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear } }, | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 | |||||
| { kAudioChannelLayoutTag_AAC_7_1_B, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, LFE } }, | { kAudioChannelLayoutTag_AAC_7_1_B, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, LFE } }, | ||||
| { kAudioChannelLayoutTag_AAC_7_1_C, { centre, left, right, leftSurround, rightSurround, LFE, topFrontLeft, topFrontRight } }, | { kAudioChannelLayoutTag_AAC_7_1_C, { centre, left, right, leftSurround, rightSurround, LFE, topFrontLeft, topFrontRight } }, | ||||
| #endif | |||||
| { kAudioChannelLayoutTag_AAC_Octagonal, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, centreSurround } }, | { kAudioChannelLayoutTag_AAC_Octagonal, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, centreSurround } }, | ||||
| { kAudioChannelLayoutTag_TMH_10_2_std, { left, right, centre, topFrontCentre, leftSurroundSide, rightSurroundSide, leftSurround, rightSurround, topFrontLeft, topFrontRight, wideLeft, wideRight, topRearCentre, centreSurround, LFE, LFE2 } }, | { kAudioChannelLayoutTag_TMH_10_2_std, { left, right, centre, topFrontCentre, leftSurroundSide, rightSurroundSide, leftSurround, rightSurround, topFrontLeft, topFrontRight, wideLeft, wideRight, topRearCentre, centreSurround, LFE, LFE2 } }, | ||||
| { kAudioChannelLayoutTag_AC3_1_0_1, { centre, LFE } }, | { kAudioChannelLayoutTag_AC3_1_0_1, { centre, LFE } }, | ||||
| @@ -58,6 +58,10 @@ | |||||
| namespace juce | namespace juce | ||||
| { | { | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_8 | |||||
| static const uint32 kAudioUnitType_MIDIProcessor = 'aumi'; | |||||
| #endif | |||||
| // Change this to disable logging of various activities | // Change this to disable logging of various activities | ||||
| #ifndef AU_LOGGING | #ifndef AU_LOGGING | ||||
| #define AU_LOGGING 1 | #define AU_LOGGING 1 | ||||
| @@ -610,7 +610,7 @@ private: | |||||
| struct BasicOptional final | struct BasicOptional final | ||||
| { | { | ||||
| BasicOptional() noexcept = default; | BasicOptional() noexcept = default; | ||||
| BasicOptional (const Item& i) noexcept : item { i }, isValid { true } {} | |||||
| BasicOptional (const Item& i) noexcept : item ( i ), isValid ( true ) {} | |||||
| Item item; | Item item; | ||||
| bool isValid{}; | bool isValid{}; | ||||
| @@ -71,7 +71,7 @@ inline NSArray* varArrayToNSArray (const var& varToParse); | |||||
| inline NSDictionary* varObjectToNSDictionary (const var& varToParse) | inline NSDictionary* varObjectToNSDictionary (const var& varToParse) | ||||
| { | { | ||||
| auto dictionary = [NSMutableDictionary dictionary]; | |||||
| NSDictionary* dictionary = [NSMutableDictionary dictionary]; | |||||
| if (varToParse.isObject()) | if (varToParse.isObject()) | ||||
| { | { | ||||
| @@ -118,7 +118,7 @@ inline NSArray* varArrayToNSArray (const var& varToParse) | |||||
| const auto* varArray = varToParse.getArray(); | const auto* varArray = varToParse.getArray(); | ||||
| auto array = [NSMutableArray arrayWithCapacity: (NSUInteger) varArray->size()]; | |||||
| NSArray* array = [NSMutableArray arrayWithCapacity: (NSUInteger) varArray->size()]; | |||||
| for (const auto& aVar : *varArray) | for (const auto& aVar : *varArray) | ||||
| { | { | ||||
| @@ -92,7 +92,7 @@ | |||||
| //============================================================================== | //============================================================================== | ||||
| // C++ library | // C++ library | ||||
| #if (defined (__GLIBCXX__) && __GLIBCXX__ < 20130322) || (defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 3700)) | |||||
| #if (defined (__GLIBCXX__) && __GLIBCXX__ < 20130322) | |||||
| #error "JUCE requires a C++ library containing std::atomic" | #error "JUCE requires a C++ library containing std::atomic" | ||||
| #endif | #endif | ||||
| @@ -99,11 +99,7 @@ namespace juce | |||||
| deliberately and want to ignore the warning. | deliberately and want to ignore the warning. | ||||
| */ | */ | ||||
| #if JUCE_CLANG | #if JUCE_CLANG | ||||
| #if __has_cpp_attribute(clang::fallthrough) | |||||
| #define JUCE_FALLTHROUGH [[clang::fallthrough]]; | |||||
| #else | |||||
| #define JUCE_FALLTHROUGH | |||||
| #endif | |||||
| #define JUCE_FALLTHROUGH [[clang::fallthrough]]; | |||||
| #elif JUCE_GCC | #elif JUCE_GCC | ||||
| #if __GNUC__ >= 7 | #if __GNUC__ >= 7 | ||||
| #define JUCE_FALLTHROUGH [[gnu::fallthrough]]; | #define JUCE_FALLTHROUGH [[gnu::fallthrough]]; | ||||
| @@ -144,8 +144,8 @@ | |||||
| #endif | #endif | ||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| #if ! defined (MAC_OS_X_VERSION_10_11) | |||||
| #error "The 10.11 SDK (Xcode 7.3.1+) is required to build JUCE apps. You can create apps that run on macOS 10.7+ by changing the deployment target." | |||||
| #if ! defined (MAC_OS_X_VERSION_10_8) | |||||
| #error "The 10.8 SDK is required to build JUCE apps. You can create apps that run on macOS 10.7+ by changing the deployment target." | |||||
| #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 | ||||
| #error "Building for OSX 10.6 is no longer supported!" | #error "Building for OSX 10.6 is no longer supported!" | ||||
| #endif | #endif | ||||
| @@ -26,6 +26,10 @@ | |||||
| namespace juce | namespace juce | ||||
| { | { | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_8 | |||||
| #define __nullable | |||||
| #endif | |||||
| //============================================================================== | //============================================================================== | ||||
| // This class has been renamed from CoreGraphicsImage to avoid a symbol | // This class has been renamed from CoreGraphicsImage to avoid a symbol | ||||
| // collision in Pro Tools 2019.12 and possibly 2020 depending on the Pro Tools | // collision in Pro Tools 2019.12 and possibly 2020 depending on the Pro Tools | ||||
| @@ -362,20 +362,20 @@ namespace CoreTextTypeLayout | |||||
| auto verticalJustification = text.getJustification().getOnlyVerticalFlags(); | auto verticalJustification = text.getJustification().getOnlyVerticalFlags(); | ||||
| auto ctFrameArea = [area, minCTFrameHeight, verticalJustification] | |||||
| const Rectangle<float> ctFrameArea = [area, minCTFrameHeight, verticalJustification] | |||||
| { | { | ||||
| if (minCTFrameHeight < area.getHeight()) | if (minCTFrameHeight < area.getHeight()) | ||||
| return area; | |||||
| return Rectangle<float> (area); | |||||
| if (verticalJustification == Justification::verticallyCentred) | if (verticalJustification == Justification::verticallyCentred) | ||||
| return area.withSizeKeepingCentre (area.getWidth(), minCTFrameHeight); | return area.withSizeKeepingCentre (area.getWidth(), minCTFrameHeight); | ||||
| auto frameArea = area.withHeight (minCTFrameHeight); | |||||
| const Rectangle<float> frameArea = area.withHeight (minCTFrameHeight); | |||||
| if (verticalJustification == Justification::bottom) | if (verticalJustification == Justification::bottom) | ||||
| return frameArea.withBottomY (area.getBottom()); | return frameArea.withBottomY (area.getBottom()); | ||||
| return frameArea; | |||||
| return Rectangle<float> (frameArea); | |||||
| }(); | }(); | ||||
| auto frame = createCTFrame (framesetter, CGRectMake ((CGFloat) ctFrameArea.getX(), flipHeight - (CGFloat) ctFrameArea.getBottom(), | auto frame = createCTFrame (framesetter, CGRectMake ((CGFloat) ctFrameArea.getX(), flipHeight - (CGFloat) ctFrameArea.getBottom(), | ||||
| @@ -1528,17 +1528,21 @@ private: | |||||
| case NSEventTypeSystemDefined: | case NSEventTypeSystemDefined: | ||||
| case NSEventTypeApplicationDefined: | case NSEventTypeApplicationDefined: | ||||
| case NSEventTypePeriodic: | case NSEventTypePeriodic: | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 | |||||
| case NSEventTypeGesture: | case NSEventTypeGesture: | ||||
| #endif | |||||
| case NSEventTypeMagnify: | case NSEventTypeMagnify: | ||||
| case NSEventTypeSwipe: | case NSEventTypeSwipe: | ||||
| case NSEventTypeRotate: | case NSEventTypeRotate: | ||||
| case NSEventTypeBeginGesture: | case NSEventTypeBeginGesture: | ||||
| case NSEventTypeEndGesture: | case NSEventTypeEndGesture: | ||||
| case NSEventTypeQuickLook: | case NSEventTypeQuickLook: | ||||
| #if JUCE_64BIT | |||||
| #if JUCE_64BIT | |||||
| case NSEventTypeSmartMagnify: | case NSEventTypeSmartMagnify: | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 | |||||
| case NSEventTypePressure: | case NSEventTypePressure: | ||||
| #endif | #endif | ||||
| #endif | |||||
| #if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12 | #if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12 | ||||
| #if JUCE_64BIT | #if JUCE_64BIT | ||||
| case NSEventTypeDirectTouch: | case NSEventTypeDirectTouch: | ||||
| @@ -309,7 +309,7 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi | |||||
| for (auto& filename : files) | for (auto& filename : files) | ||||
| { | { | ||||
| auto* nsFilename = juceStringToNS (filename); | auto* nsFilename = juceStringToNS (filename); | ||||
| auto fileURL = [NSURL fileURLWithPath: nsFilename]; | |||||
| NSURL* fileURL = [NSURL fileURLWithPath: nsFilename]; | |||||
| auto dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter: fileURL]; | auto dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter: fileURL]; | ||||
| auto eventPos = [event locationInWindow]; | auto eventPos = [event locationInWindow]; | ||||
| @@ -142,7 +142,9 @@ | |||||
| #include "misc/juce_PushNotifications.cpp" | #include "misc/juce_PushNotifications.cpp" | ||||
| #include "misc/juce_RecentlyOpenedFilesList.cpp" | #include "misc/juce_RecentlyOpenedFilesList.cpp" | ||||
| #include "misc/juce_SplashScreen.cpp" | #include "misc/juce_SplashScreen.cpp" | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 | |||||
| #include "misc/juce_SystemTrayIconComponent.cpp" | #include "misc/juce_SystemTrayIconComponent.cpp" | ||||
| #endif | |||||
| #include "misc/juce_LiveConstantEditor.cpp" | #include "misc/juce_LiveConstantEditor.cpp" | ||||
| #include "misc/juce_AnimatedAppComponent.cpp" | #include "misc/juce_AnimatedAppComponent.cpp" | ||||
| @@ -154,8 +156,10 @@ | |||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| #include "native/juce_mac_NSViewComponent.mm" | #include "native/juce_mac_NSViewComponent.mm" | ||||
| #include "native/juce_mac_AppleRemote.mm" | #include "native/juce_mac_AppleRemote.mm" | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 | |||||
| #include "native/juce_mac_SystemTrayIcon.cpp" | #include "native/juce_mac_SystemTrayIcon.cpp" | ||||
| #endif | #endif | ||||
| #endif | |||||
| #if JUCE_IOS | #if JUCE_IOS | ||||
| #include "native/juce_ios_UIViewComponent.mm" | #include "native/juce_ios_UIViewComponent.mm" | ||||
| @@ -115,7 +115,9 @@ | |||||
| #include "misc/juce_PushNotifications.h" | #include "misc/juce_PushNotifications.h" | ||||
| #include "misc/juce_RecentlyOpenedFilesList.h" | #include "misc/juce_RecentlyOpenedFilesList.h" | ||||
| #include "misc/juce_SplashScreen.h" | #include "misc/juce_SplashScreen.h" | ||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 | |||||
| #include "misc/juce_SystemTrayIconComponent.h" | #include "misc/juce_SystemTrayIconComponent.h" | ||||
| #endif | |||||
| #include "misc/juce_WebBrowserComponent.h" | #include "misc/juce_WebBrowserComponent.h" | ||||
| #include "misc/juce_LiveConstantEditor.h" | #include "misc/juce_LiveConstantEditor.h" | ||||
| #include "misc/juce_AnimatedAppComponent.h" | #include "misc/juce_AnimatedAppComponent.h" | ||||
| @@ -157,7 +157,7 @@ void RecentlyOpenedFilesList::forgetRecentFileNatively (const File& file) | |||||
| // from the recent list, so we clear them all and add them back excluding | // from the recent list, so we clear them all and add them back excluding | ||||
| // the specified file | // the specified file | ||||
| auto sharedDocController = [NSDocumentController sharedDocumentController]; | |||||
| NSDocumentController* sharedDocController = [NSDocumentController sharedDocumentController]; | |||||
| auto recentDocumentURLs = [sharedDocController recentDocumentURLs]; | auto recentDocumentURLs = [sharedDocController recentDocumentURLs]; | ||||
| [sharedDocController clearRecentDocuments: nil]; | [sharedDocController clearRecentDocuments: nil]; | ||||
| @@ -26,7 +26,11 @@ | |||||
| #if defined(CARLA_OS_LINUX) && defined(HAVE_X11) | #if defined(CARLA_OS_LINUX) && defined(HAVE_X11) | ||||
| # include <X11/Xlib.h> | # include <X11/Xlib.h> | ||||
| #elif defined(CARLA_OS_MAC) | #elif defined(CARLA_OS_MAC) | ||||
| # define Component CocoaComponent | |||||
| # define Point CocoaPoint | |||||
| # import <Cocoa/Cocoa.h> | # import <Cocoa/Cocoa.h> | ||||
| # undef Component | |||||
| # undef Point | |||||
| #endif | #endif | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||