From 6ca7eae16a21c3d31d1bfd5f3a8b68a13005f099 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 30 Apr 2020 12:48:03 +0200 Subject: [PATCH] Mention 32-bit support in the readme --- README.md | 38 ++++++++++++++++++++++++++++++-------- src/plugin/host-bridge.cpp | 2 ++ src/wine-host/vst-host.cpp | 2 ++ 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cdb5cb82..9cf56b44 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # yabridge -Yet Another way to use Windows VST2 plugins in Linux VST hosts. This project -aims to be as transparent as possible to achieve the best possible plugin -compatibility while also being easy to debug and maintain. +Yet Another way to use Windows VST2 plugins in Linux VST hosts, including an +optional bitbridge to run 32-bit Windows plugins in 64-bit Linux hosts. This +project aims to be as transparent as possible to achieve the best possible +plugin compatibility while also being easy to debug and maintain. ## TODOs @@ -13,7 +14,8 @@ There are a few things that should be done before releasing this, including: - Add missing details if any to the architecture section. - Rewrite parts of this readme. - Briefly verify that this also works fine in Reaper and Ardour. -- Document wine32 support. +- Finish 32-bit bitbridge. + - Upstream the updated `lib32-boost-libs` PKGBUILD. ## Tested with @@ -114,19 +116,39 @@ the following dependencies: - Boost - xcb -The following dependencies are included as a Meson wrap: +The following dependencies are included in the repository as a Meson wrap: - bitsery The project can then be compiled as follows: ```shell -meson setup --buildtype=release --cross-file cross-wine64.conf build +meson setup --buildtype=release --cross-file cross-wine.conf build ninja -C build ``` -When developing or debugging yabridge you can change the build type to either -`debug` enable debug symbols and disable optimizations. +### 32-bit bitbridge + +It's also possible to compile a 32-bit host application for yabridge that's +compatible with 32 bit plugins such as old SynthEdit plugins. This will allow +yabridge to act as a bitbirdge, allowing you to run old 32-bit only Windows VST2 +plugins in a modern 64-bit Linux VST host. For this you'll need to have +installed the 32 bit versions of the Boost and XCB libraries. This can be +enabled as follows: + +```shell +# On an existing build +meson configure build -Duse-bitbridge=true +# Configure a new build from scratch +meson setup --buildtype=release --cross-file cross-wine.conf -Duse-bitbridge=true build + +ninja -C build +``` + +This will produce two files called `yabridge-host-32.exe` and +`yabridge-host-32.exe.so`. Yabridge will detect whether the plugin you're trying +to load is 32-bit or 64-bit, and will run either `yabridge-host.exe` or +`yabridge-host-32.exe` accordingly. ## Debugging diff --git a/src/plugin/host-bridge.cpp b/src/plugin/host-bridge.cpp index 4165e13d..66457a95 100644 --- a/src/plugin/host-bridge.cpp +++ b/src/plugin/host-bridge.cpp @@ -118,6 +118,8 @@ HostBridge::HostBridge(audioMasterCallback host_callback) bp::start_dir = vst_plugin_path.parent_path()) #endif { + // TODO: Add a notice here for whether yabridge has been compiled with + // bitbridge support or not logger.log("Initializing yabridge version " + std::string(yabridge_git_version)); logger.log("host: '" + vst_host_path.string() + "'"); diff --git a/src/wine-host/vst-host.cpp b/src/wine-host/vst-host.cpp index 4f57e705..3d9d0ff1 100644 --- a/src/wine-host/vst-host.cpp +++ b/src/wine-host/vst-host.cpp @@ -41,6 +41,8 @@ int main(int argc, char* argv[]) { const std::string plugin_dll_path(argv[1]); const std::string socket_endpoint_path(argv[2]); + // TODO: Maybe just check one of macros defined by Wine when compiling for + // 32-bit instead std::cerr << "Initializing yabridge host version " << yabridge_git_version #ifdef USE_BITBRIDGE << " (32-bit compatibility mode)"