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