summaryrefslogtreecommitdiff
path: root/tools/msbuild/install.bat
diff options
context:
space:
mode:
Diffstat (limited to 'tools/msbuild/install.bat')
-rw-r--r--tools/msbuild/install.bat34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/msbuild/install.bat b/tools/msbuild/install.bat
new file mode 100644
index 0000000000..db11c86353
--- /dev/null
+++ b/tools/msbuild/install.bat
@@ -0,0 +1,34 @@
+@echo off
+
+echo Installing MSVC integration...
+
+REM Change to the directory of this batch file.
+cd /d %~dp0
+
+REM Search for the MSBuild toolsets directory.
+SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"
+IF EXIST %D% GOTO FOUND_MSBUILD
+SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"
+IF EXIST %D% GOTO FOUND_MSBUILD
+
+echo Failed to find MSBuild toolsets directory.
+goto FAILED
+
+:FOUND_MSBUILD
+IF NOT EXIST %D%\llvm mkdir %D%\llvm
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+
+copy Microsoft.Cpp.Win32.llvm.props %D%\llvm
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy Microsoft.Cpp.Win32.llvm.targets %D%\llvm
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+
+echo Done!
+goto END
+
+:FAILED
+echo MSVC integration install failed.
+pause
+goto END
+
+:END