From 0156b61e6404df0253abb348e58d3a5001ed4293 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 22 Jun 2021 16:30:49 +0200 Subject: [PATCH] Show notification when plugin host fails to start This one's a bit generic since the relevant output from the Wine process will have already been printed to the logger before this point. --- CHANGELOG.md | 5 +++++ src/plugin/bridges/common.h | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b742eb6..515f739c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Added +- When the Wine plugin host process fails to start, yabridge will now show a + desktop notification to notify you about this. This lets you diagnose issues + faster if you didn't already start your DAW from a terminal. These + notifications require `libnotify` and the `notify-send` application to be + installed. - Added an environment variable to disable the watchdog timer. This allows the Wine process to run under a separate namespace. If you don't know that you need this, then you probably don't need this! diff --git a/src/plugin/bridges/common.h b/src/plugin/bridges/common.h index fc0b209f..9f7bb00f 100644 --- a/src/plugin/bridges/common.h +++ b/src/plugin/bridges/common.h @@ -310,6 +310,16 @@ class PluginBridge { generic_logger.log( "The Wine host process has exited unexpectedly. Check " "the output above for more information."); + + // Also show a desktop notification so users running from + // the GUI get a heads up + send_notification( + "Failed to start the Wine plugin host", + "Check yabridge's output for more information on what " + "went wrong. You may need to rerun your DAW from a " + "terminal and restart the plugin scanning process to " + "see the error."); + std::terminate(); }