mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Fixed compatibility with GCC 4.8
This commit is contained in:
parent
ec46ad4891
commit
d06a2b8c13
6 changed files with 85 additions and 44 deletions
58
README.md
58
README.md
|
|
@ -1,38 +1,38 @@
|
||||||

|

|
||||||
|
|
||||||
JUCE is an open-source cross-platform C++ application framework used for rapidly
|
JUCE is an open-source cross-platform C++ application framework used for rapidly
|
||||||
developing high quality desktop and mobile applications, including VST, AU (and AUv3),
|
developing high quality desktop and mobile applications, including VST, AU (and AUv3),
|
||||||
RTAS and AAX audio plug-ins. JUCE can be easily integrated with existing projects or can
|
RTAS and AAX audio plug-ins. JUCE can be easily integrated with existing projects or can
|
||||||
be used as a project generation tool via the [Projucer](https://juce.com/discover/projucer),
|
be used as a project generation tool via the [Projucer](https://juce.com/discover/projucer),
|
||||||
which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio,
|
which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio,
|
||||||
Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and
|
Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and
|
||||||
live-coding engine which can be used for rapid prototyping.
|
live-coding engine which can be used for rapid prototyping.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
The JUCE repository contains a [master](https://github.com/weareroli/JUCE/tree/master)
|
The JUCE repository contains a [master](https://github.com/weareroli/JUCE/tree/master)
|
||||||
and [develop](https://github.com/weareroli/JUCE/tree/develop) branch. The develop branch
|
and [develop](https://github.com/weareroli/JUCE/tree/develop) branch. The develop branch
|
||||||
contains the latest bugfixes and features and is periodically merged into the master
|
contains the latest bugfixes and features and is periodically merged into the master
|
||||||
branch in stable [tagged releases](https://github.com/WeAreROLI/JUCE/releases)
|
branch in stable [tagged releases](https://github.com/WeAreROLI/JUCE/releases)
|
||||||
(the latest release containing pre-built binaries can be also downloaded from the
|
(the latest release containing pre-built binaries can be also downloaded from the
|
||||||
[JUCE website](https://shop.juce.com/get-juce)).
|
[JUCE website](https://shop.juce.com/get-juce)).
|
||||||
|
|
||||||
The repository doesn't contain a pre-built Projucer so you will need to build it
|
The repository doesn't contain a pre-built Projucer so you will need to build it
|
||||||
for your platform - Xcode, Visual Studio and Linux Makefile projects are located in
|
for your platform - Xcode, Visual Studio and Linux Makefile projects are located in
|
||||||
[extras/Projucer/Builds](/extras/Projucer/Builds)
|
[extras/Projucer/Builds](/extras/Projucer/Builds)
|
||||||
(the minumum system requirements are listed in the __System Requirements__ section below).
|
(the minumum system requirements are listed in the __System Requirements__ section below).
|
||||||
The Projucer can then be used to create new JUCE projects, view tutorials and run examples.
|
The Projucer can then be used to create new JUCE projects, view tutorials and run examples.
|
||||||
It is also possible to include the JUCE modules source code in an existing project directly,
|
It is also possible to include the JUCE modules source code in an existing project directly,
|
||||||
or build them into a static or dynamic library which can be linked into a project.
|
or build them into a static or dynamic library which can be linked into a project.
|
||||||
|
|
||||||
For further help getting started, please refer to the JUCE
|
For further help getting started, please refer to the JUCE
|
||||||
[documentation](https://juce.com/learn/documentation) and
|
[documentation](https://juce.com/learn/documentation) and
|
||||||
[tutorials](https://juce.com/learn/tutorials).
|
[tutorials](https://juce.com/learn/tutorials).
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
#### Building JUCE Projects
|
#### Building JUCE Projects
|
||||||
- __macOS__: macOS 10.11 and Xcode 7.3.1
|
- __macOS__: macOS 10.11 and Xcode 7.3.1
|
||||||
- __Windows__: Windows 8.1 and Visual Studio 2013 64-bit
|
- __Windows__: Windows 8.1 and Visual Studio 2013 64-bit
|
||||||
- __Linux__: GCC 5.0
|
- __Linux__: GCC 4.8
|
||||||
|
|
||||||
#### Minimum Deployment Targets
|
#### Minimum Deployment Targets
|
||||||
- __macOS__: macOS 10.7
|
- __macOS__: macOS 10.7
|
||||||
|
|
@ -40,18 +40,18 @@ For further help getting started, please refer to the JUCE
|
||||||
- __Linux__: Mainstream Linux distributions
|
- __Linux__: Mainstream Linux distributions
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
For bug reports and features requests, please visit the [JUCE Forum](https://forum.juce.com/) -
|
For bug reports and features requests, please visit the [JUCE Forum](https://forum.juce.com/) -
|
||||||
the JUCE developers are active there and will read every post and respond accordingly. When
|
the JUCE developers are active there and will read every post and respond accordingly. When
|
||||||
submitting a bug report, please ensure that it follows the
|
submitting a bug report, please ensure that it follows the
|
||||||
[issue template](/.github/ISSUE_TEMPLATE.txt).
|
[issue template](/.github/ISSUE_TEMPLATE.txt).
|
||||||
We don't accept third party GitHub pull requests directly due to copyright restrictions
|
We don't accept third party GitHub pull requests directly due to copyright restrictions
|
||||||
but if you would like to contribute any changes please contact us.
|
but if you would like to contribute any changes please contact us.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core
|
The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core
|
||||||
and juce_events) are permissively licensed under the terms of the
|
and juce_events) are permissively licensed under the terms of the
|
||||||
[ISC license](http://www.isc.org/downloads/software-support-policy/isc-license/).
|
[ISC license](http://www.isc.org/downloads/software-support-policy/isc-license/).
|
||||||
Other modules are covered by a
|
Other modules are covered by a
|
||||||
[GPL/Commercial license](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
[GPL/Commercial license](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
||||||
|
|
||||||
There are multiple commercial licensing tiers for JUCE 5, with different terms for each:
|
There are multiple commercial licensing tiers for JUCE 5, with different terms for each:
|
||||||
|
|
@ -60,4 +60,4 @@ There are multiple commercial licensing tiers for JUCE 5, with different terms f
|
||||||
- JUCE Pro (no revenue limit) - $65/month
|
- JUCE Pro (no revenue limit) - $65/month
|
||||||
- JUCE Eductational (no revenue limit) - free for bona fide educational institutes
|
- JUCE Eductational (no revenue limit) - free for bona fide educational institutes
|
||||||
|
|
||||||
For full terms see [LICENSE.md](LICENSE.md).
|
For full terms see [LICENSE.md](LICENSE.md).
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,12 @@ public:
|
||||||
auto content = pbxprojs[0].loadFileAsString().toStdString();
|
auto content = pbxprojs[0].loadFileAsString().toStdString();
|
||||||
|
|
||||||
std::regex comments ("/\\*.*?\\*/");
|
std::regex comments ("/\\*.*?\\*/");
|
||||||
content = (std::regex_replace (content, comments, ""));
|
std::string empty ("");
|
||||||
|
content = (std::regex_replace (content, comments, empty));
|
||||||
|
|
||||||
std::regex whitespace ("\\s+");
|
std::regex whitespace ("\\s+");
|
||||||
content = (std::regex_replace (content, whitespace, " "));
|
std::string space (" ");
|
||||||
|
content = (std::regex_replace (content, whitespace, space));
|
||||||
|
|
||||||
auto objects = std::make_unique<HashMap<std::string, std::string>>();
|
auto objects = std::make_unique<HashMap<std::string, std::string>>();
|
||||||
std::smatch objectsStartMatch;
|
std::smatch objectsStartMatch;
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,13 @@ class ArrayBaseTests : public UnitTest
|
||||||
using CopyableType = ArrayBaseTestsHelpers::TriviallyCopyableType;
|
using CopyableType = ArrayBaseTestsHelpers::TriviallyCopyableType;
|
||||||
using NoncopyableType = ArrayBaseTestsHelpers::NonTriviallyCopyableType;
|
using NoncopyableType = ArrayBaseTestsHelpers::NonTriviallyCopyableType;
|
||||||
|
|
||||||
|
#if ! (defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__))
|
||||||
|
static_assert (std::is_trivially_copyable<CopyableType>::value,
|
||||||
|
"Test TriviallyCopyableType is not trivially copyable");
|
||||||
|
static_assert (! std::is_trivially_copyable<NoncopyableType>::value,
|
||||||
|
"Test NonTriviallyCopyableType is trivially copyable");
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ArrayBaseTests()
|
ArrayBaseTests()
|
||||||
: UnitTest ("ArrayBase", "Containers")
|
: UnitTest ("ArrayBase", "Containers")
|
||||||
|
|
@ -111,11 +118,6 @@ public:
|
||||||
|
|
||||||
void runTest() override
|
void runTest() override
|
||||||
{
|
{
|
||||||
static_assert (std::is_trivially_copyable<CopyableType>::value,
|
|
||||||
"Test TriviallyCopyableType is not trivially copyable");
|
|
||||||
static_assert (! std::is_trivially_copyable<NoncopyableType>::value,
|
|
||||||
"Test NonTriviallyCopyableType is trivially copyable");
|
|
||||||
|
|
||||||
beginTest ("grow capacity");
|
beginTest ("grow capacity");
|
||||||
{
|
{
|
||||||
std::vector<CopyableType> referenceContainer;
|
std::vector<CopyableType> referenceContainer;
|
||||||
|
|
|
||||||
|
|
@ -372,10 +372,17 @@ public:
|
||||||
private:
|
private:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using TriviallyCopyableVoid = typename std::enable_if<std::is_trivially_copyable<T>::value, void>::type;
|
#if defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__)
|
||||||
|
using IsTriviallyCopyable = std::is_scalar<T>;
|
||||||
|
#else
|
||||||
|
using IsTriviallyCopyable = std::is_trivially_copyable<T>;
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using NonTriviallyCopyableVoid = typename std::enable_if<! std::is_trivially_copyable<T>::value, void>::type;
|
using TriviallyCopyableVoid = typename std::enable_if<IsTriviallyCopyable<T>::value, void>::type;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
using NonTriviallyCopyableVoid = typename std::enable_if<! IsTriviallyCopyable<T>::value, void>::type;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
template <typename T = ElementType>
|
template <typename T = ElementType>
|
||||||
|
|
|
||||||
|
|
@ -181,10 +181,7 @@ namespace TimeHelpers
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
Time::Time (int64 ms) noexcept : millisSinceEpoch (ms)
|
Time::Time (int64 ms) noexcept : millisSinceEpoch (ms) {}
|
||||||
{
|
|
||||||
static_assert (std::is_trivially_copyable<Time>::value, "Time is not trivially copyable");
|
|
||||||
}
|
|
||||||
|
|
||||||
Time::Time (int year, int month, int day,
|
Time::Time (int year, int month, int day,
|
||||||
int hours, int minutes, int seconds, int milliseconds,
|
int hours, int minutes, int seconds, int milliseconds,
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,42 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ...Params>
|
// g++ 4.8 cannot deduce the parameter pack inside the function pointer when it has more than one element
|
||||||
|
#if defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__)
|
||||||
|
template <typename... Params>
|
||||||
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||||
void (MouseListener::*eventMethod) (Params...), Params... params)
|
void (MouseListener::*eventMethod) (const MouseEvent&),
|
||||||
|
Params... params)
|
||||||
|
{
|
||||||
|
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... Params>
|
||||||
|
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||||
|
void (MouseListener::*eventMethod) (const MouseEvent&, const MouseWheelDetails&),
|
||||||
|
Params... params)
|
||||||
|
{
|
||||||
|
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... Params>
|
||||||
|
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||||
|
void (MouseListener::*eventMethod) (const MouseEvent&, float),
|
||||||
|
Params... params)
|
||||||
|
{
|
||||||
|
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename EventMethod, typename... Params>
|
||||||
|
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||||
|
EventMethod eventMethod,
|
||||||
|
Params... params)
|
||||||
|
#else
|
||||||
|
template <typename... Params>
|
||||||
|
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||||
|
void (MouseListener::*eventMethod) (Params...),
|
||||||
|
Params... params)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (checker.shouldBailOut())
|
if (checker.shouldBailOut())
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue