Skip to content

Commit

Permalink
Visual studio 2019 support (does not do by default) also bumped SDK t…
Browse files Browse the repository at this point in the history
…o 18362 as CEF 77>= require it

Closes #2628
  • Loading branch information
mitchcapper committed Oct 6, 2019
1 parent 4d4ea7f commit f83a375
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .vsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.VC.CLI.Support",
"Microsoft.VisualStudio.Component.Windows10SDK.17763",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Workload.NativeDesktop"
]
}
4 changes: 2 additions & 2 deletions CefSharp.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<VisualStudioProductVersion>2013</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='14.0'">2015</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='15.0'">2017</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='16.0'">2017</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='16.0'">2019</VisualStudioProductVersion>

<PlatformToolset>v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>

<WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='16.0'">10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='16.0'">10.0.18362.0</WindowsTargetPlatformVersion>

<CefSharpBrowserSubprocessPostBuildEvent>
<![CDATA[
Expand Down
28 changes: 19 additions & 9 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
param(
[ValidateSet("vs2015", "vs2017", "nupkg-only", "gitlink")]
[ValidateSet("vs2015", "vs2017", "vs2019", "nupkg-only", "gitlink")]
[Parameter(Position = 0)]
[string] $Target = "vs2015",
[Parameter(Position = 1)]
Expand Down Expand Up @@ -115,7 +115,7 @@ function TernaryReturn
function Msvs
{
param(
[ValidateSet('v140', 'v141')]
[ValidateSet('v140', 'v141', 'v142')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain,

Expand Down Expand Up @@ -144,11 +144,14 @@ function Msvs
$VisualStudioVersion = '14.0'
$VXXCommonTools = Join-Path $env:VS140COMNTOOLS '..\..\vc'
}
'v141' {
{($_ -eq 'v141') -or ($_ -eq 'v142')} {
$VS_VER = 15;
$VS_OFFICIAL_VER = 2017;
if ($_ -eq 'v142'){$VS_VER=16;$VS_OFFICIAL_VER=2019;}
$programFilesDir = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0]

$vswherePath = Join-Path $programFilesDir 'Microsoft Visual Studio\Installer\vswhere.exe'
#Check if we already have vswhere which is included in newer versions of VS2017
#Check if we already have vswhere which is included in newer versions of VS2017/VS2019
if(-not (Test-Path $vswherePath))
{
Write-Diagnostic "Downloading VSWhere as no install found at $vswherePath"
Expand All @@ -166,17 +169,18 @@ function Msvs

Write-Diagnostic "VSWhere path $vswherePath"

$VS2017InstallPath = & $vswherePath -version 15 -property installationPath
$versionSearchStr = "[$VS_VER.0," + ($VS_VER+1) + ".0)"
$VS2017InstallPath = & $vswherePath -version $versionSearchStr -property installationPath

Write-Diagnostic "VS2017InstallPath: $VS2017InstallPath"
Write-Diagnostic "$($VS_OFFICIAL_VER)InstallPath: $VS2017InstallPath"

if(-not (Test-Path $VS2017InstallPath))
{
Die "Visual Studio 2017 is not installed on your development machine, unable to continue."
Die "Visual Studio $VS_OFFICIAL_VER is not installed on your development machine, unable to continue."
}

$MSBuildExe = "msbuild.exe"
$VisualStudioVersion = '15.0'
$VisualStudioVersion = "$VS_VER.0"
$VXXCommonTools = Join-Path $VS2017InstallPath VC\Auxiliary\Build
}
}
Expand Down Expand Up @@ -242,7 +246,7 @@ function Msvs
function VSX
{
param(
[ValidateSet('v140', 'v141')]
[ValidateSet('v140', 'v141', 'v142')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain
)
Expand Down Expand Up @@ -451,4 +455,10 @@ switch -Exact ($Target)
UpdateSymbolsWithGitLink
Nupkg
}
"vs2019"
{
VSX v142
UpdateSymbolsWithGitLink
Nupkg
}
}

0 comments on commit f83a375

Please sign in to comment.