Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. @echo off
  2. @rem Packages up VS2017 toolchain into builds.7z archive
  3. @set TOOLS_VERSION=14.13.26128
  4.  
  5. @cd "%~dp0"
  6.  
  7. @set VC_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\VC\
  8. @if not exist "%VC_PATH%" goto error_no_vs
  9.  
  10. @if not exist "%VC_PATH%"Tools\MSVC\%TOOLS_VERSION% goto error_no_vs
  11.  
  12. @echo *** Deleting existing builds
  13. @del builds.7z
  14. @rmdir /S /Q builds
  15.  
  16. @echo *** Copying VS2017 toolkit files from %VC_PATH%
  17. @set DST_PATH=builds\
  18. @mkdir %DST_PATH%
  19. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx64\x64" "%DST_PATH%bin\Hostx64\x64"
  20. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx86\x86" "%DST_PATH%bin\Hostx86\x86"
  21. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx64\arm" "%DST_PATH%bin\Hostx64\arm"
  22. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\bin\Hostx64\arm64" "%DST_PATH%bin\Hostx64\arm64"
  23. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\include" "%DST_PATH%include"
  24. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\x64" "%DST_PATH%lib\x64"
  25. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\x86" "%DST_PATH%lib\x86"
  26. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\arm" "%DST_PATH%lib\arm"
  27. @xcopy /s /y /q /i "%VC_PATH%Tools\MSVC\%TOOLS_VERSION%\lib\arm64" "%DST_PATH%lib\arm64"
  28.  
  29. @echo *** Compressing into builds.7z
  30. @cd builds
  31. @call ..\..\..\..\..\..\External\7z\win64\7za.exe a ..\builds.7z *
  32. @cd ..
  33.  
  34. @echo *** builds.7z file created with VS2017 toolchain
  35.  
  36. @goto end
  37.  
  38. :error_no_vs
  39. @echo ERROR: Cannot find VS2017 Professional (%TOOLS_VERSION%) installation folder
  40. @goto end
  41.  
  42. :end
  43. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement