From 6c2616830348714142c404f9f3c9f895d8a1f93d Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 29 Nov 2020 19:18:45 +0100 Subject: [PATCH] Patch the rest of the VST3 SDK for winegcc --- meson.build | 13 +++++++++++++ tools/patch-vst3-sdk.sh | 14 ++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 86e04319..6c85793a 100644 --- a/meson.build +++ b/meson.build @@ -183,6 +183,19 @@ if with_vst3 override_options : ['warning_level=0'], native : false, ) + vst3_sdk_hosting_wine = static_library( + 'sdk_hosting_wine', + vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'), + link_with : [vst3_base_wine, vst3_pluginterfaces_wine], + cpp_args : vst3_compiler_options + vst3_wine_compiler_options + ['-Wno-multichar'], + include_directories : vst3_include_dir, + override_options : ['warning_level=0'], + native : false, + ) + vst3_sdk_hosting_wine_dep = declare_dependency( + link_with : vst3_sdk_hosting_wine, + include_directories : vst3_include_dir, + ) else message('VST3 support has been disabled') endif diff --git a/tools/patch-vst3-sdk.sh b/tools/patch-vst3-sdk.sh index 3434a4cd..fad11cac 100755 --- a/tools/patch-vst3-sdk.sh +++ b/tools/patch-vst3-sdk.sh @@ -43,10 +43,10 @@ replace_char16() { wchar_version=${needle//char16_t/wchar_t} sed -i "s/^$needle$/#ifdef __WINE__\\ - $wchar_version\\ - #else\\ - \0\\ - #endif/" "$filename" + $wchar_version\\ +#else\\ + \0\\ +#endif/" "$filename" } replace_char16 "using ConverterFacet = std::codecvt_utf8_utf16;" "$sdk_directory/base/source/fstring.cpp" @@ -57,6 +57,12 @@ replace_char16 "using Converter = std::wstring_convert$/#include \\/\\/ patched for yabridge\\ +#include /" "$sdk_directory/public.sdk/source/common/openurl.cpp" + # Meson requires this program to output something, or else it will error out # when trying to encode the empty output echo "Successfully patched '$sdk_directory' for winegcc compatibility"