From e80ab67b546b24692c58808b2f0d3f5e7f188d34 Mon Sep 17 00:00:00 2001 From: Tim Stahlhut Date: Sat, 1 May 2021 08:01:36 -0400 Subject: [PATCH] Fix wxUniv/MSW build by defining MSW-specific wxUSE_XXX options Add definitions of the missing MSW-specific options to wx/univ/setup.h to avoid errors in wx/msw/chkconf.h when building wxUniv. Closes https://github.com/wxWidgets/wxWidgets/pull/2355 --- include/wx/univ/setup.h | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index e4cf8b201d..86519bc9f7 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -1608,6 +1608,35 @@ /* --- end common options --- */ /* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Windows-specific backends choices +// ---------------------------------------------------------------------------- + +// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1. + +// Enable support for GDI+-based implementation of wxGraphicsContext. +// +// Default is 1. +// +// Recommended setting: 1 if you need to support XP, as Direct2D is not +// available there. +#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT + +// Enable support for Direct2D-based implementation of wxGraphicsContext. +// +// Default is 1 for compilers which support it, i.e. VC10+ currently. If you +// use an earlier MSVC version or another compiler and installed the necessary +// SDK components manually, you need to change this setting. +// +// Recommended setting: 1 for faster and better quality graphics under Windows +// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier +// systems will fall back on using GDI+). +#if defined(_MSC_VER) && _MSC_VER >= 1600 + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT +#else + #define wxUSE_GRAPHICS_DIRECT2D 0 +#endif + // ---------------------------------------------------------------------------- // Windows-only settings // ---------------------------------------------------------------------------- @@ -1637,6 +1666,8 @@ // Recommended setting: 1, required by wxMediaCtrl #define wxUSE_ACTIVEX 1 +#define wxUSE_WINRT 0 + // wxDC caching implementation #define wxUSE_DC_CACHEING 1 @@ -1693,6 +1724,8 @@ // Recommended setting: 1, set to 0 for a tiny library size reduction #define wxUSE_TASKBARICON_BALLOONS 1 +#define wxUSE_TASKBARBUTTON 0 + // Set to 1 to compile MS Windows XP theme engine support #define wxUSE_UXTHEME 1 @@ -1729,6 +1762,18 @@ // Crash debugging helpers // ---------------------------------------------------------------------------- +// Set this to 1 to use dbghelp.dll for providing stack traces in crash +// reports. +// +// Default is 1 if the compiler supports it, 0 for old MinGW. +// +// Recommended setting: 1, there is not much gain in disabling this +#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__) + #define wxUSE_DBGHELP 1 +#else + #define wxUSE_DBGHELP 0 +#endif + // Set this to 1 to be able to use wxCrashReport::Generate() to create mini // dumps of your program when it crashes (or at any other moment) //