mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
2add682270
This is a new modernized VS integration installer. It adds a Visual Studio .sln file which, when built, outputs a VSIX that can be used to install ourselves as a "real" Visual Studio Extension. We can even upload this extension to the visual studio marketplace. This fixes a longstanding problem where we didn't support installing into VS 2017 and higher. In addition to supporting VS 2017, due to the way this is written we now longer need to do anything special to support future versions of VS as well. Everything should "just work". This also fixes several bugs with our old integration, such as MSBuild triggering full rebuilds when /Zi was used. Finally, we add a new UI page called "LLVM" which becomes visible when the LLVM toolchain is selected. For now this only contains one option which is the path to clang-cl.exe, but in the future we can add more things here. Differential Revision: https://reviews.llvm.org/D42762 llvm-svn: 337572
58 lines
2.0 KiB
Batchfile
58 lines
2.0 KiB
Batchfile
@echo off
|
|
|
|
echo Installing MSVC integration...
|
|
set SUCCESS=0
|
|
|
|
REM In general this script should not be used except for development and testing
|
|
REM purposes. The proper way to install is via the VSIX, and the proper way to
|
|
REM uninstall is through the Visual Studio extension manager.
|
|
|
|
REM Change to the directory of this batch file.
|
|
cd /d %~dp0
|
|
|
|
REM Older versions of VS would look for these files in the Program Files\MSBuild directory
|
|
REM but with VS2017 it seems to look for these directly in the Visual Studio instance.
|
|
REM This means we'll need to do a little extra work to properly detect all the various
|
|
REM instances, but in reality we can probably sidestep all of this by just wrapping this
|
|
REM in a vsix and calling it a day, as that should handle everything for us.
|
|
SET VCTargets=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets
|
|
|
|
ECHO Installing Common Files
|
|
copy LLVM.Cpp.Common.props "%VCTargets%"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
copy LLVM.Cpp.Common.targets "%VCTargets%"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
|
|
ECHO Installing x64 Platform Toolset
|
|
SET PlatformToolsets=%VCTargets%\Platforms\x64\PlatformToolsets
|
|
IF NOT EXIST "%PlatformToolsets%\llvm" mkdir "%PlatformToolsets%\llvm"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
copy PlatformX64\Toolset.props "%PlatformToolsets%\llvm"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
copy PlatformX64\Toolset.targets "%PlatformToolsets%\llvm"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
|
|
ECHO Installing Win32 Platform Toolset
|
|
SET PlatformToolsets=%VCTargets%\Platforms\Win32\PlatformToolsets
|
|
IF NOT EXIST "%PlatformToolsets%\llvm" mkdir "%PlatformToolsets%\llvm"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
copy PlatformX86\Toolset.props "%PlatformToolsets%\llvm"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
copy PlatformX86\Toolset.targets "%PlatformToolsets%\llvm"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
|
|
ECHO Installing C++ Settings UI
|
|
copy llvm-general.xml "%VCTargets%\1033"
|
|
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
|
|
|
|
:DONE
|
|
echo Done!
|
|
goto END
|
|
|
|
:FAILED
|
|
echo MSVC integration install failed.
|
|
pause
|
|
goto END
|
|
|
|
:END
|