Update batch file for MSW binaries for MSVS 2017

VS2017 environment bat files change the working directory so the build
directory is returned to after calling them.

A warning has been added that the VS150COMNTOOLS environment variable
needs to be set or a VS2017 command prompt needs to be used for VS2017
builds. MS no longer sets this variable on install.

For vc110 and vc120 builds the x64 switch has been changed to x86_amd64.

Closes #18075.
This commit is contained in:
Danny Scott
2018-02-02 10:05:04 -04:00
committed by Vadim Zeitlin
parent 0091e2aaab
commit 94e201df78

View File

@@ -6,6 +6,13 @@ set curr_dir=%cd%
cd ..\..\msw
rem VS2017 changes the build directory when environment batch files
rem are called, so remember where we are building from.
set build_dir=%cd%
del ..\..\include\wx\msw\setup.h
rem ================ wxWidgets Official Build ===============
rem
rem Open a command prompt and run this from the build\tools\msvs folder.
@@ -17,9 +24,12 @@ set compvers="Unknown"
if "%1" == "vc141" (
@echo Building for vc141 / vs2017
@echo This will only work if the environment varialbe VS150COMNTOOLS is set
@echo or a VS2017 command prompt is used.
set comp=141
set compvers=vc141
call "%VS150COMNTOOLS%VsDevCmd.bat"
cd %build_dir%
)
if "%1" == "vc140" (
@echo Building for vc140 / vs2015
@@ -80,11 +90,13 @@ del %compvers%x64_Release.txt
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" x64
if "%compvers%" == "vc110" call "%VS110COMNTOOLS%..\..\VC\vcvarsall.bat" x64
if "%compvers%" == "vc120" call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
if "%compvers%" == "vc110" call "%VS110COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
if "%compvers%" == "vc100" call "%WINDOWS71SDK%SetEnv.Cmd" /X64 /Release
if "%compvers%" == "vc90" call "%WINDOWS61SDK%SetEnv.Cmd" /X64 /Release
cd %build_dir%
@echo 64 bit release build
nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 TARGET_CPU=AMD64 >> %compvers%x64_Release.txt
@@ -107,6 +119,8 @@ if "%compvers%" == "vc110" call "%VS110COMNTOOLS%..\..\VC\vcvarsall.bat" x86
if "%compvers%" == "vc100" call "%WINDOWS71SDK%SetEnv.Cmd" /X86 /Release
if "%compvers%" == "vc90" call "%WINDOWS61SDK%SetEnv.Cmd" /X86 /Release
cd %build_dir%
@echo 32 bit release build
nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE >> %compvers%x86_Release.txt