diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad7cf00d..e8e3bca1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: - name: Create an archive for the binaries run: | mkdir yabridge - cp build/libyabridge.so build/yabridge-{host,group}{,-32}.exe{,.so} yabridge + cp build/libyabridge-vst2.so build/yabridge-{host,group}{,-32}.exe{,.so} yabridge cp CHANGELOG.md README.md yabridge tar -caf "$ARCHIVE_NAME" yabridge @@ -92,7 +92,7 @@ jobs: - name: Create an archive for the binaries run: | mkdir yabridge - cp build/libyabridge.so build/yabridge-{host,group}{,-32}.exe{,.so} yabridge + cp build/libyabridge-vst2.so build/yabridge-{host,group}{,-32}.exe{,.so} yabridge cp CHANGELOG.md README.md yabridge tar -caf "$ARCHIVE_NAME" yabridge diff --git a/README.md b/README.md index 782c7021..6f76cfdd 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ imcomplete list of things that still have to be done before this can be used: - Rename `PluginBridge` to `Vst2PluginBridge` and explain that the names are chosen this way to be easily greppable. - Actually start implementing VST3 support. -- Make sure all old references to `libyabridge` now refer to `libyabridge-vst2` - or to both `libyabridge-{vst2,vst3}` depending on the situation. - Update the GitHub Actions workflows. - Update yabridgectl to handle buth VST2 and VST3 plugins. - Update all documentation to refer to VST2 and VST3 support separately, and @@ -134,24 +132,25 @@ as it makes updating easier and yabridgectl will check for some common mistakes during the installation process. To set up yabridge without using yabridgectl, first download and extract yabridge's files like in the section above. The rest of this section assumes that you have extracted the files to `~/.local/share` -(such that `~/.local/share/yabridge/libyabridge.so` exists), and that you want -to set up yabridge for the VST2 plugin called `~/.wine/drive_c/Program Files/Steinberg/VstPlugins/plugin.dll`. +(such that `~/.local/share/yabridge/libyabridge-vst2.so` exists), and that you +want to set up yabridge for the VST2 plugin called +`~/.wine/drive_c/Program Files/Steinberg/VstPlugins/plugin.dll`. Depending on whether you want to use copy or symlink-based installation method, you can then set up yabridge for that plugin by creating a copy or symlink of -`libyabridge.so` next to `plugin.dll` called `plugin.so`. For the example, you -can use either: +`libyabridge-vst2.so` next to `plugin.dll` called `plugin.so`. For the example, +you can use either: ```shell # For the copy-based installation method -cp ~/.local/share/yabridge/libyabridge.so "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins/plugin.so" +cp ~/.local/share/yabridge/libyabridge-vst2.so "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins/plugin.so" # For the symlink-based installation method -ln -sf ~/.local/share/yabridge/libyabridge.so "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins/plugin.so" +ln -sf ~/.local/share/yabridge/libyabridge-vst2.so "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins/plugin.so" ``` The symlink-based installation method will not work with any host that does not individually sandbox its plugins. If you are using the copy-based installation -method, then don't forget to overwrite all copies of `libyabridge.so` you +method, then don't forget to overwrite all copies of `libyabridge-vst2.so` you created this way whenever you update yabridge. ### DAW setup diff --git a/docs/architecture.md b/docs/architecture.md index 78998dec..93a80873 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,5 +1,7 @@ # Architecture +TODO: This document has not yet been updated since adding VST3 support + The project consists of two components: a Linux native VST plugin (`libyabridge.so`) and a VST host that runs under Wine (`yabridge-host.exe`/`yabridge-host.exe.so`, and diff --git a/src/common/configuration.h b/src/common/configuration.h index 74981337..3c827c8c 100644 --- a/src/common/configuration.h +++ b/src/common/configuration.h @@ -33,8 +33,8 @@ * they can share resources. Configuration file loading works as follows: * * 1. `load_config_for(path)` from `src/plugin/utils.h` gets called with a path - * to the copy of or symlink to `libyabridge.so` that the plugin host has - * tried to load. + * to the copy of or symlink to `libyabridge-{vst2,vst3}.so` that the plugin + * host has tried to load. * 2. We start looking for a file named `yabridge.toml` in the same directory as * that `.so` file, iteratively continuing to search one directory higher * until we either find the file or we reach the filesystem root. diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp index 01b91d9a..c0b7eba6 100644 --- a/src/plugin/utils.cpp +++ b/src/plugin/utils.cpp @@ -140,7 +140,7 @@ fs::path find_vst_plugin() { // In case this files does not exist and our `.so` file is a symlink, we'll // also repeat this check after resolving that symlink to support links to - // copies of `libyabridge.so` as described in issue #3 + // copies of `libyabridge-vst2.so` as described in issue #3 fs::path alternative_plugin_path = fs::canonical(this_plugin_path); alternative_plugin_path.replace_extension(".dll"); if (fs::exists(alternative_plugin_path)) { @@ -151,7 +151,7 @@ fs::path find_vst_plugin() { // throw when the path could not be found throw std::runtime_error("'" + plugin_path.string() + "' does not exist, make sure to rename " - "'libyabridge.so' to match a " + "'libyabridge-vst2.so' to match a " "VST plugin .dll file."); } diff --git a/src/plugin/utils.h b/src/plugin/utils.h index f11d14e8..93bf5c77 100644 --- a/src/plugin/utils.h +++ b/src/plugin/utils.h @@ -76,10 +76,10 @@ PluginArchitecture find_vst_architecture(boost::filesystem::path); * Finds the Wine VST host (either `yabridge-host.exe` or `yabridge-host.exe` * depending on the plugin). For this we will search in two places: * - * 1. Alongside libyabridge.so if the file got symlinked. This is useful - * when developing, as you can simply symlink the the libyabridge.so - * file in the build directory without having to install anything to - * /usr. + * 1. Alongside libyabridge-{vst2,vst3}.so if the file got symlinked. This is + * useful when developing, as you can simply symlink the + * `libyabridge-{vst2,vst3}.so` file in the build directory without having + * to install anything to /usr. * 2. In the regular search path, augmented with `~/.local/share/yabridge` to * ease the setup process. * @@ -96,11 +96,14 @@ boost::filesystem::path find_vst_host(PluginArchitecture plugin_arch, /** * Find the VST plugin .dll file that corresponds to this copy of - * `libyabridge.so`. This should be the same as the name of this file but with a - * `.dll` file extension instead of `.so`. In case this file does not exist and - * the `.so` file is a symlink, we'll also repeat this check for the file it - * links to. This is to support the workflow described in issue #3 where you use - * symlinks to copies of `libyabridge.so`. + * `libyabridge-vst2.so`. This should be the same as the name of this file but + * with a `.dll` file extension instead of `.so`. In case this file does not + * exist and the `.so` file is a symlink, we'll also repeat this check for the + * file it links to. This is to support the workflow described in issue #3 where + * you use symlinks to copies of `libyabridge-vst2.so`. + * + * TODO: This should probably be renamed to `find_vst2_plugin()` so we can have + * a separate `find_vst3_plugin()` * * @return The a path to the accompanying VST plugin .dll file. * @throw std::runtime_error If no matching .dll file could be found. @@ -156,7 +159,7 @@ std::vector get_augmented_search_path(); /** * Return a path to this `.so` file. This can be used to find out from where - * this link to or copy of `libyabridge.so` was loaded. + * this link to or copy of `libyabridge-{vst2,vst3}.so` was loaded. */ boost::filesystem::path get_this_file_location(); @@ -180,10 +183,10 @@ std::string join_quoted_strings(std::vector& strings); /** * Load the configuration that belongs to a copy of or symlink to - * `libyabridge.so`. If no configuration file could be found then this will - * return an empty configuration object with default settings. See the docstrong - * on the `Configuration` class for more details on how to choose the config - * file to load. + * `libyabridge-{vst2,vst3}.so`. If no configuration file could be found then + * this will return an empty configuration object with default settings. See the + * docstrong on the `Configuration` class for more details on how to choose the + * config file to load. * * This function will take any optional compile-time features that have not been * enabled into account. diff --git a/src/wine-host/group-host.cpp b/src/wine-host/group-host.cpp index d5fa2aef..33d6c605 100644 --- a/src/wine-host/group-host.cpp +++ b/src/wine-host/group-host.cpp @@ -30,11 +30,11 @@ * This works very similar to the host application defined in * `individual-host.cpp`, but instead of just loading a single plugin this will * act as a daemon that can host multiple 'grouped' plugins. This works by - * allowing the `libyabridge.so` instance to connect this this process over a - * socket to ask this process to host a VST `.dll` file using a provided socket. - * After that initialization step both the regular individual plugin host and - * this group plugin host will function identically on both the plugin and the - * Wine VST host side. + * allowing the `libyabridge-{vst2,vst3}.so` instance to connect this this + * process over a socket to ask this process to host a VST `.dll` file using a + * provided socket. After that initialization step both the regular individual + * plugin host and this group plugin host will function identically on both the + * plugin and the Wine VST host side. * * The explicit calling convention is needed to work around a bug introduced in * Wine 5.7: https://bugs.winehq.org/show_bug.cgi?id=49138 diff --git a/src/wine-host/individual-host.cpp b/src/wine-host/individual-host.cpp index 09874e9e..3beff56b 100644 --- a/src/wine-host/individual-host.cpp +++ b/src/wine-host/individual-host.cpp @@ -26,8 +26,8 @@ /** * This is the default VST host application. It will load the specified VST2 - * plugin, and then connect back to the `libyabridge.so` instance that spawned - * this over the socket. + * plugin, and then connect back to the `libyabridge-{vst2,vst3}.so` instance + * that spawned this over the socket. * * The explicit calling convention is needed to work around a bug introduced in * Wine 5.7: https://bugs.winehq.org/show_bug.cgi?id=49138 diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs index b4db96a6..6f993bad 100644 --- a/tools/yabridgectl/src/config.rs +++ b/tools/yabridgectl/src/config.rs @@ -49,9 +49,9 @@ pub struct Config { /// The installation method to use. We will default to creating copies since that works /// everywhere. pub method: InstallationMethod, - /// The path to the directory containing `libyabridge.so`. If not set, then yabridgectl will - /// look in `/usr/lib` and `$XDG_DATA_HOME/yabridge` since those are the expected locations for - /// yabridge to be installed in. + /// The path to the directory containing `libyabridge-{vst2,vst3}.so`. If not set, then + /// yabridgectl will look in `/usr/lib` and `$XDG_DATA_HOME/yabridge` since those are the + /// expected locations for yabridge to be installed in. pub yabridge_home: Option, /// Directories to search for Windows VST plugins. We're using an ordered set here out of /// convenience so we can't get duplicates and the config file is always sorted.