diff --git a/meson.build b/meson.build index 62c857a2..b7d408b9 100644 --- a/meson.build +++ b/meson.build @@ -103,15 +103,15 @@ include_dir = include_directories('src/include') shared_library( 'yabridge-vst2', [ + 'src/common/communication/vst2.cpp', + 'src/common/serialization/vst2.cpp', 'src/common/configuration.cpp', 'src/common/logging.cpp', - 'src/common/serialization/vst2.cpp', - 'src/common/communication.cpp', 'src/common/utils.cpp', - 'src/plugin/host-process.cpp', - 'src/plugin/vst2-plugin.cpp', 'src/plugin/bridges/vst2.cpp', + 'src/plugin/host-process.cpp', 'src/plugin/utils.cpp', + 'src/plugin/vst2-plugin.cpp', version_header, ], native : true, @@ -128,10 +128,10 @@ shared_library( ) host_sources = [ + 'src/common/communication/vst2.cpp', + 'src/common/serialization/vst2.cpp', 'src/common/configuration.cpp', 'src/common/logging.cpp', - 'src/common/serialization/vst2.cpp', - 'src/common/communication.cpp', 'src/common/utils.cpp', 'src/wine-host/bridges/vst2.cpp', 'src/wine-host/editor.cpp', diff --git a/src/common/communication.cpp b/src/common/communication/vst2.cpp similarity index 98% rename from src/common/communication.cpp rename to src/common/communication/vst2.cpp index 1ad60440..845507cc 100644 --- a/src/common/communication.cpp +++ b/src/common/communication/vst2.cpp @@ -14,11 +14,11 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "communication.h" +#include "vst2.h" #include -#include "utils.h" +#include "../utils.h" namespace fs = boost::filesystem; diff --git a/src/common/communication.h b/src/common/communication/vst2.h similarity index 99% rename from src/common/communication.h rename to src/common/communication/vst2.h index efcd32e2..1bc0e658 100644 --- a/src/common/communication.h +++ b/src/common/communication/vst2.h @@ -30,7 +30,7 @@ #include #include -#include "logging.h" +#include "../logging.h" template using OutputAdapter = bitsery::OutputBufferAdapter; diff --git a/src/common/logging.h b/src/common/logging.h index ef046f94..8ce0a8e8 100644 --- a/src/common/logging.h +++ b/src/common/logging.h @@ -20,6 +20,8 @@ #include #include +// TODO: Split up the plugin API specific logging functions so we don't have to +// include a bunch of stuff we don't need #include "serialization/vst2.h" /** diff --git a/src/plugin/bridges/vst2.cpp b/src/plugin/bridges/vst2.cpp index d1518130..4572bab2 100644 --- a/src/plugin/bridges/vst2.cpp +++ b/src/plugin/bridges/vst2.cpp @@ -20,7 +20,7 @@ #include #include -#include "../../common/communication.h" +#include "../../common/communication/vst2.h" #include "../../common/utils.h" #include "../utils.h" diff --git a/src/plugin/bridges/vst2.h b/src/plugin/bridges/vst2.h index f92bb27a..c9660d41 100644 --- a/src/plugin/bridges/vst2.h +++ b/src/plugin/bridges/vst2.h @@ -23,7 +23,7 @@ #include #include -#include "../../common/communication.h" +#include "../../common/communication/vst2.h" #include "../../common/configuration.h" #include "../../common/logging.h" #include "../host-process.h" diff --git a/src/plugin/host-process.cpp b/src/plugin/host-process.cpp index 930209f8..04f858f8 100644 --- a/src/plugin/host-process.cpp +++ b/src/plugin/host-process.cpp @@ -21,7 +21,7 @@ #include #include -#include "../common/communication.h" +#include "../common/communication/vst2.h" namespace bp = boost::process; namespace fs = boost::filesystem; diff --git a/src/plugin/host-process.h b/src/plugin/host-process.h index c21ecf16..585c55a9 100644 --- a/src/plugin/host-process.h +++ b/src/plugin/host-process.h @@ -25,7 +25,7 @@ #include #include -#include "../common/communication.h" +#include "../common/communication/vst2.h" #include "../common/logging.h" #include "utils.h" diff --git a/src/wine-host/bridges/group.cpp b/src/wine-host/bridges/group.cpp index d81788ca..7d9396a3 100644 --- a/src/wine-host/bridges/group.cpp +++ b/src/wine-host/bridges/group.cpp @@ -21,7 +21,9 @@ #include #include -#include "../../common/communication.h" +// TODO: Change this to commucation/common.h after refactoring, and do the same +// thing in other places where we don't need everything from VST2 +#include "../../common/communication/vst2.h" // FIXME: `std::filesystem` is broken in wineg++, at least under Wine 5.8. Any // path operation will thrown an encoding related error diff --git a/src/wine-host/bridges/vst2.cpp b/src/wine-host/bridges/vst2.cpp index 7d11aa32..a52cdb8f 100644 --- a/src/wine-host/bridges/vst2.cpp +++ b/src/wine-host/bridges/vst2.cpp @@ -21,7 +21,7 @@ #include #include -#include "../../common/communication.h" +#include "../../common/communication/vst2.h" /** * A function pointer to what should be the entry point of a VST plugin. diff --git a/src/wine-host/bridges/vst2.h b/src/wine-host/bridges/vst2.h index c3e1ed16..4dc46e7d 100644 --- a/src/wine-host/bridges/vst2.h +++ b/src/wine-host/bridges/vst2.h @@ -29,7 +29,7 @@ #include #include -#include "../../common/communication.h" +#include "../../common/communication/vst2.h" #include "../../common/configuration.h" #include "../../common/logging.h" #include "../editor.h"