Updated build script.

This commit is contained in:
LoRd_MuldeR 2018-12-10 18:06:07 +01:00
parent 57b8870f28
commit c1e820fb04

View File

@ -8,6 +8,11 @@ set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC"
set "UPX3_PATH=%~dp0..\Prerequisites\UPX" set "UPX3_PATH=%~dp0..\Prerequisites\UPX"
set "PDOC_PATH=%~dp0..\Prerequisites\Pandoc" set "PDOC_PATH=%~dp0..\Prerequisites\Pandoc"
REM ///////////////////////////////////////////////////////////////////////////
REM // Set Paths
REM ///////////////////////////////////////////////////////////////////////////
set "SOLUTION_FILE=TimedExec_VS2017.sln"
REM ############################################### REM ###############################################
REM # DO NOT MODIFY ANY LINES BELOW THIS LINE !!! # REM # DO NOT MODIFY ANY LINES BELOW THIS LINE !!! #
REM ############################################### REM ###############################################
@ -15,18 +20,31 @@ REM ###############################################
REM /////////////////////////////////////////////////////////////////////////// REM ///////////////////////////////////////////////////////////////////////////
REM // Setup environment REM // Setup environment
REM /////////////////////////////////////////////////////////////////////////// REM ///////////////////////////////////////////////////////////////////////////
call "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" x86 if exist "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" (
call "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" x86
) else (
if exist "%MSVC_PATH%\vcvarsall.bat" (
call "%MSVC_PATH%\vcvarsall.bat" x86
) else (
echo vcvarsall.bat not found. Please check your MSVC_PATH var^^!
goto BuildError
)
)
REM /////////////////////////////////////////////////////////////////////////// REM ///////////////////////////////////////////////////////////////////////////
REM // Check environment REM // Check environment
REM /////////////////////////////////////////////////////////////////////////// REM ///////////////////////////////////////////////////////////////////////////
if "%VCToolsInstallDir%"=="" ( if "%VCToolsInstallDir%"=="" (
echo %%VCINSTALLDIR%% not specified. Please check your MSVC_PATH var^^! if "%VCINSTALLDIR%"=="" (
goto BuildError echo %%VCINSTALLDIR%% not specified. Please check your MSVC_PATH var^^!
goto BuildError
)
) )
if not exist "%VCToolsInstallDir%\bin\Hostx64\x86\cl.exe" ( if not exist "%VCToolsInstallDir%\bin\Hostx64\x86\cl.exe" (
echo C++ compiler binary not found. Please check your MSVC_PATH var^^! if not exist "%VCINSTALLDIR%\bin\cl.exe" (
goto BuildError echo C++ compiler binary not found. Please check your MSVC_PATH var^^!
goto BuildError
)
) )
if not exist "%UPX3_PATH%\upx.exe" ( if not exist "%UPX3_PATH%\upx.exe" (
echo UPX binary could not be found. Please check your UPX3_PATH var^^! echo UPX binary could not be found. Please check your UPX3_PATH var^^!
@ -66,11 +84,11 @@ for %%p in (Win32, x64) do (
echo BEGIN BUILD [%%p/Release] echo BEGIN BUILD [%%p/Release]
echo --------------------------------------------------------------------- echo ---------------------------------------------------------------------
MSBuild.exe /property:Platform=%%p /property:Configuration=Release /target:clean "%~dp0\TimedExec.sln" MSBuild.exe /property:Platform=%%p /property:Configuration=Release /target:clean "%~dp0\%SOLUTION_FILE%"
if not "!ERRORLEVEL!"=="0" goto BuildError if not "!ERRORLEVEL!"=="0" goto BuildError
MSBuild.exe /property:Platform=%%p /property:Configuration=Release /target:rebuild "%~dp0\TimedExec.sln" MSBuild.exe /property:Platform=%%p /property:Configuration=Release /target:rebuild "%~dp0\%SOLUTION_FILE%"
if not "!ERRORLEVEL!"=="0" goto BuildError if not "!ERRORLEVEL!"=="0" goto BuildError
MSBuild.exe /property:Platform=%%p /property:Configuration=Release /target:build "%~dp0\TimedExec.sln" MSBuild.exe /property:Platform=%%p /property:Configuration=Release /target:build "%~dp0\%SOLUTION_FILE%"
if not "!ERRORLEVEL!"=="0" goto BuildError if not "!ERRORLEVEL!"=="0" goto BuildError
) )