From 94e201df78dc742988ddeb228009ba6ee037df24 Mon Sep 17 00:00:00 2001 From: Danny Scott Date: Fri, 2 Feb 2018 10:05:04 -0400 Subject: [PATCH] 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. --- build/tools/msvs/officialbuild.bat | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/build/tools/msvs/officialbuild.bat b/build/tools/msvs/officialbuild.bat index d622d2d495..af1e4f2d62 100755 --- a/build/tools/msvs/officialbuild.bat +++ b/build/tools/msvs/officialbuild.bat @@ -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