mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
[yabridgectl] Update to use chainloader libraries
This commit is contained in:
@@ -61,6 +61,14 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
- Some of yabridge's socket file names contained extremely aesthetically
|
- Some of yabridge's socket file names contained extremely aesthetically
|
||||||
unpleasing trailing underscores. Begone pesky underscores!
|
unpleasing trailing underscores. Begone pesky underscores!
|
||||||
|
|
||||||
|
### yabridgectl
|
||||||
|
|
||||||
|
- As mentioned above, yabridgectl will now use the new chainloading libraries
|
||||||
|
when setting up plugins. This means that once you've ran `yabridgectl sync`
|
||||||
|
once after updating to yabridge 4.0, yabridge can now be updated without
|
||||||
|
needing to rerun `yabridgectl sync`. This is particularly useful when using a
|
||||||
|
distro packaged version of yabridge.
|
||||||
|
|
||||||
### Packaging notes
|
### Packaging notes
|
||||||
|
|
||||||
- Completely removed the dependency on all Boost libraries.
|
- Completely removed the dependency on all Boost libraries.
|
||||||
|
|||||||
@@ -101,14 +101,15 @@ pub fn show_status(config: &Config) -> Result<()> {
|
|||||||
let files = config.files();
|
let files = config.files();
|
||||||
match &files {
|
match &files {
|
||||||
Ok(files) => {
|
Ok(files) => {
|
||||||
|
// TOOD: Also include the architecture here to avoid confusion
|
||||||
println!(
|
println!(
|
||||||
"libyabridge-vst2.so: '{}'",
|
"libyabridge-chainloader-vst2.so: '{}'",
|
||||||
files.libyabridge_vst2.display()
|
files.vst2_chainloader.display()
|
||||||
);
|
);
|
||||||
println!(
|
println!(
|
||||||
"libyabridge-vst3.so: {}\n",
|
"libyabridge-chainloader-vst3.so: {}\n",
|
||||||
files
|
files
|
||||||
.libyabridge_vst3
|
.vst3_chainloader
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|(path, arch)| format!("'{}' ({})", path.display(), arch))
|
.map(|(path, arch)| format!("'{}' ({})", path.display(), arch))
|
||||||
.unwrap_or_else(|| "<not found>".red().to_string())
|
.unwrap_or_else(|| "<not found>".red().to_string())
|
||||||
@@ -230,8 +231,8 @@ pub struct SyncOptions {
|
|||||||
/// `.so` files if the prune option is set.
|
/// `.so` files if the prune option is set.
|
||||||
pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
||||||
let files: YabridgeFiles = config.files()?;
|
let files: YabridgeFiles = config.files()?;
|
||||||
let libyabridge_vst2_hash = utils::hash_file(&files.libyabridge_vst2)?;
|
let vst2_chainloader_hash = utils::hash_file(&files.vst2_chainloader)?;
|
||||||
let libyabridge_vst3_hash = match &files.libyabridge_vst3 {
|
let vst3_chainloader_hash = match &files.vst3_chainloader {
|
||||||
Some((path, _)) => Some(utils::hash_file(path)?),
|
Some((path, _)) => Some(utils::hash_file(path)?),
|
||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
@@ -250,13 +251,13 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some((libyabridge_vst3_path, _)) = &files.libyabridge_vst3 {
|
if let Some((vst3_chainloader_path, _)) = &files.vst3_chainloader {
|
||||||
println!("Setting up VST2 and VST3 plugins using:");
|
println!("Setting up VST2 and VST3 plugins using:");
|
||||||
println!("- {}", files.libyabridge_vst2.display());
|
println!("- {}", files.vst2_chainloader.display());
|
||||||
println!("- {}\n", libyabridge_vst3_path.display());
|
println!("- {}\n", vst3_chainloader_path.display());
|
||||||
} else {
|
} else {
|
||||||
println!("Setting up VST2 plugins using:");
|
println!("Setting up VST2 plugins using:");
|
||||||
println!("- {}\n", files.libyabridge_vst2.display());
|
println!("- {}\n", files.vst2_chainloader.display());
|
||||||
}
|
}
|
||||||
|
|
||||||
let results = config
|
let results = config
|
||||||
@@ -273,14 +274,14 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
// `utils::normalize_path()` so that the reported numbers are still correct when encountering
|
// `utils::normalize_path()` so that the reported numbers are still correct when encountering
|
||||||
// overlapping symlinked paths.
|
// overlapping symlinked paths.
|
||||||
let mut managed_plugins: HashSet<PathBuf> = HashSet::new();
|
let mut managed_plugins: HashSet<PathBuf> = HashSet::new();
|
||||||
// The plugins we created a new copy of `libyabridge-{vst2,vst3}.so` for. We don't touch these
|
// The plugins we created a new copy of `libyabridge-chainloader-{vst2,vst3}.so` for. We don't
|
||||||
// files if they're already up to date to prevent hosts from unnecessarily rescanning the
|
// touch these files if they're already up to date to prevent hosts from unnecessarily
|
||||||
// plugins.
|
// rescanning the plugins.
|
||||||
let mut new_plugins: HashSet<PathBuf> = HashSet::new();
|
let mut new_plugins: HashSet<PathBuf> = HashSet::new();
|
||||||
// The files we skipped during the scan because they turned out to not be plugins
|
// The files we skipped during the scan because they turned out to not be plugins
|
||||||
let mut skipped_dll_files: Vec<PathBuf> = Vec::new();
|
let mut skipped_dll_files: Vec<PathBuf> = Vec::new();
|
||||||
// `.so` files and unused VST3 modules we found during scanning that didn't have a corresponding
|
// `.so` files and unused VST3 modules we found during scanning that didn't have a corresponding
|
||||||
// copy or symlink of `libyabridge-vst2.so`
|
// copy or symlink of `libyabridge-chainloader-vst2.so`
|
||||||
let mut orphan_files: Vec<NativeFile> = Vec::new();
|
let mut orphan_files: Vec<NativeFile> = Vec::new();
|
||||||
// Since VST3 bundles contain multiple files from multiple sources (native library files from
|
// Since VST3 bundles contain multiple files from multiple sources (native library files from
|
||||||
// yabridge, and symlinks to Windows VST3 modules or bundles), cleaning up orphan VST3 files is
|
// yabridge, and symlinks to Windows VST3 modules or bundles), cleaning up orphan VST3 files is
|
||||||
@@ -319,8 +320,8 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
if install_file(
|
if install_file(
|
||||||
options.force,
|
options.force,
|
||||||
config.method,
|
config.method,
|
||||||
&files.libyabridge_vst2,
|
&files.vst2_chainloader,
|
||||||
Some(libyabridge_vst2_hash),
|
Some(vst2_chainloader_hash),
|
||||||
&target_path,
|
&target_path,
|
||||||
)? {
|
)? {
|
||||||
new_plugins.insert(normalized_target_path.clone());
|
new_plugins.insert(normalized_target_path.clone());
|
||||||
@@ -333,7 +334,7 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
// https://developer.steinberg.help/display/VST/Plug-in+Format+Structure#PluginFormatStructure-MergedBundle
|
// https://developer.steinberg.help/display/VST/Plug-in+Format+Structure#PluginFormatStructure-MergedBundle
|
||||||
Plugin::Vst3(module) => {
|
Plugin::Vst3(module) => {
|
||||||
// Only set up VST3 plugins when yabridge has been compiled with VST3 support
|
// Only set up VST3 plugins when yabridge has been compiled with VST3 support
|
||||||
if libyabridge_vst3_hash.is_none() {
|
if vst3_chainloader_hash.is_none() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,15 +373,15 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We're building a merged VST3 bundle containing both a copy or symlink to
|
// We're building a merged VST3 bundle containing both a copy or symlink to
|
||||||
// `libyabridge-vst3.so` and the Windows VST3 plugin. The path to this native
|
// `libyabridge-chainloader-vst3.so` and the Windows VST3 plugin. The path to
|
||||||
// module will depend on whether `libyabridge-vst3.so` is a 32-bit or a 64-bit
|
// this native module will depend on whether `libyabridge-chainloader-vst3.so`
|
||||||
// library file.
|
// is a 32-bit or a 64-bit library file.
|
||||||
utils::create_dir_all(target_native_module_path.parent().unwrap())?;
|
utils::create_dir_all(target_native_module_path.parent().unwrap())?;
|
||||||
if install_file(
|
if install_file(
|
||||||
options.force,
|
options.force,
|
||||||
config.method,
|
config.method,
|
||||||
&files.libyabridge_vst3.as_ref().unwrap().0,
|
&files.vst3_chainloader.as_ref().unwrap().0,
|
||||||
libyabridge_vst3_hash,
|
vst3_chainloader_hash,
|
||||||
&target_native_module_path,
|
&target_native_module_path,
|
||||||
)? {
|
)? {
|
||||||
// We're counting the native `.so` files and not the Windows VST3 plugins
|
// We're counting the native `.so` files and not the Windows VST3 plugins
|
||||||
@@ -557,8 +558,8 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
// The path setup is to make sure that the `libyabridge-{vst2,vst3}.so` copies can find
|
// The path setup is to make sure that the `libyabridge-chainloader-{vst2,vst3}.so` copies can
|
||||||
// `yabridge-host.exe`
|
// find `yabridge-host.exe`
|
||||||
if config.method == InstallationMethod::Copy {
|
if config.method == InstallationMethod::Copy {
|
||||||
verify_path_setup(config)?;
|
verify_path_setup(config)?;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ pub const CONFIG_FILE_NAME: &str = "config.toml";
|
|||||||
/// `$XDG_DATA_HOME`.
|
/// `$XDG_DATA_HOME`.
|
||||||
const YABRIDGECTL_PREFIX: &str = "yabridgectl";
|
const YABRIDGECTL_PREFIX: &str = "yabridgectl";
|
||||||
|
|
||||||
/// The name of yabridge's VST2 library.
|
/// The name of yabridge's VST2 chainloading library yabridgectl will create copies of.
|
||||||
pub const LIBYABRIDGE_VST2_NAME: &str = "libyabridge-vst2.so";
|
pub const VST2_CHAINLOADER_NAME: &str = "libyabridge-chainloader-vst2.so";
|
||||||
/// The name of yabridge's VST3 library.
|
/// The name of yabridge's VST3 chainloading library yabridgectl will create copies of.
|
||||||
pub const LIBYABRIDGE_VST3_NAME: &str = "libyabridge-vst3.so";
|
pub const VST3_CHAINLOADER_NAME: &str = "libyabridge-chainloader-vst3.so";
|
||||||
/// The name of the script we're going to run to verify that everything's working correctly.
|
/// The name of the script we're going to run to verify that everything's working correctly.
|
||||||
pub const YABRIDGE_HOST_EXE_NAME: &str = "yabridge-host.exe";
|
pub const YABRIDGE_HOST_EXE_NAME: &str = "yabridge-host.exe";
|
||||||
/// The 32-bit verison of `YABRIDGE_HOST_EXE_NAME`. If `~/.wine` was somehow created with
|
/// The 32-bit verison of `YABRIDGE_HOST_EXE_NAME`. If `~/.wine` was somehow created with
|
||||||
@@ -63,9 +63,9 @@ pub struct Config {
|
|||||||
/// The installation method to use. We will default to creating copies since that works
|
/// The installation method to use. We will default to creating copies since that works
|
||||||
/// everywhere.
|
/// everywhere.
|
||||||
pub method: InstallationMethod,
|
pub method: InstallationMethod,
|
||||||
/// The path to the directory containing `libyabridge-{vst2,vst3}.so`. If not set, then
|
/// The path to the directory containing `libyabridge-{chainloader,}-{vst2,vst3}.so`. If not
|
||||||
/// yabridgectl will look in `/usr/lib` and `$XDG_DATA_HOME/yabridge` since those are the
|
/// set, then yabridgectl will look in `/usr/lib` and `$XDG_DATA_HOME/yabridge` since those are
|
||||||
/// expected locations for yabridge to be installed in.
|
/// the expected locations for yabridge to be installed in.
|
||||||
pub yabridge_home: Option<PathBuf>,
|
pub yabridge_home: Option<PathBuf>,
|
||||||
/// Directories to search for Windows VST plugins. These directories can contain both VST2
|
/// Directories to search for Windows VST plugins. These directories can contain both VST2
|
||||||
/// plugin `.dll` files and VST3 modules (which should be located in `<prefix>/drive_c/Program
|
/// plugin `.dll` files and VST3 modules (which should be located in `<prefix>/drive_c/Program
|
||||||
@@ -90,12 +90,12 @@ pub struct Config {
|
|||||||
#[derive(Deserialize, Serialize, Debug, PartialEq, Eq, Clone, Copy)]
|
#[derive(Deserialize, Serialize, Debug, PartialEq, Eq, Clone, Copy)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum InstallationMethod {
|
pub enum InstallationMethod {
|
||||||
/// Create a copy of `libyabridge-{vst2,vst3}.so` for every Windows VST2 plugin `.dll` file or
|
/// Create a copy of `libyabridge-chainloader-{vst2,vst3}.so` for every Windows VST2 plugin
|
||||||
/// VST3 module found. After updating yabridge, the user will have to rerun `yabridgectl sync`
|
/// `.dll` file or VST3 module found. After updating yabridge, the user will have to rerun
|
||||||
/// to copy over the new version.
|
/// `yabridgectl sync` to copy over the new version.
|
||||||
Copy,
|
Copy,
|
||||||
/// This will create a symlink to `libyabridge-{vst2,vst3}.so` for every VST2 plugin `.dll` file
|
/// This will create a symlink to `libyabridge-chainloader-{vst2,vst3}.so` for every VST2 plugin
|
||||||
/// or VST3 module in the plugin directories. Now that yabridge also searches in
|
/// `.dll` file or VST3 module in the plugin directories. Now that yabridge also searches in
|
||||||
/// `~/.local/share/yabridge` since yabridge 2.1 this option is not really needed anymore.
|
/// `~/.local/share/yabridge` since yabridge 2.1 this option is not really needed anymore.
|
||||||
///
|
///
|
||||||
/// TODO: This feature has been deprecated, remove it in yabridge 4.0
|
/// TODO: This feature has been deprecated, remove it in yabridge 4.0
|
||||||
@@ -147,12 +147,12 @@ pub struct KnownConfig {
|
|||||||
/// `Config::files`.
|
/// `Config::files`.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct YabridgeFiles {
|
pub struct YabridgeFiles {
|
||||||
/// The path to `libyabridge-vst2.so` we should use.
|
/// The path to `libyabridge-chainloader-vst2.so` we should use.
|
||||||
pub libyabridge_vst2: PathBuf,
|
pub vst2_chainloader: PathBuf,
|
||||||
/// The path to `libyabridge-vst3.so` we should use, if yabridge has been compiled with VST3
|
/// The path to `libyabridge-chainloader-vst3.so` we should use, if yabridge has been compiled
|
||||||
/// support. We need to know if it's a 32-bit or a 64-bit library so we can properly set up the
|
/// with VST3 support. We need to know if it's a 32-bit or a 64-bit library so we can properly
|
||||||
/// merged VST3 bundles.
|
/// set up the merged VST3 bundles.
|
||||||
pub libyabridge_vst3: Option<(PathBuf, LibArchitecture)>,
|
pub vst3_chainloader: Option<(PathBuf, LibArchitecture)>,
|
||||||
/// The path to `yabridge-host.exe`. This is the path yabridge will actually use, and it does
|
/// The path to `yabridge-host.exe`. This is the path yabridge will actually use, and it does
|
||||||
/// not have to be relative to `yabridge_home`.
|
/// not have to be relative to `yabridge_home`.
|
||||||
pub yabridge_host_exe: Option<PathBuf>,
|
pub yabridge_host_exe: Option<PathBuf>,
|
||||||
@@ -220,16 +220,16 @@ impl Config {
|
|||||||
pub fn files(&self) -> Result<YabridgeFiles> {
|
pub fn files(&self) -> Result<YabridgeFiles> {
|
||||||
let xdg_dirs = yabridge_directories()?;
|
let xdg_dirs = yabridge_directories()?;
|
||||||
|
|
||||||
// First find `libyabridge-vst2.so`
|
// First find `libyabridge-chainloader-vst2.so`
|
||||||
let libyabridge_vst2: PathBuf = match &self.yabridge_home {
|
let vst2_chainloader: PathBuf = match &self.yabridge_home {
|
||||||
Some(directory) => {
|
Some(directory) => {
|
||||||
let candidate = directory.join(LIBYABRIDGE_VST2_NAME);
|
let candidate = directory.join(VST2_CHAINLOADER_NAME);
|
||||||
if candidate.exists() {
|
if candidate.exists() {
|
||||||
candidate
|
candidate
|
||||||
} else {
|
} else {
|
||||||
return Err(anyhow!(
|
return Err(anyhow!(
|
||||||
"Could not find '{}' in '{}'",
|
"Could not find '{}' in '{}'",
|
||||||
LIBYABRIDGE_VST2_NAME,
|
VST2_CHAINLOADER_NAME,
|
||||||
directory.display()
|
directory.display()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ impl Config {
|
|||||||
// Search in the system library locations and in `~/.local/share/yabridge` if no
|
// Search in the system library locations and in `~/.local/share/yabridge` if no
|
||||||
// path was set explicitely. We'll also search through `/usr/local/lib` just in case
|
// path was set explicitely. We'll also search through `/usr/local/lib` just in case
|
||||||
// but since we advocate against installing yabridge there we won't list this path
|
// but since we advocate against installing yabridge there we won't list this path
|
||||||
// in the error message when `libyabridge-vst2.so` can't be found.
|
// in the error message when `libyabridge-chainloader-vst2.so` can't be found.
|
||||||
let system_path = Path::new("/usr/lib");
|
let system_path = Path::new("/usr/lib");
|
||||||
let user_path = xdg_dirs.get_data_home();
|
let user_path = xdg_dirs.get_data_home();
|
||||||
let lib_directories = [
|
let lib_directories = [
|
||||||
@@ -254,14 +254,14 @@ impl Config {
|
|||||||
];
|
];
|
||||||
let mut candidates = lib_directories
|
let mut candidates = lib_directories
|
||||||
.iter()
|
.iter()
|
||||||
.map(|directory| directory.join(LIBYABRIDGE_VST2_NAME));
|
.map(|directory| directory.join(VST2_CHAINLOADER_NAME));
|
||||||
match candidates.find(|directory| directory.exists()) {
|
match candidates.find(|directory| directory.exists()) {
|
||||||
Some(candidate) => candidate,
|
Some(candidate) => candidate,
|
||||||
_ => {
|
_ => {
|
||||||
return Err(anyhow!(
|
return Err(anyhow!(
|
||||||
"Could not find '{}' in either '{}' or '{}'. You can override the \
|
"Could not find '{}' in either '{}' or '{}'. You can override the \
|
||||||
default search path using 'yabridgectl set --path=<path>'.",
|
default search path using 'yabridgectl set --path=<path>'.",
|
||||||
LIBYABRIDGE_VST2_NAME,
|
VST2_CHAINLOADER_NAME,
|
||||||
system_path.display(),
|
system_path.display(),
|
||||||
user_path.display()
|
user_path.display()
|
||||||
));
|
));
|
||||||
@@ -270,12 +270,12 @@ impl Config {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Based on that we can check if `libyabridge-vst3.so` exists, since yabridge can be
|
// Based on that we can check if `libyabridge-chainloader-vst3.so` exists, since yabridge
|
||||||
// compiled without VST3 support
|
// can be compiled without VST3 support
|
||||||
let libyabridge_vst3 = match libyabridge_vst2.with_file_name(LIBYABRIDGE_VST3_NAME) {
|
let vst3_chainloader = match vst2_chainloader.with_file_name(VST3_CHAINLOADER_NAME) {
|
||||||
path if path.exists() => {
|
path if path.exists() => {
|
||||||
// We need to know `libyabridge-vst3.so`'s architecture to be able to set up the
|
// We need to know `libyabridge-chainloader-vst3.so`'s architecture to be able to
|
||||||
// bundle properly
|
// set up the bundle properly. 32-bit builds of yabridge are technically supported.
|
||||||
let arch = utils::get_elf_architecture(&path).with_context(|| {
|
let arch = utils::get_elf_architecture(&path).with_context(|| {
|
||||||
format!(
|
format!(
|
||||||
"Could not determine ELF architecture for '{}'",
|
"Could not determine ELF architecture for '{}'",
|
||||||
@@ -300,8 +300,8 @@ impl Config {
|
|||||||
.map(|path| path.with_extension("exe.so"));
|
.map(|path| path.with_extension("exe.so"));
|
||||||
|
|
||||||
Ok(YabridgeFiles {
|
Ok(YabridgeFiles {
|
||||||
libyabridge_vst2,
|
vst2_chainloader,
|
||||||
libyabridge_vst3,
|
vst3_chainloader,
|
||||||
yabridge_host_exe,
|
yabridge_host_exe,
|
||||||
yabridge_host_exe_so,
|
yabridge_host_exe_so,
|
||||||
yabridge_host_32_exe,
|
yabridge_host_32_exe,
|
||||||
@@ -326,8 +326,8 @@ impl Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Fetch the XDG base directories for yabridge's own files, converting any error messages if this
|
/// Fetch the XDG base directories for yabridge's own files, converting any error messages if this
|
||||||
/// somehow fails into a printable string to reduce boiler plate. This is only used when searching
|
/// somehow fails into a printable string to reduce boiler plate. This is used when searching for
|
||||||
/// for `libyabridge-{vst2,vst3}.so` when no explicit search path has been set.
|
/// `libyabridge-chainloader-{vst2,vst3}.so` when no explicit search path has been set.
|
||||||
pub fn yabridge_directories() -> Result<BaseDirectories> {
|
pub fn yabridge_directories() -> Result<BaseDirectories> {
|
||||||
BaseDirectories::with_prefix(YABRIDGE_PREFIX).context("Error while parsing base directories")
|
BaseDirectories::with_prefix(YABRIDGE_PREFIX).context("Error while parsing base directories")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,10 +188,10 @@ impl Vst3Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the path to the `libyabridge.so` file in `~/.vst3` corresponding to the bridged version
|
/// Get the path to the renamed `plugin.so` file in `~/.vst3` corresponding to the bridged
|
||||||
/// of this module. The path here depends on whether we're using a 32-bit or 64-bit version of
|
/// version of this module. The path here depends on whether we're using a 32-bit or 64-bit
|
||||||
/// yabridge. If the configuration is not given (for instance, becuase yabridge is not set up
|
/// version of yabridge. If the configuration is not given (for instance, becuase yabridge is
|
||||||
/// properly) we'll assume the module should be 64-bit.
|
/// not set up properly) we'll assume the module should be 64-bit.
|
||||||
pub fn target_native_module_path(&self, config: Option<&YabridgeFiles>) -> PathBuf {
|
pub fn target_native_module_path(&self, config: Option<&YabridgeFiles>) -> PathBuf {
|
||||||
let native_module_name = match &self.module {
|
let native_module_name = match &self.module {
|
||||||
Vst3ModuleType::Legacy(path) | Vst3ModuleType::Bundle(path) => path
|
Vst3ModuleType::Legacy(path) | Vst3ModuleType::Bundle(path) => path
|
||||||
@@ -207,11 +207,11 @@ impl Vst3Module {
|
|||||||
path.push("Contents");
|
path.push("Contents");
|
||||||
|
|
||||||
#[allow(clippy::wildcard_in_or_patterns)]
|
#[allow(clippy::wildcard_in_or_patterns)]
|
||||||
match config.and_then(|c| c.libyabridge_vst3.as_ref()) {
|
match config.and_then(|c| c.vst3_chainloader.as_ref()) {
|
||||||
Some((_, LibArchitecture::Lib32)) => path.push("i386-linux"),
|
Some((_, LibArchitecture::Lib32)) => path.push("i386-linux"),
|
||||||
// NOTE: We'll always fall back to this if `libyabridge-vst3.so` is not found, just so
|
// NOTE: We'll always fall back to this if `libyabridge-chainloader-vst3.so` is not
|
||||||
// we cannot get any errors during `yabridgectl status` even if yabridge is not
|
// found, just so we cannot get any errors during `yabridgectl status` even if
|
||||||
// set up correctly.
|
// yabridge is not set up correctly.
|
||||||
Some((_, LibArchitecture::Lib64)) | _ => path.push("x86_64-linux"),
|
Some((_, LibArchitecture::Lib64)) | _ => path.push("x86_64-linux"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ fn main() -> Result<()> {
|
|||||||
.arg(
|
.arg(
|
||||||
Arg::new("path")
|
Arg::new("path")
|
||||||
.long("path")
|
.long("path")
|
||||||
.help("Path to the directory containing 'libyabridge-{vst2,vst3}.so'")
|
.help("Path to the directory containing 'libyabridge-chainloader-{vst2,vst3}.so'")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this \
|
"Path to the directory containing 'libyabridge-chainloader-{vst2,vst3}.so'. \
|
||||||
is not set, then yabridgectl will look in both '/usr/lib' and \
|
If this is not set, then yabridgectl will look in both '/usr/lib' and \
|
||||||
'~/.local/share/yabridge' by default.",
|
'~/.local/share/yabridge' by default.",
|
||||||
)
|
)
|
||||||
.validator(validate_path)
|
.validator(validate_path)
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ pub fn verify_path_setup(config: &Config) -> Result<bool> {
|
|||||||
reboot your system to complete the setup.\n\
|
reboot your system to complete the setup.\n\
|
||||||
\n\
|
\n\
|
||||||
https://github.com/robbert-vdh/yabridge#troubleshooting-common-issues",
|
https://github.com/robbert-vdh/yabridge#troubleshooting-common-issues",
|
||||||
config.files()?.libyabridge_vst2.parent().unwrap().display(),
|
config.files()?.vst2_chainloader.parent().unwrap().display(),
|
||||||
shell.bright_white(),
|
shell.bright_white(),
|
||||||
"PATH".bright_white()
|
"PATH".bright_white()
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user