fix macOS build (following Projucer changes made in Windows, which removed /Applications/JUCE/modules from its headers). move JUCE headers under source control, so that Windows and macOS can both build against same version of JUCE. remove AUv3 target (I think it's an iOS thing, so it will never work with this macOS fluidsynth dylib).

This commit is contained in:
Alex Birch
2018-06-17 13:34:53 +01:00
parent a2be47c887
commit dff4d13a1d
1563 changed files with 601601 additions and 3466 deletions

View File

@ -0,0 +1,77 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-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.
==============================================================================
*/
#if JucePlugin_Build_RTAS
#include "../../juce_core/system/juce_TargetPlatform.h"
#include "../utility/juce_CheckSettingMacros.h"
#include "juce_RTAS_DigiCode_Header.h"
/*
This file is used to include and build the required digidesign CPP files without your project
needing to reference the files directly. Because these files will be found via your include path,
this means that the project doesn't have to change to cope with people's SDKs being in different
locations.
Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
going on... All the other files in your project can be set to use the normal __cdecl convention.
If you get an error building the includes statements below, check your paths - there's a full
list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
*/
#if WINDOWS_VERSION
#undef _UNICODE
#undef UNICODE
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#pragma clang diagnostic ignored "-Wcomment"
#pragma clang diagnostic ignored "-Wreorder"
#pragma clang diagnostic ignored "-Wextra-tokens"
#pragma clang diagnostic ignored "-Wunused-variable"
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
#include <CEffectGroup.cpp>
#include <CEffectGroupMIDI.cpp>
#include <CEffectMIDIUtils.cpp>
#include <CEffectProcess.cpp>
#include <CEffectProcessAS.cpp>
#include <CEffectType.cpp>
#include <CEffectTypeRTAS.cpp>
#include <ChunkDataParser.cpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif

View File

@ -0,0 +1,65 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-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.
==============================================================================
*/
#if JucePlugin_Build_RTAS
#include "../../juce_core/system/juce_TargetPlatform.h"
#include "../utility/juce_CheckSettingMacros.h"
#include "juce_RTAS_DigiCode_Header.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcomment"
#pragma clang diagnostic ignored "-Wextra-tokens"
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#pragma clang diagnostic ignored "-Wreorder"
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
/*
This file is used to include and build the required digidesign CPP files without your project
needing to reference the files directly. Because these files will be found via your include path,
this means that the project doesn't have to change to cope with people's SDKs being in different
locations.
Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
going on... All the other files in your project can be set to use the normal __cdecl convention.
If you get an error building the includes statements below, check your paths - there's a full
list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
*/
#include <CEffectProcessMIDI.cpp>
#include <PlugInUtils.cpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif

View File

@ -0,0 +1,80 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-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"
#include "../utility/juce_CheckSettingMacros.h"
#if JucePlugin_Build_RTAS
#include "../utility/juce_IncludeSystemHeaders.h"
#include "juce_RTAS_DigiCode_Header.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#pragma clang diagnostic ignored "-Wextra-tokens"
#pragma clang diagnostic ignored "-Wreorder"
#endif
/*
This file is used to include and build the required digidesign CPP files without your project
needing to reference the files directly. Because these files will be found via your include path,
this means that the project doesn't have to change to cope with people's SDKs being in different
locations.
Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
going on... All the other files in your project can be set to use the normal __cdecl convention.
If you get an error building the includes statements below, check your paths - there's a full
list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
*/
#if WINDOWS_VERSION
#undef _UNICODE
#undef UNICODE
#define DllMain DllMainRTAS
#include <DLLMain.cpp>
#undef DllMain
#include <DefaultSwap.cpp>
#else
#include <PlugInInitialize.cpp>
#include <Dispatcher.cpp>
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#else
#if _MSC_VER
short __stdcall NewPlugIn (void*) { return 0; }
short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; }
#endif
#endif

View File

@ -0,0 +1,67 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-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.
==============================================================================
*/
#if JucePlugin_Build_RTAS
#ifdef _MSC_VER
#define kCompileAsCodeResource 0
#define kBuildStandAlone 0
#define kNoDSP 0
#define kNoDAE 0
#define kNoSDS 0
#define kNoViews 0
#define kUseDSPCodeDecode 0
#define WIN32 1
#define WINDOWS_VERSION 1
#define PLUGIN_SDK_BUILD 1
#define PLUGIN_SDK_DIRECTMIDI 1
#define _STDINT_H 1
// the Digidesign projects all use a struct alignment of 2..
#pragma pack (2)
#pragma warning (disable: 4267 4996 4311 4312 4103 4121 4100 4127 4189 4245 4389 4512 4701 4703)
#include <ForcedInclude.h>
#else
#define kCompileAsCodeResource 0
#define kNoDSP 1
#define kNoDAE 0
#define kNoSDS 0
#define kNoViews 0
#define kUseDSPCodeDecode 0
#define MAC_VERSION 1
#define PLUGIN_SDK_BUILD 1
#define PLUGIN_SDK_DIRECTMIDI 1
#define DIGI_PASCAL
#include <MacAlwaysInclude.h>
#endif
#endif

View File

@ -0,0 +1,175 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-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.
==============================================================================
*/
#if JucePlugin_Build_RTAS
#include "../../juce_core/system/juce_TargetPlatform.h"
#include "../utility/juce_CheckSettingMacros.h"
// Horrible carbon-based fix for a cocoa bug, where an NSWindow that wraps a carbon
// window fails to keep its position updated when the user drags the window around..
#define WINDOWPOSITION_BODGE 1
#define JUCE_MAC_WINDOW_VISIBITY_BODGE 1
#include "../utility/juce_IncludeSystemHeaders.h"
#include "../utility/juce_IncludeModuleHeaders.h"
#include "../utility/juce_CarbonVisibility.h"
namespace juce
{
using namespace juce;
//==============================================================================
void initialiseMacRTAS();
void initialiseMacRTAS()
{
#if ! JUCE_64BIT
NSApplicationLoad();
#endif
}
void* attachSubWindow (void*, Component*);
void* attachSubWindow (void* hostWindowRef, Component* comp)
{
JUCE_AUTORELEASEPOOL
{
#if 0
// This was suggested as a way to improve passing keypresses to the host, but
// a side-effect seems to be occasional rendering artifacts.
HIWindowChangeClass ((WindowRef) hostWindowRef, kFloatingWindowClass);
#endif
NSWindow* hostWindow = [[NSWindow alloc] initWithWindowRef: hostWindowRef];
[hostWindow retain];
[hostWindow setCanHide: YES];
[hostWindow setReleasedWhenClosed: YES];
NSRect oldWindowFrame = [hostWindow frame];
NSView* content = [hostWindow contentView];
NSRect f = [content frame];
f.size.width = comp->getWidth();
f.size.height = comp->getHeight();
[content setFrame: f];
const CGFloat mainScreenHeight = [[[NSScreen screens] objectAtIndex: 0] frame].size.height;
#if WINDOWPOSITION_BODGE
{
Rect winBounds;
GetWindowBounds ((WindowRef) hostWindowRef, kWindowContentRgn, &winBounds);
NSRect w = [hostWindow frame];
w.origin.x = winBounds.left;
w.origin.y = mainScreenHeight - winBounds.bottom;
[hostWindow setFrame: w display: NO animate: NO];
}
#endif
NSPoint windowPos = [hostWindow convertBaseToScreen: f.origin];
windowPos.x = windowPos.x + jmax (0.0f, (oldWindowFrame.size.width - f.size.width) / 2.0f);
windowPos.y = mainScreenHeight - (windowPos.y + f.size.height);
comp->setTopLeftPosition ((int) windowPos.x, (int) windowPos.y);
#if ! JucePlugin_EditorRequiresKeyboardFocus
comp->addToDesktop (ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresKeyPresses);
#else
comp->addToDesktop (ComponentPeer::windowIsTemporary);
#endif
comp->setVisible (true);
NSView* pluginView = (NSView*) comp->getWindowHandle();
NSWindow* pluginWindow = [pluginView window];
[hostWindow addChildWindow: pluginWindow
ordered: NSWindowAbove];
[hostWindow orderFront: nil];
[pluginWindow orderFront: nil];
attachWindowHidingHooks (comp, (WindowRef) hostWindowRef, hostWindow);
return hostWindow;
}
}
void removeSubWindow (void*, Component*);
void removeSubWindow (void* nsWindow, Component* comp)
{
JUCE_AUTORELEASEPOOL
{
NSView* pluginView = (NSView*) comp->getWindowHandle();
NSWindow* hostWindow = (NSWindow*) nsWindow;
NSWindow* pluginWindow = [pluginView window];
removeWindowHidingHooks (comp);
[hostWindow removeChildWindow: pluginWindow];
comp->removeFromDesktop();
[hostWindow release];
}
}
namespace
{
bool isJuceWindow (WindowRef w)
{
for (int i = ComponentPeer::getNumPeers(); --i >= 0;)
{
ComponentPeer* peer = ComponentPeer::getPeer(i);
NSView* view = (NSView*) peer->getNativeHandle();
if ([[view window] windowRef] == w)
return true;
}
return false;
}
}
void forwardCurrentKeyEventToHostWindow();
void forwardCurrentKeyEventToHostWindow()
{
WindowRef w = FrontNonFloatingWindow();
WindowRef original = w;
while (IsValidWindowPtr (w) && isJuceWindow (w))
{
w = GetNextWindowOfClass (w, kDocumentWindowClass, true);
if (w == original)
break;
}
if (! isJuceWindow (w))
{
ActivateWindow (w, true);
repostCurrentNSEvent();
}
}
} // namespace juce
#endif

View File

@ -0,0 +1,4 @@
EXPORTS
NewPlugIn @1
_PI_GetRoutineDescriptor @2

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,159 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-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.
==============================================================================
*/
#if JucePlugin_Build_RTAS
#include "../../juce_core/system/juce_TargetPlatform.h"
#include "../utility/juce_CheckSettingMacros.h"
// (these functions are in their own file because of problems including windows.h
// at the same time as the Digi headers)
#define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY // (workaround for a VC build problem)
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#undef STRICT
#define STRICT
#include <intrin.h>
#include <windows.h>
#pragma pack (push, 8)
#include "../utility/juce_IncludeModuleHeaders.h"
#pragma pack (pop)
namespace juce
{
//==============================================================================
void JUCE_CALLTYPE attachSubWindow (void* hostWindow,
int& titleW, int& titleH,
Component* comp)
{
RECT clientRect;
GetClientRect ((HWND) hostWindow, &clientRect);
titleW = clientRect.right - clientRect.left;
titleH = jmax (0, (int) (clientRect.bottom - clientRect.top) - comp->getHeight());
comp->setTopLeftPosition (0, titleH);
comp->addToDesktop (0);
HWND plugWnd = (HWND) comp->getWindowHandle();
SetParent (plugWnd, (HWND) hostWindow);
DWORD val = GetWindowLong (plugWnd, GWL_STYLE);
val = (val & ~WS_POPUP) | WS_CHILD;
SetWindowLong (plugWnd, GWL_STYLE, val);
val = GetWindowLong ((HWND) hostWindow, GWL_STYLE);
SetWindowLong ((HWND) hostWindow, GWL_STYLE, val | WS_CLIPCHILDREN);
}
void JUCE_CALLTYPE resizeHostWindow (void* hostWindow,
int& titleW, int& titleH,
Component* comp)
{
RECT clientRect, windowRect;
GetClientRect ((HWND) hostWindow, &clientRect);
GetWindowRect ((HWND) hostWindow, &windowRect);
const int borderW = (windowRect.right - windowRect.left) - (clientRect.right - clientRect.left);
const int borderH = (windowRect.bottom - windowRect.top) - (clientRect.bottom - clientRect.top);
SetWindowPos ((HWND) hostWindow, 0, 0, 0,
borderW + jmax (titleW, comp->getWidth()),
borderH + comp->getHeight() + titleH,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
}
extern "C" BOOL WINAPI DllMainRTAS (HINSTANCE, DWORD, LPVOID);
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID reserved)
{
if (reason == DLL_PROCESS_ATTACH)
Process::setCurrentModuleInstanceHandle (instance);
if (GetModuleHandleA ("DAE.DLL") != 0)
return DllMainRTAS (instance, reason, reserved);
ignoreUnused (reserved);
return TRUE;
}
#if ! JucePlugin_EditorRequiresKeyboardFocus
namespace
{
HWND findMDIParentOf (HWND w)
{
const int frameThickness = GetSystemMetrics (SM_CYFIXEDFRAME);
while (w != 0)
{
HWND parent = GetParent (w);
if (parent == 0)
break;
TCHAR windowType [32] = { 0 };
GetClassName (parent, windowType, 31);
if (String (windowType).equalsIgnoreCase ("MDIClient"))
{
w = parent;
break;
}
RECT windowPos, parentPos;
GetWindowRect (w, &windowPos);
GetWindowRect (parent, &parentPos);
int dw = (parentPos.right - parentPos.left) - (windowPos.right - windowPos.left);
int dh = (parentPos.bottom - parentPos.top) - (windowPos.bottom - windowPos.top);
if (dw > 100 || dh > 100)
break;
w = parent;
if (dw == 2 * frameThickness)
break;
}
return w;
}
}
void JUCE_CALLTYPE passFocusToHostWindow (void* hostWindow)
{
SetFocus (findMDIParentOf ((HWND) hostWindow));
}
#endif
} // namespace juce
#endif

File diff suppressed because it is too large Load Diff