2,780 changes: 2,780 additions & 0 deletions libs/juce7/patches/04_vst2-interface.patch

Large diffs are not rendered by default.

538 changes: 538 additions & 0 deletions libs/juce7/patches/04_vst2-interface_file.patch

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions libs/juce7/patches/05_mingw-fixes.patch
@@ -0,0 +1,100 @@
diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
index 3fcb6f54a..dd044d108 100644
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
@@ -61,7 +61,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996 4100)
#define PRAGMA_ALIGN_SUPPORTED 1
#endif

-#if ! JUCE_MSVC
+#if ! JUCE_WINDOWS
#define __cdecl
#endif

diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
index f3a3ba2f8..7336fff7d 100644
--- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
@@ -57,9 +57,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4355)
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x0319
#endif
-
- extern "C" void _fpreset();
- extern "C" void _clearfp();
#elif ! JUCE_WINDOWS
static void _fpreset() {}
static void _clearfp() {}
diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp
index 6755bba64..3ebe35f2b 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -67,10 +67,13 @@
#include <vfw.h>
#include <commdlg.h>
#include <commctrl.h>
- #include <UIAutomation.h>
#include <sapi.h>
#include <Dxgi.h>

+ #if JUCE_MSVC
+ #include <UIAutomation.h>
+ #endif
+
#if JUCE_WEB_BROWSER
#include <exdisp.h>
#include <exdispid.h>
@@ -287,13 +290,15 @@ namespace juce
#include "native/juce_mac_MouseCursor.mm"

#elif JUCE_WINDOWS
- #include "native/accessibility/juce_win32_ComInterfaces.h"
- #include "native/accessibility/juce_win32_WindowsUIAWrapper.h"
- #include "native/accessibility/juce_win32_AccessibilityElement.h"
- #include "native/accessibility/juce_win32_UIAHelpers.h"
- #include "native/accessibility/juce_win32_UIAProviders.h"
- #include "native/accessibility/juce_win32_AccessibilityElement.cpp"
- #include "native/accessibility/juce_win32_Accessibility.cpp"
+ #if JUCE_MSVC
+ #include "native/accessibility/juce_win32_ComInterfaces.h"
+ #include "native/accessibility/juce_win32_WindowsUIAWrapper.h"
+ #include "native/accessibility/juce_win32_AccessibilityElement.h"
+ #include "native/accessibility/juce_win32_UIAHelpers.h"
+ #include "native/accessibility/juce_win32_UIAProviders.h"
+ #include "native/accessibility/juce_win32_AccessibilityElement.cpp"
+ #include "native/accessibility/juce_win32_Accessibility.cpp"
+ #endif
#include "native/juce_win32_Windowing.cpp"
#include "native/juce_win32_DragAndDrop.cpp"
#include "native/juce_win32_FileChooser.cpp"
diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
index cb247722a..7a012c39c 100644
--- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
@@ -1667,8 +1667,10 @@ public:
// do this first to avoid messages arriving for this window before it's destroyed
JuceWindowIdentifier::setAsJUCEWindow (hwnd, false);

+ #if JUCE_MSVC
if (isAccessibilityActive)
WindowsAccessibility::revokeUIAMapEntriesForWindow (hwnd);
+ #endif

shadower = nullptr;
currentTouches.deleteAllTouchesForPeer (this);
@@ -4246,6 +4248,7 @@ private:
case WM_GETDLGCODE:
return DLGC_WANTALLKEYS;

+ #if JUCE_MSVC
case WM_GETOBJECT:
{
if (static_cast<long> (lParam) == WindowsAccessibility::getUiaRootObjectId())
@@ -4264,6 +4267,7 @@ private:

break;
}
+ #endif
default:
break;
}
30 changes: 30 additions & 0 deletions libs/juce7/patches/06_fix-coregraphics-rendering-macro-usage.patch
@@ -0,0 +1,30 @@
diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
index 17361fc7e..1fed43c3d 100644
--- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
+++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
@@ -1089,6 +1089,7 @@ public:

auto dispatchRectangles = [this] ()
{
+ #if USE_COREGRAPHICS_RENDERING
if (@available (macOS 10.14, *))
{
if (metalRenderer != nullptr)
@@ -1101,6 +1102,7 @@ public:
deferredRepaints);
}
}
+ #endif

for (auto& i : deferredRepaints)
[view setNeedsDisplayInRect: makeNSRect (i)];
@@ -1900,7 +1902,9 @@ private:
CVDisplayLinkRef displayLink = nullptr;
dispatch_source_t displaySource = nullptr;

+ #if USE_COREGRAPHICS_RENDERING
std::unique_ptr<CoreGraphicsMetalLayerRenderer> metalRenderer;
+ #endif

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NSViewComponentPeer)
};
13 changes: 13 additions & 0 deletions libs/juce7/patches/07_allow-local-ladspa.patch
@@ -0,0 +1,13 @@
diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
index cec1528a4..2ad49260d 100644
--- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
@@ -25,7 +25,7 @@

#if JUCE_PLUGINHOST_LADSPA && (JUCE_LINUX || JUCE_BSD)

-#include <ladspa.h>
+#include "ladspa.h"

namespace juce
{
127 changes: 127 additions & 0 deletions libs/juce7/patches/08_remove-splashscreen.patch
@@ -0,0 +1,127 @@
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp
index 3b88ccee0..cb6f1ce60 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp
@@ -40,8 +40,6 @@ AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* p) noexcept : proce

AudioProcessorEditor::~AudioProcessorEditor()
{
- splashScreen.deleteAndZero();
-
// if this fails, then the wrapper hasn't called editorBeingDeleted() on the
// filter for some reason..
jassert (processor.getActiveEditor() != this);
@@ -56,23 +54,6 @@ void AudioProcessorEditor::hostMIDIControllerIsAvailable (bool) {

void AudioProcessorEditor::initialise()
{
- /*
- ==========================================================================
- In accordance with the terms of the JUCE 7 End-Use License Agreement, the
- JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
- ineffective unless you have a JUCE Indie or Pro license, or are using
- JUCE under the GPL v3 license.
-
- End User License Agreement: www.juce.com/juce-7-licence
- ==========================================================================
- */
-
- // BEGIN SECTION A
-
- splashScreen = new JUCESplashScreen (*this);
-
- // END SECTION A
-
attachConstrainer (&defaultConstrainer);
resizeListener.reset (new AudioProcessorEditorListener (*this));
addComponentListener (resizeListener.get());
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
index df43af642..af1805ac3 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
@@ -235,7 +235,6 @@ private:
ComponentBoundsConstrainer defaultConstrainer;
ComponentBoundsConstrainer* constrainer = nullptr;
AudioProcessorEditorHostContext* hostContext = nullptr;
- Component::SafePointer<Component> splashScreen;
AffineTransform hostScaleTransform;

JUCE_DECLARE_NON_COPYABLE (AudioProcessorEditor)
diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp
index 3ebe35f2b..944d25b1c 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -252,7 +252,6 @@ namespace juce
#include "misc/juce_BubbleComponent.cpp"
#include "misc/juce_DropShadower.cpp"
#include "misc/juce_FocusOutline.cpp"
-#include "misc/juce_JUCESplashScreen.cpp"

#include "layout/juce_FlexBox.cpp"
#include "layout/juce_GridItem.cpp"
diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h
index 40b367eb3..3f7368dd1 100644
--- a/modules/juce_gui_basics/juce_gui_basics.h
+++ b/modules/juce_gui_basics/juce_gui_basics.h
@@ -265,7 +265,6 @@ namespace juce
#include "buttons/juce_ToolbarButton.h"
#include "misc/juce_DropShadower.h"
#include "misc/juce_FocusOutline.h"
-#include "misc/juce_JUCESplashScreen.h"
#include "widgets/juce_TreeView.h"
#include "windows/juce_TopLevelWindow.h"
#include "windows/juce_MessageBoxOptions.h"
diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
index 8b711b504..db28b93a9 100644
--- a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
+++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
@@ -41,8 +41,6 @@ ResizableWindow::ResizableWindow (const String& name, Colour bkgnd, bool shouldA

ResizableWindow::~ResizableWindow()
{
- splashScreen.deleteAndZero();
-
// Don't delete or remove the resizer components yourself! They're managed by the
// ResizableWindow, and you should leave them alone! You may have deleted them
// accidentally by careless use of deleteAllChildren()..?
@@ -60,27 +58,6 @@ ResizableWindow::~ResizableWindow()

void ResizableWindow::initialise (const bool shouldAddToDesktop)
{
- /*
- ==========================================================================
-
- In accordance with the terms of the JUCE 7 End-Use License Agreement, the
- JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
- ineffective unless you have a JUCE Indie or Pro license, or are using
- JUCE under the GPL v3 license.
-
- End User License Agreement: www.juce.com/juce-7-licence
-
- ==========================================================================
- */
-
- // BEGIN SECTION A
-
- #if ! JucePlugin_Build_Standalone
- splashScreen = new JUCESplashScreen (*this);
- #endif
-
- // END SECTION A
-
defaultConstrainer.setMinimumOnscreenAmounts (0x10000, 16, 24, 16);

lastNonFullScreenPos.setBounds (50, 50, 256, 256);
diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.h b/modules/juce_gui_basics/windows/juce_ResizableWindow.h
index b381b73fb..d6469c35d 100644
--- a/modules/juce_gui_basics/windows/juce_ResizableWindow.h
+++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.h
@@ -391,7 +391,7 @@ protected:

private:
//==============================================================================
- Component::SafePointer<Component> contentComponent, splashScreen;
+ Component::SafePointer<Component> contentComponent;
bool ownsContentComponent = false, resizeToFitContent = false, fullscreen = false, canDrag = true, dragStarted = false;
ComponentDragger dragger;
Rectangle<int> lastNonFullScreenPos;
46 changes: 46 additions & 0 deletions libs/juce7/patches/09_proper-getExecutableFile.patch
@@ -0,0 +1,46 @@
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index 700e191e9..b0df41553 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -617,12 +617,39 @@ File juce_getExecutableFile()

auto localSymbol = (void*) juce_getExecutableFile;
dladdr (localSymbol, &exeInfo);
- return CharPointer_UTF8 (exeInfo.dli_fname);
+
+ const CharPointer_UTF8 filename (exeInfo.dli_fname);
+
+ // if the filename is absolute simply return it
+ if (File::isAbsolutePath (filename))
+ return filename;
+
+ // if the filename is relative construct from CWD
+ if (filename[0] == '.')
+ return File::getCurrentWorkingDirectory().getChildFile (filename).getFullPathName();
+
+ // filename is abstract, look up in PATH
+ if (const char* const envpath = ::getenv ("PATH"))
+ {
+ StringArray paths (StringArray::fromTokens (envpath, ":", ""));
+
+ for (int i=paths.size(); --i>=0;)
+ {
+ const File filepath (File (paths[i]).getChildFile (filename));
+
+ if (filepath.existsAsFile())
+ return filepath.getFullPathName();
+ }
+ }
+
+ // if we reach this, we failed to find ourselves...
+ jassertfalse;
+ return filename;
}
};

static String filename = DLAddrReader::getFilename();
- return File::getCurrentWorkingDirectory().getChildFile (filename);
+ return filename;
}

//==============================================================================
118 changes: 118 additions & 0 deletions libs/juce7/patches/10_fix-fork-exec-usage.patch
@@ -0,0 +1,118 @@
diff --git a/modules/juce_core/native/juce_linux_Files.cpp b/modules/juce_core/native/juce_linux_Files.cpp
index f661e4ab4..dce73fcc2 100644
--- a/modules/juce_core/native/juce_linux_Files.cpp
+++ b/modules/juce_core/native/juce_linux_Files.cpp
@@ -223,15 +223,21 @@ bool Process::openDocument (const String& fileName, const String& parameters)

const char* const argv[] = { "/bin/sh", "-c", cmdString.toUTF8(), nullptr };

+#if JUCE_USE_VFORK
+ const auto cpid = vfork();
+#else
const auto cpid = fork();
+#endif

if (cpid == 0)
{
+#if ! JUCE_USE_VFORK
setsid();
+#endif

// Child process
- execve (argv[0], (char**) argv, environ);
- exit (0);
+ if (execve (argv[0], (char**) argv, environ) < 0)
+ _exit (0);
}

return cpid >= 0;
diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm
index aefa76317..066c12cde 100644
--- a/modules/juce_core/native/juce_mac_Files.mm
+++ b/modules/juce_core/native/juce_mac_Files.mm
@@ -92,23 +92,22 @@ namespace MacFileHelpers
#else
static bool launchExecutable (const String& pathAndArguments)
{
+ const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), nullptr };
+
+#if JUCE_USE_VFORK
+ const auto cpid = vfork();
+#else
auto cpid = fork();
+#endif

if (cpid == 0)
{
- const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), nullptr };
-
// Child process
- if (execve (argv[0], (char**) argv, nullptr) < 0)
- exit (0);
- }
- else
- {
- if (cpid < 0)
- return false;
+ if (execvp (argv[0], (char**) argv) < 0)
+ _exit (0);
}

- return true;
+ return cpid >= 0;
}
#endif
}
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index b0df41553..83c359154 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -1131,7 +1131,18 @@ public:

if (pipe (pipeHandles) == 0)
{
- auto result = fork();
+ Array<char*> argv;
+ for (auto& arg : arguments)
+ if (arg.isNotEmpty())
+ argv.add (const_cast<char*> (arg.toRawUTF8()));
+
+ argv.add (nullptr);
+
+#if JUCE_USE_VFORK
+ const pid_t result = vfork();
+#else
+ const pid_t result = fork();
+#endif

if (result < 0)
{
@@ -1140,6 +1151,7 @@ public:
}
else if (result == 0)
{
+#if ! JUCE_USE_VFORK
// we're the child process..
close (pipeHandles[0]); // close the read handle

@@ -1154,17 +1166,10 @@ public:
dup2 (open ("/dev/null", O_WRONLY), STDERR_FILENO);

close (pipeHandles[1]);
+#endif

- Array<char*> argv;
-
- for (auto& arg : arguments)
- if (arg.isNotEmpty())
- argv.add (const_cast<char*> (arg.toRawUTF8()));
-
- argv.add (nullptr);
-
- execvp (exe.toRawUTF8(), argv.getRawDataPointer());
- _exit (-1);
+ if (execvp (exe.toRawUTF8(), argv.getRawDataPointer()) < 0)
+ _exit (-1);
}
else
{
61 changes: 61 additions & 0 deletions libs/juce7/patches/11_childprocess-getPID.patch
@@ -0,0 +1,61 @@
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index 83c359154..efe1bda73 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -1266,6 +1266,11 @@ public:
return 0;
}

+ int getPID() const noexcept
+ {
+ return childPID;
+ }
+
int childPID = 0;
int pipeHandle = 0;
int exitCode = -1;
diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp
index 8d15042fe..867e6fd2f 100644
--- a/modules/juce_core/native/juce_win32_Threads.cpp
+++ b/modules/juce_core/native/juce_win32_Threads.cpp
@@ -489,6 +489,11 @@ public:
return (uint32) exitCode;
}

+ int getPID() const noexcept
+ {
+ return 0;
+ }
+
bool ok;

private:
diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp
index 1e559b1c9..40ad651f0 100644
--- a/modules/juce_core/threads/juce_ChildProcess.cpp
+++ b/modules/juce_core/threads/juce_ChildProcess.cpp
@@ -81,6 +81,11 @@ String ChildProcess::readAllProcessOutput()
}


+int ChildProcess::getPID() const noexcept
+{
+ return activeProcess != nullptr ? activeProcess->getPID() : 0;
+}
+
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/modules/juce_core/threads/juce_ChildProcess.h
index 3c5e83bba..f6076fb82 100644
--- a/modules/juce_core/threads/juce_ChildProcess.h
+++ b/modules/juce_core/threads/juce_ChildProcess.h
@@ -101,6 +101,8 @@ public:
*/
bool kill();

+ int getPID() const noexcept;
+
private:
//==============================================================================
class ActiveProcess;
39 changes: 39 additions & 0 deletions libs/juce7/patches/12_linux-filechooser-needs-modal-loops.patch
@@ -0,0 +1,39 @@
diff --git a/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp b/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
index c12bc5f67..df8132b69 100644
--- a/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
+++ b/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
@@ -26,6 +26,7 @@
namespace juce
{

+#if JUCE_MODAL_LOOPS_PERMITTED
static bool exeIsAvailable (String executable)
{
ChildProcess child;
@@ -255,10 +256,11 @@ private:

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Native)
};
+#endif

bool FileChooser::isPlatformDialogAvailable()
{
- #if JUCE_DISABLE_NATIVE_FILECHOOSERS
+ #if JUCE_DISABLE_NATIVE_FILECHOOSERS || ! JUCE_MODAL_LOOPS_PERMITTED
return false;
#else
static bool canUseNativeBox = exeIsAvailable ("zenity") || exeIsAvailable ("kdialog");
@@ -268,7 +270,13 @@ bool FileChooser::isPlatformDialogAvailable()

std::shared_ptr<FileChooser::Pimpl> FileChooser::showPlatformDialog (FileChooser& owner, int flags, FilePreviewComponent*)
{
+#if JUCE_MODAL_LOOPS_PERMITTED
return std::make_shared<Native> (owner, flags);
+#else
+ ignoreUnused (owner);
+ ignoreUnused (flags);
+ return nullptr;
+#endif
}

} // namespace juce
109 changes: 109 additions & 0 deletions libs/juce7/patches/13_dialogwindow-allow-native-titlebar.patch
@@ -0,0 +1,109 @@
diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
index 2f5338f1c..789e6dc20 100644
--- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
+++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
@@ -921,7 +921,7 @@ void MainHostWindow::showAudioSettings()
o.componentToCentreAround = this;
o.dialogBackgroundColour = getLookAndFeel().findColour (ResizableWindow::backgroundColourId);
o.escapeKeyTriggersCloseButton = true;
- o.useNativeTitleBar = false;
+ o.useNativeTitleBar = true;
o.resizable = false;

auto* w = o.create();
diff --git a/modules/juce_gui_basics/windows/juce_DialogWindow.cpp b/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
index b024f9dde..c866ff208 100644
--- a/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
+++ b/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
@@ -134,7 +134,8 @@ void DialogWindow::showDialog (const String& dialogTitle,
Colour backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool resizable,
- const bool useBottomRightCornerResizer)
+ const bool useBottomRightCornerResizer,
+ const bool useNativeTitleBar)
{
LaunchOptions o;
o.dialogTitle = dialogTitle;
@@ -142,9 +143,9 @@ void DialogWindow::showDialog (const String& dialogTitle,
o.componentToCentreAround = componentToCentreAround;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = escapeKeyTriggersCloseButton;
- o.useNativeTitleBar = false;
o.resizable = resizable;
o.useBottomRightCornerResizer = useBottomRightCornerResizer;
+ o.useNativeTitleBar = useNativeTitleBar;

o.launchAsync();
}
@@ -156,7 +157,8 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
Colour backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool resizable,
- const bool useBottomRightCornerResizer)
+ const bool useBottomRightCornerResizer,
+ const bool useNativeTitleBar)
{
LaunchOptions o;
o.dialogTitle = dialogTitle;
@@ -164,9 +166,9 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
o.componentToCentreAround = componentToCentreAround;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = escapeKeyTriggersCloseButton;
- o.useNativeTitleBar = false;
o.resizable = resizable;
o.useBottomRightCornerResizer = useBottomRightCornerResizer;
+ o.useNativeTitleBar = useNativeTitleBar;

return o.runModal();
}
diff --git a/modules/juce_gui_basics/windows/juce_DialogWindow.h b/modules/juce_gui_basics/windows/juce_DialogWindow.h
index 484a08384..ad94a08ee 100644
--- a/modules/juce_gui_basics/windows/juce_DialogWindow.h
+++ b/modules/juce_gui_basics/windows/juce_DialogWindow.h
@@ -199,7 +199,8 @@ public:
Colour backgroundColour,
bool escapeKeyTriggersCloseButton,
bool shouldBeResizable = false,
- bool useBottomRightCornerResizer = false);
+ bool useBottomRightCornerResizer = false,
+ bool useNativeTitleBar = true);

#if JUCE_MODAL_LOOPS_PERMITTED
/** Easy way of quickly showing a dialog box containing a given component.
@@ -245,7 +246,8 @@ public:
Colour backgroundColour,
bool escapeKeyTriggersCloseButton,
bool shouldBeResizable = false,
- bool useBottomRightCornerResizer = false);
+ bool useBottomRightCornerResizer = false,
+ bool useNativeTitleBar = true);
#endif


diff --git a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h
index 2eb400a70..4cd5aefe0 100644
--- a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h
+++ b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h
@@ -154,7 +154,7 @@ protected:
private:
friend class TopLevelWindowManager;
friend class ResizableWindow;
- bool useDropShadow = true, useNativeTitleBar = false, isCurrentlyActive = false;
+ bool useDropShadow = true, useNativeTitleBar = true, isCurrentlyActive = false;
std::unique_ptr<DropShadower> shadower;

std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override;
diff --git a/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp b/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp
index b90412cf2..b6c92e9fd 100644
--- a/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp
+++ b/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp
@@ -92,7 +92,7 @@ void PreferencesPanel::showInDialogBox (const String& dialogTitle, int dialogWid
o.dialogTitle = dialogTitle;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = false;
- o.useNativeTitleBar = false;
+ o.useNativeTitleBar = true;
o.resizable = false;

o.launchAsync();
23 changes: 23 additions & 0 deletions libs/juce7/patches/14_fix-x11-temporary-windows.patch
@@ -0,0 +1,23 @@
diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
index da1a27308..3291db8a3 100644
--- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
+++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
@@ -2979,10 +2979,14 @@ void XWindowSystem::setWindowType (::Window windowH, int styleFlags) const

if (atoms.windowType != None)
{
- auto hint = (styleFlags & ComponentPeer::windowIsTemporary) != 0
- || ((styleFlags & ComponentPeer::windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows())
- ? XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_COMBO")
- : XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_NORMAL");
+ Atom hint = None;
+
+ if (styleFlags & ComponentPeer::windowIsTemporary)
+ hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_TOOLTIP");
+ else if ((styleFlags & ComponentPeer::windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows())
+ hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_COMBO");
+ else
+ hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_NORMAL");

if (hint != None)
xchangeProperty (windowH, atoms.windowType, XA_ATOM, 32, &hint, 1);
14 changes: 14 additions & 0 deletions libs/juce7/patches/15_fix-usage-with-vestige.patch
@@ -0,0 +1,14 @@
diff --git a/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h b/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h
index dcf0ff8f6..f497fef96 100644
--- a/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h
+++ b/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h
@@ -63,7 +63,9 @@ typedef AudioComponentInstance AudioUnit;
}
@endcode
*/
+#ifndef _VESTIGE_H
struct AEffect;
+#endif

//==============================================================================
namespace juce
14 changes: 14 additions & 0 deletions libs/juce7/patches/17_allow-vst2-without-audio.patch
@@ -0,0 +1,14 @@
diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
index dd044d108..4da23cdf5 100644
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
@@ -252,9 +252,6 @@ public:
// You must at least have some channels
jassert (processor->isMidiEffect() || (maxNumInChannels > 0 || maxNumOutChannels > 0));

- if (processor->isMidiEffect())
- maxNumInChannels = maxNumOutChannels = 2;
-
#ifdef JucePlugin_PreferredChannelConfigurations
processor->setPlayConfigDetails (maxNumInChannels, maxNumOutChannels, 44100.0, 1024);
#endif
13 changes: 13 additions & 0 deletions libs/juce7/patches/18_dynamic-vst2-plugin-name.patch
@@ -0,0 +1,13 @@
diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
index 4da23cdf5..914fd6b44 100644
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
@@ -1824,7 +1824,7 @@ private:

pointer_sized_int handleGetPlugInName (VstOpCodeArguments args)
{
- String (JucePlugin_Name).copyToUTF8 ((char*) args.ptr, 64 + 1);
+ String (processor->getName()).copyToUTF8 ((char*) args.ptr, 64 + 1);
return 1;
}

38 changes: 38 additions & 0 deletions libs/juce7/patches/19_projucer-gpl-mode.patch
@@ -0,0 +1,38 @@
diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile
index 6f21d6bc3..30157aa7a 100644
--- a/extras/Projucer/Builds/LinuxMakefile/Makefile
+++ b/extras/Projucer/Builds/LinuxMakefile/Makefile
@@ -39,7 +39,7 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH :=
endif

- JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
+ JUCE_CPPFLAGS := $(DEPFLAGS) "-DJUCER_ENABLE_GPL_MODE=1" "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=0" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
JUCE_TARGET_APP := Projucer

@@ -60,7 +60,7 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH :=
endif

- JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
+ JUCE_CPPFLAGS := $(DEPFLAGS) "-DJUCER_ENABLE_GPL_MODE=1" "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=0" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
JUCE_TARGET_APP := Projucer

diff --git a/extras/Projucer/CMakeLists.txt b/extras/Projucer/CMakeLists.txt
index 6e76a0076..78912c4c0 100644
--- a/extras/Projucer/CMakeLists.txt
+++ b/extras/Projucer/CMakeLists.txt
@@ -90,8 +90,9 @@ target_compile_definitions(Projucer PRIVATE
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
JUCE_LOG_ASSERTIONS=1
JUCE_STRICT_REFCOUNTEDPOINTER=1
- JUCE_USE_CURL=1
- JUCE_WEB_BROWSER=0)
+ JUCE_USE_CURL=0
+ JUCE_WEB_BROWSER=0
+ JUCER_ENABLE_GPL_MODE=1)

juce_add_binary_data(ProjucerData SOURCES
Source/BinaryData/Icons/background_logo.svg
420 changes: 420 additions & 0 deletions libs/juce7/patches/21_audioprocessor-no-gui.patch

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions libs/juce7/patches/22_mingw-filechooser-no-vista.patch
@@ -0,0 +1,34 @@
diff --git a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
index 4c3df9e46..70ca644e7 100644
--- a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
@@ -166,6 +166,7 @@ private:
void operator() (LPWSTR ptr) const noexcept { CoTaskMemFree (ptr); }
};

+ #if JUCE_MSVC
bool showDialog (IFileDialog& dialog, bool async)
{
FILEOPENDIALOGOPTIONS flags = {};
@@ -383,6 +384,7 @@ private:

return result;
}
+ #endif

Array<URL> openDialogPreVista (bool async)
{
@@ -499,11 +501,13 @@ private:

const Remover remover (*this);

+ #if JUCE_MSVC
if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista
&& customComponent == nullptr)
{
return openDialogVistaAndUp (async);
}
+ #endif

return openDialogPreVista (async);
}
20 changes: 20 additions & 0 deletions libs/juce7/patches/24_extra-gl-functions.patch
@@ -0,0 +1,20 @@
diff --git a/modules/juce_opengl/native/juce_OpenGLExtensions.h b/modules/juce_opengl/native/juce_OpenGLExtensions.h
index 142a4688d..674321c63 100644
--- a/modules/juce_opengl/native/juce_OpenGLExtensions.h
+++ b/modules/juce_opengl/native/juce_OpenGLExtensions.h
@@ -83,7 +83,14 @@ namespace juce
X (glCheckFramebufferStatus) \
X (glFramebufferTexture2D) \
X (glFramebufferRenderbuffer) \
- X (glGetFramebufferAttachmentParameteriv)
+ X (glGetFramebufferAttachmentParameteriv) \
+ X (glTransformFeedbackVaryings) \
+ X (glBeginTransformFeedback) \
+ X (glEndTransformFeedback) \
+ X (glBindBufferBase) \
+ X (glMapBufferRange) \
+ X (glUnmapBuffer)
+

/** @internal This macro contains a list of GL extension functions that need to be dynamically loaded on Windows/Linux.
@see OpenGLExtensionFunctions