Merge branch 'ci-msw-vs2022'

Add minimal support for MSVS 2022 and CI builds using it.

See https://github.com/wxWidgets/wxWidgets/pull/2490
This commit is contained in:
Vadim Zeitlin
2021-08-26 00:04:37 +02:00
10 changed files with 41 additions and 17 deletions

View File

@@ -42,17 +42,22 @@ on:
- '*.yml'
jobs:
msw-vs2019:
runs-on: windows-2019
name: wxMSW vs2019 ${{ matrix.configuration }} ${{ matrix.platform }}
msw-msvs:
runs-on: windows-${{ matrix.vsversion }}
name: wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- configuration: 'DLL Debug'
platform: 'x64'
vsversion: 2022
- configuration: 'Debug'
platform: 'Win32'
vsversion: 2019
- configuration: 'DLL Release'
platform: 'x64'
vsversion: 2019
steps:
- name: Checkout
@@ -61,7 +66,9 @@ jobs:
submodules: 'recursive'
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
uses: microsoft/setup-msbuild@v1.0.3
with:
vs-prerelease: true
- name: Build
run: |

View File

@@ -31,7 +31,7 @@ This version of wxWidgets supports the following primary platforms:
Most popular C++ compilers are supported including but not limited to:
- Microsoft Visual C++ 2005 or later (up to 2019).
- Microsoft Visual C++ 2005 or later (up to 2022).
- g++ 4 or later, including MinGW/MinGW-64/TDM under Windows.
- Clang under macOS and Linux.
- Intel icc compiler.

View File

@@ -10,6 +10,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' >= '15.0' and '$(WindowsTargetPlatformVersion)'==''">
<!-- Latest Target Version property -->

View File

@@ -248,7 +248,7 @@ with the vcXXX version number:
Visual Studio 2014 vc120
Visual Studio 2015 vc14x
The Visual Studio 2015, 2017 and 2019 are binary compatible, allowing the
The Visual Studio 2015, 2017, 2019 and 2022 are binary compatible, allowing the
vc14x binary to be used with any of them.
This will build all of the x86 and x64 binaries for the selected compiler version,

View File

@@ -80,7 +80,7 @@ wxWidgets first-tier "ports", ie implementations of wxWidgets API, are:
@li wxMSW: This is the native port for Microsoft Windows systems (from Windows
XP up to Windows 10), either 32 or 64 bits. The primarily supported compilers
are Microsoft Visual C++ (versions 2005 up to 2019 are supported, at least 2005
are Microsoft Visual C++ (versions 2005 up to 2022 are supported, at least 2010
is recommended) and GNU g++ (either from the traditional MinGW, TDM-GCC or
MinGW-w64 distributions).

View File

@@ -50,8 +50,8 @@ Microsoft Visual C++ Compilation {#msw_build_msvs}
### From the IDE
Ready to use project files are provided for VC++ versions 8, 9,
10, 11, 12, 14, 15 and 16 (also known as MSVS 2005, 2008, 2010, 2012,
2013, 2015, 2017 and 2019 respectively).
10, 11, 12, 14, 15, 16 and 17 (also known as MSVS 2005, 2008, 2010, 2012,
2013, 2015, 2017, 2019 and 2022 respectively).
Simply open `wx_vcN.sln` (for N=8, 9, 10, 11, 12, 14, 15 or 16) file,
select the appropriate configuration (Debug or Release, static or DLL)

View File

@@ -30,7 +30,7 @@ To verify your download please use the following SHA-1 checksums:
We provide pre-built binary files for the following compilers:
* Microsoft Visual C++ compiler versions 9.0, 10.0, 11.0, 12.0, 14.0, 14.1 and 14.2 (corresponding to marketing product names of Microsoft Visual Studio 2008, 2010, 2012, 2013, 2015, 2017 and 2019 respectively). Please note that MSVC 14.x versions are ABI-compatible and the same set of binaries is used for all of them.
* Microsoft Visual C++ compiler versions 9.0, 10.0, 11.0, 12.0, 14.0, 14.1, 14.2 and 14.3 (corresponding to marketing product names of Microsoft Visual Studio 2008, 2010, 2012, 2013, 2015, 2017, 2019 and 2022 respectively). Please note that MSVC 14.x versions are ABI-compatible and the same set of binaries is used for all of them.
* MinGW-w64 versions 7.3 and 8.1 (32-bit binaries use SJLJ exceptions, 64-bit ones use SEH, and all binaries use Win32 threads).
* [TDM-GCC](https://jmeubank.github.io/tdm-gcc/) 9.2.0.

View File

@@ -76,8 +76,10 @@
#define wxCOMPILER_PREFIX vc140
#elif _MSC_VER >= 1910 && _MSC_VER < 1920
#define wxCOMPILER_PREFIX vc141
#elif _MSC_VER >= 1920 && _MSC_VER < 2000
#elif _MSC_VER >= 1920 && _MSC_VER < 1930
#define wxCOMPILER_PREFIX vc142
#elif _MSC_VER >= 1930 && _MSC_VER < 2000
#define wxCOMPILER_PREFIX vc143
#else
#error "Unknown MSVC 14.x compiler version, please report to wx-dev."
#endif

View File

@@ -444,11 +444,10 @@ void TextCtrlTestCase::ProcessEnter()
void TextCtrlTestCase::Url()
{
#if wxUSE_UIACTIONSIMULATOR && wxHAS_2CHAR_NEWLINES
// For some unfathomable reason, this test consistently fails when run in
// AppVeyor CI environment, even though it passes locally, so skip it
// there.
if ( wxGetEnv("APPVEYOR", NULL) )
#if wxUSE_UIACTIONSIMULATOR && defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
// For some reason, this test sporadically fails when run in AppVeyor or
// GitHub Actions CI environments, even though it passes locally.
if ( IsAutomaticTest() )
return;
delete m_text;

View File

@@ -541,9 +541,24 @@ bool TestApp::OnInit()
cout << "Test program for wxWidgets non-GUI features\n"
#endif
<< "build: " << WX_BUILD_OPTIONS_SIGNATURE << "\n"
<< "compiled using "
#if defined(__clang__)
<< "clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__
#elif defined(__INTEL_COMPILER)
<< "icc " << __INTEL_COMPILER
#elif defined(__GNUG__)
<< "gcc " << __GNUC__ << "." << __GNUC_MINOR__
#elif defined(_MSC_VER)
<< "msvc " << _MSC_VER
#if defined(_MSC_FULL_VER)
<< " (full: " << _MSC_FULL_VER << ")"
#endif
#else
<< "unidentified compiler"
#endif
<< "\n"
<< "running under " << wxGetOsDescription()
<< " as " << wxGetUserId()
<< ", locale is " << setlocale(LC_ALL, NULL)
<< std::endl;
#if wxUSE_GUI