Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- @rem Packages up VS2017 toolchain into builds.7z archive
- @set TOOLS_VERSION=14.13.26128
- @cd "%~dp0"
- @set VC_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\VC\
- @if not exist "%VC_PATH%" goto error_no_vs
- @if not exist "%VC_PATH%"Tools\MSVC\%TOOLS_VERSION% goto error_no_vs
- @echo *** Deleting existing builds
- @del builds.7z
- @rmdir /S /Q builds
- @echo *** Copying VS2017 toolkit files from %VC_PATH%
- @set DST_PATH=builds\
- @mkdir %DST_PATH%
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx64\x64" "%DST_PATH%bin\Hostx64\x64"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx86\x86" "%DST_PATH%bin\Hostx86\x86"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx64\arm" "%DST_PATH%bin\Hostx64\arm"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx64\arm64" "%DST_PATH%bin\Hostx64\arm64"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\include" "%DST_PATH%include"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\x64" "%DST_PATH%lib\x64"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\x86" "%DST_PATH%lib\x86"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\arm" "%DST_PATH%lib\arm"
- @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\arm64" "%DST_PATH%lib\arm64"
- @echo *** Compressing into builds.7z
- @cd builds
- @call ..\..\..\..\..\..\External\7z\win64\7za.exe a ..\builds.7z *
- @cd ..
- @echo *** builds.7z file created with VS2017 toolchain
- @goto end
- :error_no_vs
- @echo ERROR: Cannot find VS2017 Professional (%TOOLS_VERSION%) installation folder
- @goto end
- :end
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement