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. --- wscript | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index bcfe22b44..74ac828b6 100644 --- a/wscript +++ b/wscript @@ -81,6 +81,7 @@ def options(opt): opt.add_option('--disable-more-warnings', action='store_true', default=False, help='disable some warnings raised by Xcode 15 with the 2.16 branch') opt.add_option('--c++17', action='store_true', default=False, help='build with C++17 and libxml++-4.0') opt.add_option('--variant', help="build with variant") + opt.add_option('--enable-sentry', action='store_true', default=False, help='build with Sentry to report errors') def configure(conf): conf.load('compiler_cxx') @@ -113,6 +114,7 @@ def configure(conf): conf.env.STATIC_DCPOMATIC = conf.options.static_dcpomatic conf.env.ENABLE_DISK = conf.options.enable_disk conf.env.ENABLE_GROK = conf.options.enable_grok + conf.env.ENABLE_SENTRY = conf.options.enable_sentry if conf.options.destdir == '': conf.env.INSTALL_PREFIX = conf.options.prefix else: @@ -186,6 +188,9 @@ def configure(conf): if conf.options.enable_grok: conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_GROK') + if conf.options.enable_sentry: + conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_SENTRY') + if conf.options.use_lld: try: conf.find_program('ld.lld') @@ -703,6 +708,8 @@ def configure(conf): conf.find_program('msgfmt', var='MSGFMT') conf.check(header_name='valgrind/memcheck.h', mandatory=False) + if conf.env.ENABLE_SENTRY: + conf.check(header_name='sentry.h', uselib_store='SENTRY', lib=['sentry'], mandatory=True) datadir = conf.env.DATADIR if not datadir: -- cgit v1.2.3