From 27f0f281109686c9f499dd734adb5dc71b4d5c82 Mon Sep 17 00:00:00 2001 From: Tazo Todua Date: Tue, 20 Nov 2018 16:49:30 -0500 Subject: [PATCH] Update build.bat --- build/build.bat | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/build/build.bat b/build/build.bat index 81c278b..dcb2c87 100644 --- a/build/build.bat +++ b/build/build.bat @@ -1,19 +1,30 @@ @echo off -SET vcvars="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" +SET vcvars= + +:: Detect which Visual Studio version is installed +SET dir_10=c:\Program Files (x86)\Microsoft Visual Studio 10.0\ +SET dir_17=c:\Program Files (x86)\Microsoft Visual Studio\2017\ + +IF EXIST %dir_10%\NUL( + SET vcvars="%dir_10%VC\vcvarsall.bat" +) +IF EXIST %dir_17%\NUL( + SET vcvars="%dir_17%Community\VC\Auxiliary\Build\vcvarsall.bat" +) + SET version_h=".\version.h" SET resource_rc="..\src\resource\WinSpy.rc" -REM update the version build count, and -REM the resource-file prior to building the solution +:: update the version build count, and +:: the resource-file prior to building the solution incbuild.rb %version_h% %resource_rc% -REM path to the visual-studio commandline environment variables +:: path to the visual-studio commandline environment variables -REM spawn another shell and run 'build0' with the VCVARS +:: spawn another shell and run 'build0' with the VCVARS %comspec% /c "%vcvars% x86_amd64 && build0.bat" -REM package everything together +:: package everything together buildzip.rb x86 buildzip.rb amd64 -