annotate tools/msbuild/install.bat @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents 60c9769439b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
1 @echo off
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
2
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
3 echo Installing MSVC integration...
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
4 set SUCCESS=0
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
5
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
6 REM In general this script should not be used except for development and testing
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
7 REM purposes. The proper way to install is via the VSIX, and the proper way to
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
8 REM uninstall is through the Visual Studio extension manager.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
9
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
10 REM Change to the directory of this batch file.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
11 cd /d %~dp0
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
12
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
13 REM Older versions of VS would look for these files in the Program Files\MSBuild directory
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
14 REM but with VS2017 it seems to look for these directly in the Visual Studio instance.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
15 REM This means we'll need to do a little extra work to properly detect all the various
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
16 REM instances, but in reality we can probably sidestep all of this by just wrapping this
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
17 REM in a vsix and calling it a day, as that should handle everything for us.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
18 SET VCTargets=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
19
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
20 ECHO Installing Common Files
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
21 copy LLVM.Cpp.Common.props "%VCTargets%"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
22 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
23 copy LLVM.Cpp.Common.targets "%VCTargets%"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
24 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
25
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
26 ECHO Installing x64 Platform Toolset
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
27 SET PlatformToolsets=%VCTargets%\Platforms\x64\PlatformToolsets
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
28 IF NOT EXIST "%PlatformToolsets%\llvm" mkdir "%PlatformToolsets%\llvm"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
29 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
30 copy PlatformX64\Toolset.props "%PlatformToolsets%\llvm"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
31 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
32 copy PlatformX64\Toolset.targets "%PlatformToolsets%\llvm"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
33 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
34
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
35 ECHO Installing Win32 Platform Toolset
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
36 SET PlatformToolsets=%VCTargets%\Platforms\Win32\PlatformToolsets
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
37 IF NOT EXIST "%PlatformToolsets%\llvm" mkdir "%PlatformToolsets%\llvm"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
38 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
39 copy PlatformX86\Toolset.props "%PlatformToolsets%\llvm"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
40 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
41 copy PlatformX86\Toolset.targets "%PlatformToolsets%\llvm"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
42 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
43
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
44 ECHO Installing C++ Settings UI
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
45 copy llvm-general.xml "%VCTargets%\1033"
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
46 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
47
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
48 :DONE
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
49 echo Done!
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
50 goto END
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
51
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
52 :FAILED
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
53 echo MSVC integration install failed.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
54 pause
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
55 goto END
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
56
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
57 :END