From e79ca8f9baf6e96a85e2dbd37c38b021476c1ab3 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 27 Sep 2023 01:28:11 +0200 Subject: [PATCH] Copy plugin cache with old config --- libs/ardour/globals.cc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index b47f4a2276..7b4266d262 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -539,6 +539,31 @@ copy_configuration_files (string const& old_dir, string const& new_dir, int old_ return 0; } +static int +copy_cache_files (string const& old_dir, string const& new_dir, int old_version) +{ + if (g_mkdir_with_parents (new_dir.c_str (), 0755)) { + return -1; + } + /* since v7 plugin cache files are versioned */ + if (old_version < 7) { + return 0; + } + + /* copy complete cache: + * - blacklist files + * - vst/.*v2i (VST2 Cache - Intel) + * - vst/.*v3i (VST3 Cache - Intel or Apple/Rosetta) + * - vst-arm64/.*v3i (Apple/ARM native VST3 Cache) + * - auv2/.*a3i (Audio Unit Cache) + * - vst*_blacklist.txt + * - auv2_*blacklist.txt + */ + copy_recurse (old_dir, new_dir, true); + + return 0; +} + void ARDOUR::check_for_old_configuration_files () { @@ -570,9 +595,12 @@ ARDOUR::handle_old_configuration_files (boost::function