From 3dfb17cf5e8d420fb121882be2a17ee734c459f6 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 13 Jul 2021 21:32:59 +0200 Subject: [PATCH] Add suggestion to rerun sync after startup failure --- src/plugin/vst2-plugin.cpp | 10 ++++++++-- src/plugin/vst3-plugin.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/plugin/vst2-plugin.cpp b/src/plugin/vst2-plugin.cpp index a642e8f5..0eda55f3 100644 --- a/src/plugin/vst2-plugin.cpp +++ b/src/plugin/vst2-plugin.cpp @@ -22,6 +22,8 @@ #include "../common/logging/common.h" #include "bridges/vst2.h" +using namespace std::literals::string_literals; + #define VST_EXPORT __attribute__((visibility("default"))) // The main entry point for VST2 plugins should be called `VSTPluginMain``. The @@ -54,8 +56,12 @@ extern "C" VST_EXPORT AEffect* VSTPluginMain( // Also show a desktop notification most people likely won't see the // above message - send_notification("Failed to initialize VST2 plugin", error.what(), - true); + send_notification( + "Failed to initialize VST2 plugin", + error.what() + + "\nIf you just updated yabridge, then you may need to rerun " + "'yabridgectl sync' first to update your plugins."s, + true); return nullptr; } diff --git a/src/plugin/vst3-plugin.cpp b/src/plugin/vst3-plugin.cpp index 3bd609ec..f43d1761 100644 --- a/src/plugin/vst3-plugin.cpp +++ b/src/plugin/vst3-plugin.cpp @@ -16,6 +16,8 @@ #include "bridges/vst3.h" +using namespace std::literals::string_literals; + // FIXME: The VST3 SDK as of version 3.7.2 now includes multiple local functions // called `InitModule` and `DeinitModule`: one in the new // `public.sdk/source/main/initmodule.cpp`, and the existing ones in the @@ -57,8 +59,12 @@ bool InitModule() { // Also show a desktop notification most people likely won't see the // above message - send_notification("Failed to initialize VST3 plugin", error.what(), - true); + send_notification( + "Failed to initialize VST3 plugin", + error.what() + + "\nIf you just updated yabridge, then you may need to rerun " + "'yabridgectl sync' first to update your plugins."s, + true); return false; }