Prechádzať zdrojové kódy

Updating public build script to VS 2019 and centralizing BUILDTOOLS variable

Source commit: 16543071822a974a0c6f7a93ec5734996fe1d4e1
Martin Prikryl 3 rokov pred
rodič
commit
7ae3432834
4 zmenil súbory, kde vykonal 9 pridanie a 14 odobranie
  1. 3 1
      build.bat
  2. 3 2
      libs/buildlibs.bat
  3. 1 4
      libs/openssl/Makefile
  4. 2 7
      libs/puttyvs/build.bat

+ 3 - 1
build.bat

@@ -3,12 +3,14 @@ rem See 'readme' file
 if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMFILES32=%ProgramFiles%
 if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set PROGRAMFILES32=%ProgramFiles(x86)%
 set BDS=%PROGRAMFILES32%\Embarcadero\Studio\14.0
-set MSBUILD=%PROGRAMFILES32%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
+set MSBUILD=%PROGRAMFILES32%\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
 
 set WITH_DOTNET=1
 if "%BUILD_TARGET%"=="" set BUILD_TARGET=Build
 if "%BUILD_CONFIG%"=="" set BUILD_CONFIG=Release
 
+set BUILDTOOLS=%~dp0\buildtools
+
 cd libs
 call buildlibs.bat
 

+ 3 - 2
libs/buildlibs.bat

@@ -1,5 +1,6 @@
 @echo off
-set BUILDTOOLS_PATH=%1
+if "%BUILDTOOLS%" == "" echo BUILDTOOLS not set & exit
+
 if not exist lib mkdir lib
 
 rem ==== OpenSSL ====
@@ -70,7 +71,7 @@ goto SKIP_PUTTYVS
 
 echo Building PuTTYVS ...
 cd puttyvs
-call build.bat %BUILDTOOLS_PATH%
+call build.bat
 cd ..
 
 if not exist lib\PuTTYVS.lib (

+ 1 - 4
libs/openssl/Makefile

@@ -39,10 +39,7 @@ RM=del
 MKDIR=-mkdir
 MKLIB=tlib /P128 /C
 
-!ifndef BUILDTOOLS_PATH
-BUILDTOOLS_PATH=..\..\buildtools
-!endif
-ASM=$(BUILDTOOLS_PATH)\tools\nasm -f obj -d__omf__
+ASM=$(BUILDTOOLS)\tools\nasm -f obj -d__omf__
 
 ######################################################
 # You should not need to touch anything below this point

+ 2 - 7
libs/puttyvs/build.bat

@@ -1,15 +1,10 @@
 @echo off
-set BUILDTOOLS_PATH=%1
-if "%BUILDTOOLS_PATH%" == "" set BUILDTOOLS_PATH=..\..\buildtools
-if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMFILES32=%ProgramFiles%
-if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set PROGRAMFILES32=%ProgramFiles(x86)%
-
 set COFF_LIB=Release\PuTTYVS.lib
 set OMF_LIB=..\lib\PuTTYVS.lib
 if exist %COFF_LIB% del %COFF_LIB%
 if exist %OMF_LIB% del %OMF_LIB%
 
-"%PROGRAMFILES32%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" PuTTYVS.vcxproj /p:Configuration=Release
+"%MSBUILD%" PuTTYVS.vcxproj /p:Configuration=Release
 if exist %COFF_LIB% (
-  %BUILDTOOLS_PATH%\tools\objconv.exe -v2 -fomf32 %COFF_LIB% %OMF_LIB%
+  %BUILDTOOLS%\tools\objconv.exe -v2 -fomf32 %COFF_LIB% %OMF_LIB%
 )