mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VST3: Patch moduleinfotool sources to allow building on more platforms
This commit is contained in:
parent
417f0e9ca3
commit
89f4657bee
6 changed files with 44 additions and 13 deletions
|
|
@ -4,3 +4,22 @@ inclusion in JUCE.
|
||||||
- `#warning` directives were removed from fstring.cpp, as these cannot be
|
- `#warning` directives were removed from fstring.cpp, as these cannot be
|
||||||
silenced with a `pragma GCC diagnostic ignored "-Wcpp"` when building with
|
silenced with a `pragma GCC diagnostic ignored "-Wcpp"` when building with
|
||||||
g++.
|
g++.
|
||||||
|
|
||||||
|
- The version check in module_linux.cpp was changed to match the number
|
||||||
|
corresponding to the C++17 standard.
|
||||||
|
|
||||||
|
- The <limits> header was included in moduleinfoparser.cpp in order to make
|
||||||
|
std::numeric_limits visible when building with the GNU stdlib.
|
||||||
|
|
||||||
|
- Loop variable types were adjusted in moduleinfoparser.cpp to avoid forming
|
||||||
|
references to temporary values, which produced -Wrange-loop-bind-reference
|
||||||
|
warnings when building with Xcode.
|
||||||
|
|
||||||
|
- The <cstdint> header was included in moduleinfo.h in order to make uint32_t
|
||||||
|
visible when building with the GNU stdlib.
|
||||||
|
|
||||||
|
- helper.manifest was added, to be included in the moduleinfo tool in order to
|
||||||
|
force UTF-8 mode on Windows.
|
||||||
|
|
||||||
|
- std:: qualification was added to std::move call in module.cpp to silence
|
||||||
|
a -Wunqualified-std-cast-call warning
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity type="win32" name="juce_vst3_helper" version="6.0.0.0"/>
|
||||||
|
<application>
|
||||||
|
<windowsSettings>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
|
|
||||||
|
|
@ -270,7 +270,7 @@ void ClassInfo::parseSubCategories (const std::string& str) noexcept
|
||||||
std::stringstream stream (str);
|
std::stringstream stream (str);
|
||||||
std::string item;
|
std::string item;
|
||||||
while (std::getline (stream, item, '|'))
|
while (std::getline (stream, item, '|'))
|
||||||
data.subCategories.emplace_back (move (item));
|
data.subCategories.emplace_back (std::move (item));
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if (__cplusplus >= 201707L)
|
#if (__cplusplus >= 201703L)
|
||||||
#if __has_include(<filesystem>)
|
#if __has_include(<filesystem>)
|
||||||
#define USE_EXPERIMENTAL_FS 0
|
#define USE_EXPERIMENTAL_FS 0
|
||||||
#elif __has_include(<experimental/filesystem>)
|
#elif __has_include(<experimental/filesystem>)
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
#include "jsoncxx.h"
|
#include "jsoncxx.h"
|
||||||
#include "pluginterfaces/base/ipluginbase.h"
|
#include "pluginterfaces/base/ipluginbase.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
namespace Steinberg::ModuleInfoLib {
|
namespace Steinberg::ModuleInfoLib {
|
||||||
|
|
@ -140,7 +141,7 @@ struct ModuleInfoJsonParser
|
||||||
uint32_t parsed {0};
|
uint32_t parsed {0};
|
||||||
if (auto obj = value.asObject ())
|
if (auto obj = value.asObject ())
|
||||||
{
|
{
|
||||||
for (const auto& el : *obj)
|
for (const auto el : *obj)
|
||||||
{
|
{
|
||||||
auto elementName = el.name ().text ();
|
auto elementName = el.name ().text ();
|
||||||
if (elementName == "Vendor")
|
if (elementName == "Vendor")
|
||||||
|
|
@ -171,7 +172,7 @@ struct ModuleInfoJsonParser
|
||||||
auto flags = el.value ().asObject ();
|
auto flags = el.value ().asObject ();
|
||||||
if (!flags)
|
if (!flags)
|
||||||
throw parse_error ("Expect 'Flags' to be a JSON Object", el.name ());
|
throw parse_error ("Expect 'Flags' to be a JSON Object", el.name ());
|
||||||
for (const auto& flag : *flags)
|
for (const auto flag : *flags)
|
||||||
{
|
{
|
||||||
auto flagName = flag.name ().text ();
|
auto flagName = flag.name ().text ();
|
||||||
auto flagValue = flag.value ().asBoolean ();
|
auto flagValue = flag.value ().asBoolean ();
|
||||||
|
|
@ -228,7 +229,7 @@ struct ModuleInfoJsonParser
|
||||||
auto array = value.asArray ();
|
auto array = value.asArray ();
|
||||||
if (!array)
|
if (!array)
|
||||||
throw parse_error ("Expect Classes Array", value);
|
throw parse_error ("Expect Classes Array", value);
|
||||||
for (const auto& classInfoEl : *array)
|
for (const auto classInfoEl : *array)
|
||||||
{
|
{
|
||||||
auto classInfo = classInfoEl.value ().asObject ();
|
auto classInfo = classInfoEl.value ().asObject ();
|
||||||
if (!classInfo)
|
if (!classInfo)
|
||||||
|
|
@ -238,7 +239,7 @@ struct ModuleInfoJsonParser
|
||||||
|
|
||||||
uint32_t parsed {0};
|
uint32_t parsed {0};
|
||||||
|
|
||||||
for (const auto& el : *classInfo)
|
for (const auto el : *classInfo)
|
||||||
{
|
{
|
||||||
auto elementName = el.name ().text ();
|
auto elementName = el.name ().text ();
|
||||||
if (elementName == "CID")
|
if (elementName == "CID")
|
||||||
|
|
@ -290,7 +291,7 @@ struct ModuleInfoJsonParser
|
||||||
auto subCatArr = el.value ().asArray ();
|
auto subCatArr = el.value ().asArray ();
|
||||||
if (!subCatArr)
|
if (!subCatArr)
|
||||||
throw parse_error ("Expect Array here", el.value ());
|
throw parse_error ("Expect Array here", el.value ());
|
||||||
for (const auto& catEl : *subCatArr)
|
for (const auto catEl : *subCatArr)
|
||||||
{
|
{
|
||||||
auto cat = getText (catEl.value ());
|
auto cat = getText (catEl.value ());
|
||||||
ci.subCategories.emplace_back (cat);
|
ci.subCategories.emplace_back (cat);
|
||||||
|
|
@ -318,13 +319,13 @@ struct ModuleInfoJsonParser
|
||||||
auto snapArr = el.value ().asArray ();
|
auto snapArr = el.value ().asArray ();
|
||||||
if (!snapArr)
|
if (!snapArr)
|
||||||
throw parse_error ("Expect Array here", el.value ());
|
throw parse_error ("Expect Array here", el.value ());
|
||||||
for (const auto& snapEl : *snapArr)
|
for (const auto snapEl : *snapArr)
|
||||||
{
|
{
|
||||||
auto snap = snapEl.value ().asObject ();
|
auto snap = snapEl.value ().asObject ();
|
||||||
if (!snap)
|
if (!snap)
|
||||||
throw parse_error ("Expect Object here", snapEl.value ());
|
throw parse_error ("Expect Object here", snapEl.value ());
|
||||||
ModuleInfo::Snapshot snapshot;
|
ModuleInfo::Snapshot snapshot;
|
||||||
for (const auto& spEl : *snap)
|
for (const auto spEl : *snap)
|
||||||
{
|
{
|
||||||
auto spElName = spEl.name ().text ();
|
auto spElName = spEl.name ().text ();
|
||||||
if (spElName == "Path")
|
if (spElName == "Path")
|
||||||
|
|
@ -368,14 +369,14 @@ struct ModuleInfoJsonParser
|
||||||
auto arr = value.asArray ();
|
auto arr = value.asArray ();
|
||||||
if (!arr)
|
if (!arr)
|
||||||
throw parse_error ("Expect Array here", value);
|
throw parse_error ("Expect Array here", value);
|
||||||
for (const auto& el : *arr)
|
for (const auto el : *arr)
|
||||||
{
|
{
|
||||||
auto obj = el.value ().asObject ();
|
auto obj = el.value ().asObject ();
|
||||||
if (!obj)
|
if (!obj)
|
||||||
throw parse_error ("Expect Object here", el.value ());
|
throw parse_error ("Expect Object here", el.value ());
|
||||||
|
|
||||||
ModuleInfo::Compatibility compat;
|
ModuleInfo::Compatibility compat;
|
||||||
for (const auto& objEl : *obj)
|
for (const auto objEl : *obj)
|
||||||
{
|
{
|
||||||
auto elementName = objEl.name ().text ();
|
auto elementName = objEl.name ().text ();
|
||||||
if (elementName == "New")
|
if (elementName == "New")
|
||||||
|
|
@ -385,7 +386,7 @@ struct ModuleInfoJsonParser
|
||||||
auto oldElArr = objEl.value ().asArray ();
|
auto oldElArr = objEl.value ().asArray ();
|
||||||
if (!oldElArr)
|
if (!oldElArr)
|
||||||
throw parse_error ("Expect Array here", objEl.value ());
|
throw parse_error ("Expect Array here", objEl.value ());
|
||||||
for (const auto& old : *oldElArr)
|
for (const auto old : *oldElArr)
|
||||||
{
|
{
|
||||||
compat.oldCID.emplace_back (getText (old.value ()));
|
compat.oldCID.emplace_back (getText (old.value ()));
|
||||||
}
|
}
|
||||||
|
|
@ -415,7 +416,7 @@ struct ModuleInfoJsonParser
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32_t parsed {0};
|
uint32_t parsed {0};
|
||||||
for (const auto& el : *docObj)
|
for (const auto el : *docObj)
|
||||||
{
|
{
|
||||||
auto elementName = el.name ().text ();
|
auto elementName = el.name ().text ();
|
||||||
if (elementName == "Name")
|
if (elementName == "Name")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue