From 42d11b68812108ccda802d0ff950b5299d08e40a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 30 Nov 2025 23:45:20 +0100 Subject: Add sentry crash reporting on Windows. --- src/tools/dcpomatic.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/tools') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 01543b190..b8975834c 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -76,6 +76,9 @@ #include "lib/email.h" #include "lib/encode_server_finder.h" #include "lib/exceptions.h" +#ifdef DCPOMATIC_SENTRY +#include "lib/dcpomatic_sentry.h" +#endif #include "lib/ffmpeg_film_encoder.h" #include "lib/film.h" #include "lib/font_config.h" @@ -1214,6 +1217,10 @@ private: ev.Skip (); JobManager::drop (); + +#ifdef DCPOMATIC_SENTRY + closedown_sentry(); +#endif } void active_jobs_changed() @@ -1502,6 +1509,14 @@ private: if (what == Config::GROK) { setup_grok_library_path(); } +#elif DCPOMATIC_SENTRY + if (what == Config::ENABLE_CRASH_REPORTING) { + if (Config::instance()->enable_crash_reporting()) { + maybe_setup_sentry(); + } else { + closedown_sentry(); + } + } #else LIBDCP_UNUSED(what); #endif @@ -1703,6 +1718,10 @@ private: */ Config::Bad.connect (boost::bind(&App::config_bad, this, _1)); +#ifdef DCPOMATIC_SENTRY + maybe_setup_sentry(); +#endif + signal_manager = new wxSignalManager (this); _frame = new DOMFrame(variant::wx::dcpomatic()); -- cgit v1.2.3