1*9880d681SAndroid Build Coastguard Worker@echo off 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Workerecho Installing MSVC integration... 4*9880d681SAndroid Build Coastguard Workerset SUCCESS=0 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard WorkerREM Change to the directory of this batch file. 7*9880d681SAndroid Build Coastguard Workercd /d %~dp0 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard WorkerREM Loop over the two platforms in awkward batch file fashion. 10*9880d681SAndroid Build Coastguard Workerset PLATFORM=None 11*9880d681SAndroid Build Coastguard Worker:PLATFORMLOOPHEAD 12*9880d681SAndroid Build Coastguard WorkerIF %PLATFORM% == x64 GOTO PLATFORMLOOPEND 13*9880d681SAndroid Build Coastguard WorkerIF %PLATFORM% == Win32 SET PLATFORM=x64 14*9880d681SAndroid Build Coastguard WorkerIF %PLATFORM% == None SET PLATFORM=Win32 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard WorkerREM Search for the MSBuild toolsets directory. 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets" 19*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V100 20*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets" 21*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V100 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker:TRY_V110 24*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets" 25*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V110 26*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets" 27*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V110 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker:TRY_V120 30*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets" 31*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V120 32*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets" 33*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V120 34*9880d681SAndroid Build Coastguard Worker 35*9880d681SAndroid Build Coastguard Worker:TRY_V140 36*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets" 37*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V140 38*9880d681SAndroid Build Coastguard WorkerSET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets" 39*9880d681SAndroid Build Coastguard WorkerIF EXIST %D% GOTO FOUND_V140 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Worker:TRY_V150 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard WorkerGOTO PLATFORMLOOPHEAD 44*9880d681SAndroid Build Coastguard Worker 45*9880d681SAndroid Build Coastguard Worker:PLATFORMLOOPEND 46*9880d681SAndroid Build Coastguard WorkerIF %SUCCESS% == 1 goto DONE 47*9880d681SAndroid Build Coastguard Workerecho Failed to find MSBuild toolsets directory. 48*9880d681SAndroid Build Coastguard Workergoto FAILED 49*9880d681SAndroid Build Coastguard Worker 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Worker:FOUND_V100 52*9880d681SAndroid Build Coastguard WorkerREM Routine for installing v100 toolchain. 53*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010 54*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 55*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props %D%\LLVM-vs2010 56*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 57*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets %D%\LLVM-vs2010 58*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 59*9880d681SAndroid Build Coastguard Workerset SUCCESS=1 60*9880d681SAndroid Build Coastguard WorkerGOTO TRY_V110 61*9880d681SAndroid Build Coastguard Worker 62*9880d681SAndroid Build Coastguard Worker:FOUND_V110 63*9880d681SAndroid Build Coastguard WorkerREM Routine for installing v110 toolchain. 64*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012 65*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 66*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props %D%\LLVM-vs2012 67*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 68*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets %D%\LLVM-vs2012 69*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 70*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2012_xp mkdir %D%\LLVM-vs2012_xp 71*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 72*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp 73*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 74*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp 75*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 76*9880d681SAndroid Build Coastguard Workerset SUCCESS=1 77*9880d681SAndroid Build Coastguard WorkerGOTO TRY_V120 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Worker:FOUND_V120 80*9880d681SAndroid Build Coastguard WorkerREM Routine for installing v120 toolchain. 81*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013 82*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 83*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2013.props %D%\LLVM-vs2013\toolset.props 84*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 85*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2013.targets %D%\LLVM-vs2013\toolset.targets 86*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 87*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2013_xp mkdir %D%\LLVM-vs2013_xp 88*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 89*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2013_xp.props %D%\LLVM-vs2013_xp\toolset.props 90*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 91*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets 92*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 93*9880d681SAndroid Build Coastguard Workerset SUCCESS=1 94*9880d681SAndroid Build Coastguard WorkerGOTO TRY_V140 95*9880d681SAndroid Build Coastguard Worker 96*9880d681SAndroid Build Coastguard Worker:FOUND_V140 97*9880d681SAndroid Build Coastguard WorkerREM Routine for installing v140 toolchain. 98*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2014 mkdir %D%\LLVM-vs2014 99*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 100*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2014.props %D%\LLVM-vs2014\toolset.props 101*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 102*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2014.targets %D%\LLVM-vs2014\toolset.targets 103*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 104*9880d681SAndroid Build Coastguard WorkerIF NOT EXIST %D%\LLVM-vs2014_xp mkdir %D%\LLVM-vs2014_xp 105*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 106*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2014_xp.props %D%\LLVM-vs2014_xp\toolset.props 107*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 108*9880d681SAndroid Build Coastguard Workercopy %PLATFORM%\toolset-vs2014_xp.targets %D%\LLVM-vs2014_xp\toolset.targets 109*9880d681SAndroid Build Coastguard WorkerIF NOT %ERRORLEVEL% == 0 GOTO FAILED 110*9880d681SAndroid Build Coastguard Workerset SUCCESS=1 111*9880d681SAndroid Build Coastguard WorkerGOTO TRY_V150 112*9880d681SAndroid Build Coastguard Worker 113*9880d681SAndroid Build Coastguard Worker 114*9880d681SAndroid Build Coastguard Worker:DONE 115*9880d681SAndroid Build Coastguard Workerecho Done! 116*9880d681SAndroid Build Coastguard Workergoto END 117*9880d681SAndroid Build Coastguard Worker 118*9880d681SAndroid Build Coastguard Worker:FAILED 119*9880d681SAndroid Build Coastguard Workerecho MSVC integration install failed. 120*9880d681SAndroid Build Coastguard Workerpause 121*9880d681SAndroid Build Coastguard Workergoto END 122*9880d681SAndroid Build Coastguard Worker 123*9880d681SAndroid Build Coastguard Worker:END 124