From a38df4a26875473dfdd0cb923ed28eba8d086cfe Mon Sep 17 00:00:00 2001 From: amaitland Date: Mon, 5 Feb 2018 17:23:34 +1000 Subject: [PATCH] Default builds to using VS2015 Builds are now done using VS2015 which will require VC++ 2015 (or VC++ 2017 as they are compatible) Remove VS2013 target from build.ps1 --- CefSharp.BrowserSubprocess.Core/Resource.rc | 8 +-- CefSharp.BrowserSubprocess/app.manifest | 2 +- CefSharp.Core/Resource.rc | 8 +-- CefSharp.OffScreen.Example/app.manifest | 2 +- CefSharp.WinForms.Example/app.manifest | 2 +- CefSharp.Wpf.Example/app.manifest | 2 +- CefSharp.props | 2 +- CefSharp/Properties/AssemblyInfo.cs | 4 +- appveyor.yml | 5 +- build.ps1 | 65 +++++++++++++++------ 10 files changed, 64 insertions(+), 36 deletions(-) diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index cd1e8c11b0..a84eadd7ba 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 63.0.0 - PRODUCTVERSION 63.0.0 + FILEVERSION 64.0.0 + PRODUCTVERSION 64.0.0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -16,10 +16,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" - VALUE "FileVersion", "63.0.0" + VALUE "FileVersion", "64.0.0" VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "63.0.0" + VALUE "ProductVersion", "64.0.0" END END BLOCK "VarFileInfo" diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index d25727e753..286d6e6ec4 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core/Resource.rc b/CefSharp.Core/Resource.rc index e246620d28..984350af00 100644 --- a/CefSharp.Core/Resource.rc +++ b/CefSharp.Core/Resource.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 63.0.0 - PRODUCTVERSION 63.0.0 + FILEVERSION 64.0.0 + PRODUCTVERSION 64.0.0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -16,10 +16,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.Core" - VALUE "FileVersion", "63.0.0" + VALUE "FileVersion", "64.0.0" VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "63.0.0" + VALUE "ProductVersion", "64.0.0" END END BLOCK "VarFileInfo" diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index b6d8f491d0..55fe5cd8d4 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index 74ce9179ed..cbb321a28a 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index a59652e1ab..c76cf6c890 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.props b/CefSharp.props index 56dde1e376..64a66844c6 100644 --- a/CefSharp.props +++ b/CefSharp.props @@ -4,7 +4,7 @@ 2013 2015 - 2015 + 2017 v120 v140 diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index 56426b27c1..2c5f2edc9d 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -34,8 +34,8 @@ public static class AssemblyInfo public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "63.0.0"; - public const string AssemblyFileVersion = "63.0.0.0"; + public const string AssemblyVersion = "64.0.0"; + public const string AssemblyFileVersion = "64.0.0.0"; public const string AssemblyCopyright = "Copyright © 2010-2017 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey; diff --git a/appveyor.yml b/appveyor.yml index 4ad6c94ce7..8d3ce60116 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,6 @@ -environment: - VisualStudioVersion: 12.0 +image: Visual Studio 2015 -version: 63.0.0-CI{build} +version: 64.0.0-CI{build} clone_depth: 10 diff --git a/build.ps1 b/build.ps1 index 4bf3d11ca8..72db6b39a2 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,11 +1,11 @@ param( - [ValidateSet("vs2013", "vs2015", "nupkg-only", "gitlink")] + [ValidateSet("vs2015", "vs2017", "nupkg-only", "gitlink")] [Parameter(Position = 0)] - [string] $Target = "vs2013", + [string] $Target = "vs2015", [Parameter(Position = 1)] - [string] $Version = "63.0.0", + [string] $Version = "64.0.0", [Parameter(Position = 2)] - [string] $AssemblyVersion = "63.0.0" + [string] $AssemblyVersion = "64.0.0" ) $WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition @@ -108,7 +108,7 @@ function TernaryReturn function Msvs { param( - [ValidateSet('v120', 'v140')] + [ValidateSet('v140', 'v141')] [Parameter(Position = 0, ValueFromPipeline = $true)] [string] $Toolchain, @@ -127,18 +127,47 @@ function Msvs $VXXCommonTools = $null switch -Exact ($Toolchain) { - 'v120' { - $MSBuildExe = join-path -path (Get-ItemProperty "HKLM:\software\Microsoft\MSBuild\ToolsVersions\12.0").MSBuildToolsPath -childpath "msbuild.exe" - $MSBuildExe = $MSBuildExe -replace "Framework64", "Framework" - $VisualStudioVersion = '12.0' - $VXXCommonTools = Join-Path $env:VS120COMNTOOLS '..\..\vc' - } 'v140' { $MSBuildExe = join-path -path (Get-ItemProperty "HKLM:\software\Microsoft\MSBuild\ToolsVersions\14.0").MSBuildToolsPath -childpath "msbuild.exe" $MSBuildExe = $MSBuildExe -replace "Framework64", "Framework" $VisualStudioVersion = '14.0' $VXXCommonTools = Join-Path $env:VS140COMNTOOLS '..\..\vc' } + 'v141' { + $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 + if(-not (Test-Path $vswherePath)) + { + Write-Diagnostic "Downloading VSWhere as no install found at $vswherePath" + + # Check if we already have a local copy and download if required + $vswherePath = Join-Path $WorkingDir \vswhere.exe + + # TODO: Check hash and download if hash differs + if(-not (Test-Path $vswherePath)) + { + $client = New-Object System.Net.WebClient; + $client.DownloadFile('https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe', $vswherePath); + } + } + + Write-Diagnostic "VSWhere path $vswherePath" + + $VS2017InstallPath = & $vswherePath -version 15 -property installationPath + + Write-Diagnostic "VS2017InstallPath: $VS2017InstallPath" + + if(-not (Test-Path $VS2017InstallPath)) + { + Die "Visual Studio 2017 was not found" + } + + $MSBuildExe = "msbuild.exe" + $VisualStudioVersion = '15.0' + $VXXCommonTools = Join-Path $VS2017InstallPath VC\Auxiliary\Build + } } if ($VXXCommonTools -eq $null -or (-not (Test-Path($VXXCommonTools)))) { @@ -202,17 +231,17 @@ function Msvs function VSX { param( - [ValidateSet('v120', 'v140')] + [ValidateSet('v140', 'v141')] [Parameter(Position = 0, ValueFromPipeline = $true)] [string] $Toolchain ) - if($Toolchain -eq 'v120' -and $env:VS120COMNTOOLS -eq $null) { + if($Toolchain -eq 'v140' -and $env:VS140COMNTOOLS -eq $null) { Warn "Toolchain $Toolchain is not installed on your development machine, skipping build." Return } - if($Toolchain -eq 'v140' -and $env:VS140COMNTOOLS -eq $null) { + if($Toolchain -eq 'v141' -and $env:VS141COMNTOOLS -eq $null) { Warn "Toolchain $Toolchain is not installed on your development machine, skipping build." Return } @@ -367,15 +396,15 @@ switch -Exact ($Target) { UpdateSymbolsWithGitLink } - "vs2013" + "vs2015" { - VSX v120 + VSX v140 UpdateSymbolsWithGitLink Nupkg } - "vs2015" + "vs2017" { - VSX v140 + VSX v141 UpdateSymbolsWithGitLink Nupkg }