2b66a6c01ae3d42b8ee19e632a00c25be470abfe
[oota-llvm.git] / tools / msbuild / install.bat
1 @echo off\r
2 \r
3 echo Installing MSVC integration...\r
4 set SUCCESS=0\r
5 \r
6 REM Change to the directory of this batch file.\r
7 cd /d %~dp0\r
8 \r
9 REM Search for the MSBuild toolsets directory.\r
10 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
11 IF EXIST %D% GOTO FOUND_V100\r
12 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
13 IF EXIST %D% GOTO FOUND_V100\r
14 \r
15 :TRY_V110\r
16 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"\r
17 IF EXIST %D% GOTO FOUND_V110\r
18 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"\r
19 IF EXIST %D% GOTO FOUND_V110\r
20 \r
21 IF NOT SUCCESS == 1 echo Failed to find MSBuild toolsets directory.\r
22 IF NOT SUCCESS == 1 goto FAILED\r
23 \r
24 \r
25 :FOUND_V100\r
26 IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010\r
27 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
28 copy Microsoft.Cpp.Win32.LLVM-vs2010.props %D%\LLVM-vs2010\r
29 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
30 copy Microsoft.Cpp.Win32.LLVM-vs2010.targets %D%\LLVM-vs2010\r
31 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
32 set SUCCESS=1\r
33 GOTO TRY_V110\r
34 \r
35 :FOUND_V110\r
36 IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012\r
37 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
38 copy Microsoft.Cpp.Win32.LLVM-vs2012.props %D%\LLVM-vs2012\r
39 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
40 copy Microsoft.Cpp.Win32.LLVM-vs2012.targets %D%\LLVM-vs2012\r
41 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
42 IF NOT EXIST %D%\LLVM-vs2012_xp mkdir %D%\LLVM-vs2012_xp\r
43 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
44 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp\r
45 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
46 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp\r
47 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
48 echo Done!\r
49 goto END\r
50 \r
51 :FAILED\r
52 echo MSVC integration install failed.\r
53 pause\r
54 goto END\r
55 \r
56 :END\r