From cee0627449900799b68f4bd9007e5d860ee04576 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 1 Jan 2021 21:57:21 +0100 Subject: [PATCH] Patch the VST3 module loading for Unity builds The narrow overload gets picked here by default. --- tools/patch-vst3-sdk.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/patch-vst3-sdk.sh b/tools/patch-vst3-sdk.sh index 006a3cbf..fb8d26e9 100755 --- a/tools/patch-vst3-sdk.sh +++ b/tools/patch-vst3-sdk.sh @@ -78,6 +78,10 @@ sed -i 's/^using namespace std\(::experimental\)\?;$/namespace filesystem = boos sed -i 's/\bfile_type::directory\b/file_type::directory_file/g' "$sdk_directory/public.sdk/source/vst/hosting/module_win32.cpp" sed -i 's/\bp\.native ()/p.wstring ()/g' "$sdk_directory/public.sdk/source/vst/hosting/module_win32.cpp" +# Wine uses the narrow versions of everything by default, and in Unity builds +# we need to explicitly use the UTF-16 version here. +sed -i 's/\bIShellLink\*/IShellLinkW*/g' "$sdk_directory/public.sdk/source/vst/hosting/module_win32.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"