Skip to content

Conversation

@amaitland
Copy link
Member

@amaitland amaitland commented Nov 2, 2019

New set of modern Nuget packages, see cefsharp/CefSharp#2795 for more details.

Not ready for merge yet.

  • Set minClientVersion to ensure can only be used in VS2017/2019
  • Copy swiftshader and locales folders using contentFiles
  • Create props entries so at a later date we can support AnyCPU
  • [ ] Support Win32 target used by VC++ projects (x86 might may automatically, haven't checked, testing required). (No Win32 entry in the Rid Catalog)

@amaitland
Copy link
Member Author

amaitland commented Nov 3, 2019

@amaitland
Copy link
Member Author

swiftshader and locales folders need to be moved to contentFiles as the native folder structure gets flattened (NuGet/Home#7698 (comment))

- 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
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)
Makes it clearer it's the chromium embedded framework, also makes it easier to distinguish between old and new when working on the code
@amaitland amaitland changed the title Add cef.redist.win-x86/cef.redist.win-x64 packages Add chromiumembeddedframework.redist.win-x86/chromiumembeddedframework.redist.win-x64 packages Jan 14, 2020
@amaitland
Copy link
Member Author

NuGet package - Selenium WebDriver ChromeDriver takes a old school approach, using a complex targets file to copy files, we might need something like this for AnyCPU.

@amaitland
Copy link
Member Author

  • Support Win32 target used by VC++ projects (x86 might may automatically, haven't checked, testing required).

There is no Win32 entry in the Rid Catalog, so we'll just have to hope that msbuild maps that to x86

@amaitland
Copy link
Member Author

First draft is hopefully complete, will merge this now so the next set of packages include the two new .nupkg files. They'll only be uploaded to the MyGet feed at this stage for dev/testing purposes.

Further changes will likely be required. Looking at the documentation this is likely the easy part, the managed packages will be much more complex.

It's still yet to be seen if swiftshader and locales folders will work correctly, they're copied to the runtimes\win-{x64|x86}\native folder so they're relative to libcef.dll (which is the expected chromium default. Obviously we can change the locales path and update CefSettings.LocalesDirPath to make that work if required. Chromium decides when it switches to the swiftshader implementation, so there's no easy option there.

@amaitland amaitland merged commit 8f81835 into master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants