From d846cfae6f1563094ba095f30fd8840b5a9f4c79 Mon Sep 17 00:00:00 2001 From: dos Date: Wed, 3 Jul 2019 11:11:01 -0300 Subject: [PATCH] Add use of Visual Studio 2019 (vc142) to official build scripts Build binaries using MSVS 2019/vc142 toolset too. Closes https://github.com/wxWidgets/wxWidgets/pull/1384 --- build/tools/msvs/buildall.bat | 1 + build/tools/msvs/officialbuild.bat | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/build/tools/msvs/buildall.bat b/build/tools/msvs/buildall.bat index fdc2dbb710..49b74e4ef0 100755 --- a/build/tools/msvs/buildall.bat +++ b/build/tools/msvs/buildall.bat @@ -1,3 +1,4 @@ +start cmd /k Call officialbuild.bat vc142 start cmd /k Call officialbuild.bat vc141 start cmd /k Call officialbuild.bat vc140 start cmd /k Call officialbuild.bat vc120 diff --git a/build/tools/msvs/officialbuild.bat b/build/tools/msvs/officialbuild.bat index 9cde4ac34e..5e8f6820fe 100755 --- a/build/tools/msvs/officialbuild.bat +++ b/build/tools/msvs/officialbuild.bat @@ -22,6 +22,23 @@ rem ======================================================== set compvers="Unknown" +if "%1" == "vc142" ( + @echo Building for vc142 / vs2019 + set comp=142 + set compvers=vc142 + + if NOT "%VS160COMNTOOLS%" == "" ( + call "%VS160COMNTOOLS%VsDevCmd.bat" + ) + if "%VS160COMNTOOLS%" == "" ( + call %curr_dir%\findvs 16.0 17.0 + + if errorlevel 1 ( + @echo vswhere.exe must be in your path or a VS2019 developer command prompt must be used. + goto end + ) + ) +) if "%1" == "vc141" ( @echo Building for vc141 / vs2017 set comp=141 @@ -79,6 +96,10 @@ if %compvers% == "vc90" ( @echo ============================================================ ) +rem Return to the build directory in case we have been moved elsewhere. + +cd %VSCMD_START_DIR% + @echo Removing the existing destination so that a complete rebuild occurs. rmdir %compvers%_mswuddll /s /q @@ -96,6 +117,7 @@ del %compvers%x86_Release.txt del %compvers%x64_Debug.txt del %compvers%x64_Release.txt +if "%compvers%" == "vc142" call "%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" x64 if "%compvers%" == "vc141" call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" x64 if "%compvers%" == "vc140" call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 if "%compvers%" == "vc120" call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64 @@ -130,6 +152,7 @@ nmake -f makefile.vc BUILD=debug SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD if ERRORLEVEL 1 goto ERR_BUILD +if "%compvers%" == "vc142" call "%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" x86 if "%compvers%" == "vc141" call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" x86 if "%compvers%" == "vc140" call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 if "%compvers%" == "vc120" call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86 @@ -191,6 +214,7 @@ goto End :VERSIONS @echo. @echo Compiler Version: One of - + @echo vc142 @echo vc141 @echo vc140 @echo vc120