SetupVSEnvironment.bat 766 B

123456789101112131415161718192021222324252627282930
  1. @echo OFF
  2. :: locate VS2017, this is done first as inside the conditional was having problems
  3. FOR /F "usebackq tokens=2,* skip=2" %%L IN (
  4. `reg query ""HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7"" /v 15.0 2^> nul`
  5. ) DO (SET ATOMIC_VS2017PATH=%%M)
  6. if "%1"=="VS2017" (
  7. if defined ATOMIC_VS2017PATH (
  8. set ATOMIC_CMAKE="%ATOMIC_VS2017PATH%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"
  9. set ATOMIC_CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
  10. call "%ATOMIC_VS2017PATH%\Common7\Tools\VsDevCmd.bat"
  11. )
  12. ) else (
  13. if defined VS140COMNTOOLS (
  14. set ATOMIC_CMAKE=cmake
  15. set ATOMIC_CMAKE_GENERATOR="Visual Studio 14 2015 Win64"
  16. call "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat"
  17. )
  18. )