Fix msbuild integration install script.
[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 %SUCCESS% == 1 goto DONE\r
22 echo Failed to find MSBuild toolsets directory.\r
23 goto FAILED\r
24 \r
25 \r
26 :FOUND_V100\r
27 IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010\r
28 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
29 copy Microsoft.Cpp.Win32.LLVM-vs2010.props %D%\LLVM-vs2010\r
30 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
31 copy Microsoft.Cpp.Win32.LLVM-vs2010.targets %D%\LLVM-vs2010\r
32 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
33 set SUCCESS=1\r
34 GOTO TRY_V110\r
35 \r
36 :FOUND_V110\r
37 IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012\r
38 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
39 copy Microsoft.Cpp.Win32.LLVM-vs2012.props %D%\LLVM-vs2012\r
40 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
41 copy Microsoft.Cpp.Win32.LLVM-vs2012.targets %D%\LLVM-vs2012\r
42 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
43 IF NOT EXIST %D%\LLVM-vs2012_xp mkdir %D%\LLVM-vs2012_xp\r
44 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
45 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp\r
46 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
47 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp\r
48 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
49 \r
50 :DONE\r
51 echo Done!\r
52 goto END\r
53 \r
54 :FAILED\r
55 echo MSVC integration install failed.\r
56 pause\r
57 goto END\r
58 \r
59 :END\r