Skip to content

Commit 8f81835

Browse files
Add chromiumembeddedframework.redist.win-x86/chromiumembeddedframework.redist.win-x64 packages (#83)
* Experimental - New runtimes\native nuget packages * Initial chromiumembeddedframework.redist.win.nuspec * Makes it clearer it's the chromium embedded framework, also makes it easier to distinguish between old and new when working on the code * Add minClientVersion 4.0.0, used by vs2017 (#84) * Nupkg - Include ContentFiles for swiftshader and locales - Upgrade nuget.exe to version 5.4 (was previously 2.8) - Add new logo (converted existing gif to png), the logo is now included in the package - Rename props files as they didn't match the new naming convention - Add contentFiles metadata element - Copy swiftshader/locales into the runtimes\win-x64\native folder so they're relative to libcef.dll NOTE: Only minimal testing so far, loaded into a .Net Core 3 MinimalExample solution, files are copied as expected. The swiftshader and locales folders aren't in the runtimeconfig.json TODO: - Try installing both x86 and x64 into same project. - Test with just having a .Net 4.8 PackageReference project References: https://docs.microsoft.com/en-us/nuget/reference/nuspec#specifying-files-to-include-in-the-package https://devblogs.microsoft.com/nuget/nuget-contentfiles-demystified/ https://stackoverflow.com/questions/56844233/additional-probing-paths-for-net-core-3-migration * cef.redist.win-x64/x86.props - Add props for swiftshader and locales Swiftshader and locales are in the contentFiles folder so we need to include individual props (They could technically be compiled into a single prop, have separate for now) Co-authored-by: Matthias Hoste <[email protected]>
1 parent 915ceca commit 8f81835

File tree

5 files changed

+84
-2
lines changed

5 files changed

+84
-2
lines changed

NuGet/cef128x128.png

12.1 KB
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<!--
4+
Using wildcard matching as per https://stackoverflow.com/a/17252671
5+
-->
6+
<ItemGroup>
7+
<CefRedist64 Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\**\*.*" />
8+
<CefRedistLocales64 Include="$(MSBuildThisFileDirectory)..\contentFiles\any\any\runtimes\win-x64\native\locales\*.*" />
9+
<CefRedistSwiftShader64 Include="$(MSBuildThisFileDirectory)..\contentFiles\any\any\runtimes\win-x64\native\swiftshader\*.*" />
10+
</ItemGroup>
11+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<!--
4+
Using wildcard matching as per https://stackoverflow.com/a/17252671
5+
-->
6+
<ItemGroup>
7+
<CefRedist32 Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\**\*.*" />
8+
<CefRedistLocales32 Include="$(MSBuildThisFileDirectory)..\contentFiles\any\any\runtimes\win-x86\native\locales\*.*" />
9+
<CefRedistSwiftShader32 Include="$(MSBuildThisFileDirectory)..\contentFiles\any\any\runtimes\win-x86\native\swiftshader\*.*" />
10+
</ItemGroup>
11+
</Project>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata minClientVersion="4.0.0">
4+
<id>chromiumembeddedframework.redist.win-$Platform$</id>
5+
<version>$version$</version>
6+
<authors>The Chromium Embedded Framework Authors</authors>
7+
<owners>The CefSharp Authors</owners>
8+
<projectUrl>https://github.com/cefsharp/cef-binary</projectUrl>
9+
<icon>images\cef128x128.png</icon>
10+
<license type="file">LICENSE.txt</license>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<!--
13+
TODO: Add repository link for CEF release branch and commit
14+
https://docs.microsoft.com/en-us/nuget/reference/nuspec#repository
15+
-->
16+
<!--
17+
<repository type="git" url="https://bitbucket.org/chromiumembedded/cef.git" branch="3945" commit="7ec49fabd56beae20e6b4c825c085231140c3b36" />
18+
-->
19+
<description>Chromium Embedded Framework (CEF) Release Distribution
20+
NOTE: This package is maintained on behalf of the CEF authors by the CefSharp project at http://github.com/cefsharp/cef-binary</description>
21+
<tags>chrome chromium native embedded browser CEF nativepackage</tags>
22+
<copyright>Copyright © 2008-2020</copyright>
23+
<contentFiles>
24+
<!--
25+
Architecture-specific files folder hierarchy lost (native subfolders)
26+
https://github.com/NuGet/Home/issues/7698#issuecomment-455368655
27+
We have to copy swiftshader and locales via contentFiles
28+
-->
29+
<files include="any\any\runtimes\**" buildAction="Content" copyToOutput="true" />
30+
</contentFiles>
31+
</metadata>
32+
<files>
33+
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.dll" target="runtimes\win-$Platform$\native" />
34+
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.bin" target="runtimes\win-$Platform$\native\" />
35+
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\*.pak" target="runtimes\win-$Platform$\native\"/>
36+
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\*.dat" target="runtimes\win-$Platform$\native\"/>
37+
<file src="..\cef_binary_3.y.z_$CPlatform$\Readme.txt" target="\"/>
38+
39+
<!--
40+
PackageReference projects only support ContentFiles while packages.config only support content
41+
So we have to copy the files twice (thankfully zip will negate any size concerns for the nupkg, extra space on disk though)
42+
https://docs.microsoft.com/en-us/nuget/reference/nuspec#including-content-files
43+
-->
44+
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\swiftshader\*.dll" target="contentFiles\any\any\runtimes\win-x64\native\swiftshader" />
45+
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\locales\*.pak" target="contentFiles\any\any\runtimes\win-x64\native\locales"/>
46+
47+
<!-- Commented out for now, will need testing, focus on PackageReference format -->
48+
<!-- <file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\swiftshader\*.dll" target="content\swiftshader" /> -->
49+
<!-- <file src="..\cef_binary_3.y.z_$CPlatform$\Resources\locales\*.pak" target="content\locales"/> -->
50+
51+
<file src="chromiumembeddedframework.redist.win-$Platform$.props" target="build\" />
52+
53+
<file src="..\LICENSE.txt" target="" />
54+
<file src="cef128x128.png" target="images\" />
55+
</files>
56+
</package>

build.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ param(
1414
[string] $CefBinaryDir = "../cefsource/chromium/src/cef/binary_distrib/",
1515

1616
[Parameter(Position = 3)]
17-
$CefVersion = "77.1.11+g1687a63+chromium-77.0.3865.90",
17+
$CefVersion = "79.1.10+g7ec49fa+chromium-79.0.3945.117",
1818

1919
[ValidateSet("tar.bz2","zip","7z")]
2020
[Parameter(Position = 4)]
@@ -498,9 +498,11 @@ try
498498

499499
# Build 32bit packages
500500
. $Nuget pack nuget\cef.redist.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Release;Platform=x86;CPlatform=windows32;' -OutputDirectory nuget
501+
. $Nuget pack nuget\chromiumembeddedframework.redist.win.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Release;Platform=x86;CPlatform=windows32;' -OutputDirectory nuget
501502

502503
# Build 64bit packages
503504
. $Nuget pack nuget\cef.redist.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Release;Platform=x64;CPlatform=windows64;' -OutputDirectory nuget
505+
. $Nuget pack nuget\chromiumembeddedframework.redist.win.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Release;Platform=x64;CPlatform=windows64;' -OutputDirectory nuget
504506

505507
# Build sdk
506508
$Filename = Resolve-Path ".\nuget\cef.sdk.props"
@@ -513,6 +515,8 @@ try
513515
{
514516
appveyor PushArtifact "nuget\cef.redist.x86.$CefPackageVersion.nupkg"
515517
appveyor PushArtifact "nuget\cef.redist.x64.$CefPackageVersion.nupkg"
518+
appveyor PushArtifact "nuget\chromiumembeddedframework.redist.win-x86.$CefPackageVersion.nupkg"
519+
appveyor PushArtifact "nuget\chromiumembeddedframework.redist.win-x64.$CefPackageVersion.nupkg"
516520
appveyor PushArtifact "nuget\cef.sdk.$CefPackageVersion.nupkg"
517521
}
518522
}
@@ -529,7 +533,7 @@ try
529533
}
530534

531535
$Client = New-Object System.Net.WebClient;
532-
$Client.DownloadFile('http://nuget.org/nuget.exe', $Nuget);
536+
$Client.DownloadFile('https://dist.nuget.org/win-x86-commandline/v5.4.0/nuget.exe', $Nuget);
533537
}
534538
}
535539

0 commit comments

Comments
 (0)