mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-25 13:27:26 +02:00
[yabridgectl] Fix reporting of new VST3 plugins
When yabridgectl sets up both a VST3 bundle containing both a 32-bit and a 64-bit plugin. The libyabridge.so file already existed, so the reported number was always off.
This commit is contained in:
@@ -89,6 +89,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
- Improved the warning yabridgectl shows when it cannot run `yabridge-host.exe`
|
- Improved the warning yabridgectl shows when it cannot run `yabridge-host.exe`
|
||||||
as part of the post-installation checks.
|
as part of the post-installation checks.
|
||||||
|
- Fixed the reported number of new or updated plugins when yabridgectl manages
|
||||||
|
both a 32-bit and a 64-bit version of the same VST3 plugin.
|
||||||
- Fixed text wrapping being broken after a dependency update earlier this year.
|
- Fixed text wrapping being broken after a dependency update earlier this year.
|
||||||
|
|
||||||
## [3.2.0] - 2021-05-03
|
## [3.2.0] - 2021-05-03
|
||||||
|
|||||||
@@ -232,8 +232,11 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
// copy or symlink of `libyabridge-vst2.so`
|
// copy or symlink of `libyabridge-vst2.so`
|
||||||
let mut orphan_files: Vec<NativeFile> = Vec::new();
|
let mut orphan_files: Vec<NativeFile> = Vec::new();
|
||||||
// All the VST3 modules we have set up yabridge for. We need this to detect leftover VST3
|
// All the VST3 modules we have set up yabridge for. We need this to detect leftover VST3
|
||||||
// modules in `~/.vst3/yabridge`.
|
// modules in `~/.vst3/yabridge`. The value is a set of all Windows architectures supported by
|
||||||
let mut yabridge_vst3_bundles: BTreeMap<PathBuf, BTreeSet<LibArchitecture>> = BTreeMap::new();
|
// the plugin, and a boolean indicating whether we updated the copy of `libyabridge-vst3.so` or
|
||||||
|
// not. This is necessary for keepign track of how many plugins we installed.
|
||||||
|
let mut yabridge_vst3_bundles: BTreeMap<PathBuf, (bool, BTreeSet<LibArchitecture>)> =
|
||||||
|
BTreeMap::new();
|
||||||
for (path, search_results) in results {
|
for (path, search_results) in results {
|
||||||
num_installed += search_results.plugins.len();
|
num_installed += search_results.plugins.len();
|
||||||
orphan_files.extend(search_results.vst2_orphans().into_iter().cloned());
|
orphan_files.extend(search_results.vst2_orphans().into_iter().cloned());
|
||||||
@@ -278,9 +281,10 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
|
|
||||||
// 32-bit and 64-bit versions of the plugin cna live inside of the same
|
// 32-bit and 64-bit versions of the plugin cna live inside of the same
|
||||||
// bundle), and show a warning if we come across any duplicates.
|
// bundle), and show a warning if we come across any duplicates.
|
||||||
let already_installed_architectures = yabridge_vst3_bundles
|
let (updated_libyabridge, already_installed_architectures) =
|
||||||
.entry(module.target_bundle_home())
|
yabridge_vst3_bundles
|
||||||
.or_insert_with(BTreeSet::new);
|
.entry(module.target_bundle_home())
|
||||||
|
.or_insert_with(|| (false, BTreeSet::new()));
|
||||||
if !already_installed_architectures.insert(module.architecture) {
|
if !already_installed_architectures.insert(module.architecture) {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"{}",
|
"{}",
|
||||||
@@ -307,8 +311,14 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
|
|||||||
files.libyabridge_vst3.as_ref().unwrap(),
|
files.libyabridge_vst3.as_ref().unwrap(),
|
||||||
libyabridge_vst3_hash,
|
libyabridge_vst3_hash,
|
||||||
&native_module_path,
|
&native_module_path,
|
||||||
)? {
|
)? || *updated_libyabridge
|
||||||
|
{
|
||||||
|
// This is sadly a bit more complicated than what I would like, but the 'new
|
||||||
|
// or updated plugins' count should also be updated correctly when we're
|
||||||
|
// setting up 32-bit and a 64-bit Windows VST3 plugin inside of a single
|
||||||
|
// bundle. So if we're counting one, we should count the other as well.
|
||||||
num_new += 1;
|
num_new += 1;
|
||||||
|
*updated_libyabridge = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We'll then symlink the Windows VST3 module to that bundle to create a merged
|
// We'll then symlink the Windows VST3 module to that bundle to create a merged
|
||||||
|
|||||||
Reference in New Issue
Block a user