Skip to content

Commit

Permalink
VS2017 build support (using the VS2015 tooling) (cefsharp#2179)
Browse files Browse the repository at this point in the history
* initial vs2017 build support

* update nuget retrieval url

apparently http://nuget.org/nuget.exe is version 2.8, which is fairly
old

* enable child process debugging
  • Loading branch information
japj authored and perlun committed Nov 29, 2017
1 parent 6b9f911 commit 049181b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
11 changes: 3 additions & 8 deletions CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -110,14 +110,9 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\CefSharp.props" />
<PropertyGroup>
<PostBuildEvent>if $(PlatformName) == x86 (
"$(DevEnvDir)..\..\VC\bin\editbin" /largeaddressaware /TSAWARE "$(TargetPath)"
call "$(DevEnvDir)..\Tools\vsvars32.bat"
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else (
"$(DevEnvDir)..\..\VC\bin\amd64\editbin" /TSAWARE "$(TargetPath)"
)</PostBuildEvent>
<PostBuildEvent>$(CefSharpBrowserSubprocessPostBuildEvent)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
28 changes: 27 additions & 1 deletion CefSharp.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<VisualStudioProductVersion>2013</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='14.0'">2015</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='15.0'">2015</VisualStudioProductVersion>

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

<CefSharpBrowserSubprocessPostBuildEvent>
<![CDATA[
if $(PlatformName) == x86 (
"$(DevEnvDir)..\..\VC\bin\editbin" /largeaddressaware /TSAWARE "$(TargetPath)"
call "$(DevEnvDir)..\Tools\vsvars32.bat"
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else (
"$(DevEnvDir)..\..\VC\bin\amd64\editbin" /TSAWARE "$(TargetPath)"
)
]]></CefSharpBrowserSubprocessPostBuildEvent>

<CefSharpBrowserSubprocessPostBuildEvent Condition="'$(VisualStudioVersion)'=='15.0'">
<![CDATA[
if $(PlatformName) == x86 (
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"
editbin /largeaddressaware /TSAWARE "$(TargetPath)"
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else (
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"
editbin /TSAWARE "$(TargetPath)"
)
]]>
</CefSharpBrowserSubprocessPostBuildEvent>
</PropertyGroup>

</Project>
4 changes: 4 additions & 0 deletions CefSharp3.ChildProcessDbgSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<ChildProcessDebuggingSettings IsEnabled="true" xmlns="http://schemas.microsoft.com/vstudio/ChildProcessDebuggingSettings/2014">
<DefaultRule EngineFilter="[inherit]" />
</ChildProcessDebuggingSettings>
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ function DownloadNuget()
if(-not (Test-Path $nuget))
{
$client = New-Object System.Net.WebClient;
$client.DownloadFile('http://nuget.org/nuget.exe', $nuget);
$client.DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', $nuget);
}
}

Expand Down

0 comments on commit 049181b

Please sign in to comment.