[yabridgectl] Set up in ~/.vst/yabridge by default

Instead of creating `.so` files next to the VST2 plugin's `.dll` files.
This behavior is still available as an option. #123
This commit is contained in:
Robbert van der Helm
2022-04-17 20:27:47 +02:00
parent 5ea5968f96
commit 3970bc7f52
5 changed files with 249 additions and 57 deletions
+11
View File
@@ -49,6 +49,10 @@ pub const YABRIDGE_HOST_32_EXE_NAME: &str = "yabridge-host-32.exe";
/// `$XDG_CONFIG_HOME` and `$XDG_DATA_HOME`.
const YABRIDGE_PREFIX: &str = "yabridge";
/// The path relative to `$HOME` we will set up bridged VST2 plugins in when using the centralized
/// VST2 installation location setting. By putting this in a subdirectory we can easily clean up any
/// orphan files without interfering with other native plugins.
const YABRIDGE_VST2_HOME: &str = ".vst/yabridge";
/// The path relative to `$HOME` that VST3 modules bridged by yabridgectl life in. By putting this
/// in a subdirectory we can easily clean up any orphan files without interfering with other native
/// plugins.
@@ -322,6 +326,13 @@ pub fn yabridgectl_directories() -> Result<BaseDirectories> {
BaseDirectories::with_prefix(YABRIDGECTL_PREFIX).context("Error while parsing base directories")
}
/// Get the path where bridged VST2 plugin files should be placed when using the centralized
/// installation location setting. This is a subdirectory of `~/.vst` so we can easily clean up
/// leftover files without interfering with other native plugins.
pub fn yabridge_vst2_home() -> PathBuf {
Path::new(&env::var("HOME").expect("$HOME is not set")).join(YABRIDGE_VST2_HOME)
}
/// Get the path where VST3 modules bridged by yabridgectl should be placed in. This is a
/// subdirectory of `~/.vst3` so we can easily clean up leftover files without interfering with
/// other native plugins.