Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Add .vsconfig and script (#7716)
Browse files Browse the repository at this point in the history
Added a .vsconfig file with dependencies for Visual Studio 2019 Preview (Windows 10 SDK, MSBuild with its dependencies, and MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.22) aka Microsoft.VisualStudio.Component.VC.Tools.x86.x64), minimum requirement for building with buildscripts/build.cmd.
Added a script at buildscripts/install-reqs-vs2019preview.cmd that depends on Visual Studio 2019 Preview and vs_installer.exe being installed at %ProgramFiles(x86)%\Microsoft Visual Studio.
Closes #7417
  • Loading branch information
Lucina authored and MichalStrehovsky committed Sep 14, 2019
1 parent 24874c0 commit c290c01
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
12 changes: 12 additions & 0 deletions .vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.17763",
"Microsoft.Net.Component.4.6.TargetingPack"
]
}
1 change: 1 addition & 0 deletions Documentation/prerequisites-for-building.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ The following pre-requisites need to be installed for building the repo:
# Windows (Windows 7+)

1. Install [Visual Studio 2017](https://visualstudio.microsoft.com/vs/community/) or [Visual Studio 2019 Preview](https://visualstudio.microsoft.com/vs/preview/), including Visual C++ support.
- For an existing Visual Studio 2019 installation, `buildscripts/install-reqs-vs2019.cmd` is provided.
2. Install [CMake](http://www.cmake.org/download/) 3.8.0 or later (3.14.0-rc1 or later is required for VS2019). Make sure you add it to the PATH in the setup wizard.
3. (Windows 7 only) Install PowerShell 3.0. It's part of [Windows Management Framework 3.0](http://go.microsoft.com/fwlink/?LinkID=240290). Windows 8 or later comes with the right version inbox.

Expand Down
16 changes: 16 additions & 0 deletions buildscripts/install-reqs-vs2019.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@if not defined _echo @echo off
setlocal

set _VSINSTALLER="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe"
if not exist %_VSINSTALLER% (
echo Visual Studio installer not found. && echo Expected at %_VSINSTALLER% && exit /b 1
)
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath -products *`) do set _VSPATH="%%i"
)
if not exist %_VSPATH% (
echo Visual Studio installation not found. && exit /b 2
)

%_VSINSTALLER% modify %* --installPath %_VSPATH% --config "%~dp0..\.vsconfig"
6 changes: 3 additions & 3 deletions src/ILCompiler/reproNative/reproNative.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
<ProjectGuid>{ECB5D162-A31B-45FF-87C7-2E92BD445F5A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>reproNative</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/ILCompiler/reproNative/reproNativeCpp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
<ProjectGuid>{ECB5D162-A31B-45FF-87C7-2E92BD445F5A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>reproNative</RootNamespace>
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -103,4 +103,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

0 comments on commit c290c01

Please sign in to comment.