From bd9e568305e5994fc783cb5b5c579afd050b159d Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 14 Jan 2020 12:05:42 +1000 Subject: [PATCH] Nuget - Additional PackageReference set of nupkg files **WORK IN PROGRESS** Unfortunately the new chromiumembeddedframework.redist.win-x86/chromiumembeddedframework.redist.win-x64 packages aren't usable yet, the files are copied to the relevant natives folder .net core just doesn't load the dlls. I suspect if we were to p/invoke the dll then it would be loaded correctly, might need to raise this with .Net Core team. So for now just using the older cef.redist packages, which expose props that can be used in any other package. the new CefSharp.Common.win packages will copy the files using the .targets file as before, difference being PlatformTarget is used instead of Platform so we can detect the actual platform of the project not the solution. AnyCPU is not currently supported, x86/x64 only, Win32 might work, not tested though. Not clear that AnyCpu will be possible, more digging to do on that front. Issue #2795 --- .../CefSharp.Common.win-x64.targets | 35 ++++++++++ .../CefSharp.Common.win-x86.targets | 34 ++++++++++ .../CefSharp.Common.win.nuspec | 64 +++++++++++++++++++ .../CefSharp.OffScreen.win.nuspec | 40 ++++++++++++ .../CefSharp.WinForms.win.nuspec | 40 ++++++++++++ .../PackageReference/CefSharp.Wpf.win.nuspec | 40 ++++++++++++ build.ps1 | 12 +++- 7 files changed, 264 insertions(+), 1 deletion(-) create mode 100644 NuGet/PackageReference/CefSharp.Common.win-x64.targets create mode 100644 NuGet/PackageReference/CefSharp.Common.win-x86.targets create mode 100644 NuGet/PackageReference/CefSharp.Common.win.nuspec create mode 100644 NuGet/PackageReference/CefSharp.OffScreen.win.nuspec create mode 100644 NuGet/PackageReference/CefSharp.WinForms.win.nuspec create mode 100644 NuGet/PackageReference/CefSharp.Wpf.win.nuspec diff --git a/NuGet/PackageReference/CefSharp.Common.win-x64.targets b/NuGet/PackageReference/CefSharp.Common.win-x64.targets new file mode 100644 index 000000000..ce6220762 --- /dev/null +++ b/NuGet/PackageReference/CefSharp.Common.win-x64.targets @@ -0,0 +1,35 @@ + + + + + + + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + Included + + + + + + + + + + + $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + Included + + + + + + + + + diff --git a/NuGet/PackageReference/CefSharp.Common.win-x86.targets b/NuGet/PackageReference/CefSharp.Common.win-x86.targets new file mode 100644 index 000000000..0a53cd70b --- /dev/null +++ b/NuGet/PackageReference/CefSharp.Common.win-x86.targets @@ -0,0 +1,34 @@ + + + + + + + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + Included + + + + + + + + + + + $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + Included + + + + + + + + diff --git a/NuGet/PackageReference/CefSharp.Common.win.nuspec b/NuGet/PackageReference/CefSharp.Common.win.nuspec new file mode 100644 index 000000000..baea15299 --- /dev/null +++ b/NuGet/PackageReference/CefSharp.Common.win.nuspec @@ -0,0 +1,64 @@ + + + + CefSharp.Common.win-$Platform$ + $version$ + The CefSharp Authors + The CefSharp Authors + https://github.com/cefsharp/CefSharp + https://raw.github.com/cefsharp/CefSharp/master/LICENSE + false + The CefSharp Chromium-based browser component ('Core' and common 'Element' components, needed by both WPF, WinForms and OffScreen implementations). + chrome browser chromium-embedded + Copyright © The CefSharp Authors + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/PackageReference/CefSharp.OffScreen.win.nuspec b/NuGet/PackageReference/CefSharp.OffScreen.win.nuspec new file mode 100644 index 000000000..c0812f032 --- /dev/null +++ b/NuGet/PackageReference/CefSharp.OffScreen.win.nuspec @@ -0,0 +1,40 @@ + + + + CefSharp.OffScreen.win-$Platform$ + $version$ + The CefSharp Authors + The CefSharp Authors + https://github.com/cefsharp/cefsharp + https://raw.github.com/cefsharp/CefSharp/master/LICENSE + false + The CefSharp Chromium-based browser component (OffScreen control). + osr chrome browser chromium-embedded cefsharp + Copyright © The CefSharp Authors + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/PackageReference/CefSharp.WinForms.win.nuspec b/NuGet/PackageReference/CefSharp.WinForms.win.nuspec new file mode 100644 index 000000000..87836a3bf --- /dev/null +++ b/NuGet/PackageReference/CefSharp.WinForms.win.nuspec @@ -0,0 +1,40 @@ + + + + CefSharp.WinForms.win-$Platform$ + $version$ + The CefSharp Authors + The CefSharp Authors + https://github.com/cefsharp/cefsharp + https://raw.github.com/cefsharp/CefSharp/master/LICENSE + false + The CefSharp Chromium-based browser component (WinForms control). + winforms chrome browser chromium-embedded cefsharp + Copyright © The CefSharp Authors + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/PackageReference/CefSharp.Wpf.win.nuspec b/NuGet/PackageReference/CefSharp.Wpf.win.nuspec new file mode 100644 index 000000000..911f2ed9d --- /dev/null +++ b/NuGet/PackageReference/CefSharp.Wpf.win.nuspec @@ -0,0 +1,40 @@ + + + + CefSharp.Wpf.win-$Platform$ + $version$ + The CefSharp Authors + The CefSharp Authors + https://github.com/cefsharp/cefsharp + https://raw.github.com/cefsharp/CefSharp/master/LICENSE + false + The CefSharp Chromium-based browser component (WPF control). + wpf chrome browser cefsharp + Copyright © The CefSharp Authors + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.ps1 b/build.ps1 index 05f8640be..3917d2e96 100644 --- a/build.ps1 +++ b/build.ps1 @@ -288,11 +288,21 @@ function Nupkg Write-Diagnostic "Building nuget package" - # Build packages + # Build old packages . $nuget pack nuget\CefSharp.Common.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget -Properties "RedistVersion=$RedistVersion" . $nuget pack nuget\CefSharp.Wpf.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget . $nuget pack nuget\CefSharp.OffScreen.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget . $nuget pack nuget\CefSharp.WinForms.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget + + # Build newer style packages + . $nuget pack nuget\PackageReference\CefSharp.Common.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "RedistVersion=$RedistVersion;Platform=x86;PlatformNative=Win32" + . $nuget pack nuget\PackageReference\CefSharp.Common.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "RedistVersion=$RedistVersion;Platform=x64;PlatformNative=x64" + . $nuget pack nuget\PackageReference\CefSharp.OffScreen.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "Platform=x86" + . $nuget pack nuget\PackageReference\CefSharp.OffScreen.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "Platform=x64" + . $nuget pack nuget\PackageReference\CefSharp.Wpf.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "Platform=x86" + . $nuget pack nuget\PackageReference\CefSharp.Wpf.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "Platform=x64" + . $nuget pack nuget\PackageReference\CefSharp.WinForms.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "Platform=x86" + . $nuget pack nuget\PackageReference\CefSharp.WinForms.win.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget\PackageReference -Properties "Platform=x64" # Invoke `AfterBuild` script if available (ie. upload packages to myget) if(-not (Test-Path $WorkingDir\AfterBuild.ps1)) {