Commit Graph

247 Commits

Author SHA1 Message Date
Alex Maitland 0d5e830c27 Upgrade to CEF CEF 99.2.3+g962d9c9+chromium-99.0.4844.27 / Chromium 99.0.4844.27 2022-02-22 10:41:32 +10:00
Alex Maitland ad41e1d6aa Nuget - Add CefSharpTransformXmlDllPathOverride
Allow for setting a custom location for CefSharpTransformXmlDllPath
2022-02-14 13:59:02 +10:00
Alex Maitland 21efaf3c46 Upgrade to CEF 98.1.12+gd87e3f4+chromium-98.0.4758.55 / Chromium 98.0.4758.55 2022-01-31 11:30:22 +10:00
Alex Maitland 82d7ae7ab2 Upgrade to CEF 97.1.1+g50067f2+chromium-97.0.4692.71 / Chromium 97.0.4692.71 2022-01-10 13:44:29 +10:00
Alex Maitland d45aaff7ca Upgrade to CEF 97.0.11+g695453b+chromium-97.0.4692.71 / Chromium 97.0.4692.71 2022-01-05 10:54:41 +10:00
Alex Maitland f07be8c5e5 build.ps1 - Add new update-build-version target
Updated Version/AssemblyVersion

Performs some unnecessary tasks, so could be improved
2021-12-16 13:02:24 +10:00
Alex Maitland 4d7c354f63 Update build number to 96.0.140 2021-11-25 11:01:57 +10:00
Alex Maitland 5447c8d904 Nuget - Set IncludeInVsix = true for <Content/> entries 2021-11-18 13:28:37 +10:00
Alex Maitland 4df57e32bb Net Core - Nuget CefSharpBuildAction default to NoAction for Library projects
This should cleanup Library projects bin folders and eliminate stray copies of project files
when a Library RuntimeIdentifier/PlatformTarget doesn't match the WinExe/Exe project

For plugins the files will be included when EnableDynamicLoading = true

Can be overridden be adding <CefSharpBuildAction>Default</CefSharpBuildAction> to your project file

https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support#plugin-with-library-dependencies
2021-10-22 10:37:20 +10:00
Alex Maitland c3f48fef3d Nuget - VS2022 remove extra CefSharp.Core.Runtime.dll copy from bin folder
VS2022 differs from previous versions in how the file paths appear to work. Use a filter to match based on filename + extension
rather than an exact file path match.

I've also updated the CefSharpAnyCPUExcludeCoreRuntimeBeforeGenerateApplicationManifest target to include a similar filter.
Leaving CefSharpExcludeCoreRuntimeBeforeGenerateApplicationManifest as is because it's only for VS2017

In VS2019:

C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.dll;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.pdb;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.xml

In VS2022:
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.dll;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.pdb;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.xml

Issue #3854
2021-10-22 10:04:46 +10:00
Alex Maitland f8b96ecf5d Nuget - Fix formatting 2021-10-22 09:42:11 +10:00
Alex Maitland aedd60e3ff Upgrade to 94.4.9+g09ee681+chromium-94.0.4606.71 / Chromium 94.0.4606.71 2021-10-16 13:40:20 +10:00
Alex Maitland 7c2226caff Nuget - Update dependency groups
Resolves nuget pack warning
2021-10-14 09:39:12 +10:00
Alex Maitland 8aa0ee5e9f build.ps1 - Cleanup
- Fail fast if nuget.exe not found
- Check for VSWhere at build start
  (should always be installed as it's included in VS2019 and above)
- Remove netcore31 from $Target valid set, we'll just rely on the
  $TargetFramework
- Push-Location to working directory for easier debugging
2021-10-14 09:39:12 +10:00
Alex Maitland 66bb6c0f68 Nuget - Remove netcoreapp3.0 hacks
For those unable to upgrade to .Net Core 3.1 then the old packages should still be usable by specifying AssetTargetFallback as detailed in https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#assettargetfallback

Resolves #3444
2021-10-13 11:50:00 +10:00
Alex Maitland 6953d82f25 Net Core - Nupkg Include xml files
Issue #3843
2021-10-11 10:27:49 +10:00
Alex Maitland 2e55f7d1aa Upgrade to CEF 94.4.2+g6a963ca+chromium-94.0.4606.61 / Chromium 94.0.4606.61 2021-09-29 09:49:40 +10:00
Alex Maitland 4cc758029b Nuget - Simplify CefSharpCopyFilesAfterNugetRestore targets
- Now there are just two targets that actually copy files as the AnyCPU was just a duplicate of
  the x86/x64 ones.
- Remove file exists checks and just rely on the CefSharpPropertiesLoaded not being set
- Added a duplicate copy of CefSharpPlatformTarget (as _CefSharpPlatformTarget) to make
  sure we copy the correct files.
2021-09-24 11:52:44 +10:00
Alex Maitland db6e118cbc Nuget - Use PlatformTarget instead of CefSharpPlatformTarget for copy targets
CefSharpPlatformTarget isn't defined on initial load
2021-09-10 15:59:36 +10:00
Alex Maitland 738e90dbc2 Upgrade build version to 94.0.30 2021-09-10 15:50:55 +10:00
Alex Maitland e4e0f22ca7 WinForms/WPF/OffScreen - Upgrade to SDK style projects and multi-target net452 and net462
Haven't tested the output nuget packages yet, we might still need to change the nuspec files to add a
dependency group.

Issue #3791
2021-09-05 15:09:35 +10:00
Alex Maitland 2ddb0cb1ed Net Core - Update Nuget Readme.txt to include ARM64 2021-09-05 10:54:53 +10:00
Alex Maitland 464232538a Net Core/Net 5 - Improve CefSharp.Common.NETCore.targets RID handling
Resolves #3773
2021-09-04 14:08:05 +10:00
Alex Maitland d350cad52a Update to M93 (#3781)
* Upgrade to CEF 93.1.7+g9117d6a+chromium-93.0.4577.42 / Chromium 93.0.4577.42

- Core - Add basic ref counting implementation

IMPLEMENT_REFCOUNTING implementation uses atomic which
forces the VC++ compiler to compile as native which doesn't work for our managed ref classes.

    - Use InterlockedCompareExchange for custom ref count reads
    - Use InterlockedIncrement/InterlockedDecrement directly
    - There's no memory barrier for HasOneRef/HasAtLeastOneRef as the read of a LONG should happen in one operation
on 32/64 bit architectures (at least that's my understanding at this point in time).

    References:
    https://github.com/chromiumembedded/cef/blob/4472/include/base/internal/cef_atomicops_x86_msvc.h#L125
    https://github.com/chromiumembedded/cef/blob/4472/include/base/internal/cef_atomicops_arm64_msvc.h#L107
    https://github.com/chromiumembedded/cef/blob/4472/include/base/cef_atomic_ref_count.h#L114
    https://github.com/chromiumembedded/cef/blob/4472/include/cef_base.h#L91

-  Remove Microsoft.Net.Compilers package from projects
Now that we require a min of VS2019 to build there's no need for a custom compiler package
- Start removing VS2015/VC++2015 references
- Remove RegisterWidevineCdm
This is a breaking change. CEF will now automatically download the Widevine CDM component
Resolves #3767

- RequestContext.LoadExtension now uses managed to code spawn on CEF UI Thread
Avoid having to use cef_callback.h which was causing problems for x86 builds
2021-09-03 10:51:18 +10:00
Alex Maitland 8fb2e414b6 Nuget - Manually copy CefSharp Common files after initial Nuget restore
Follow up to https://github.com/cefsharp/CefSharp/commit/24d64c427e8d41709230baf460cb8c803048dc54
2021-07-24 16:13:10 +10:00
Alex Maitland 47f3bcd468 Nuget - Only run CefSharpExcludeCoreRuntimeBeforeGenerateApplicationManifest for packages.config projects
When using Non SDK Stlye project with PackageReference and publishing with ClickOnce the CefSharp.Core.Runtime.*
files were missing from the installer.

Far as I can tell ClickOnce publishing isn't supported for SDK Style projects so just disable for PackageReference for now

https://github.com/cefsharp/CefSharp/discussions/3613#discussioncomment-913061
2021-06-25 14:29:52 +10:00
Alex Maitland 42e9433fdd Nuget - Disable AnyCPU check for BuildTransitive Library Projects
Issue #3622
2021-06-18 15:54:01 +10:00
Alex Maitland 24d64c427e Nuget - Manually copy files after initial Nuget restore
One final attempt to workaround https://github.com/dotnet/project-system/issues/4158

The None/Content entries aren't picked up as the .targets file doesn't exist before the Nuget restore (only when using packages.config)
Attempt to copy the files via calling CefRedist32CopyResources/CefRedist64CopyResources tasks.
Properties aren't accessible, I believe that tasks should be, so hopefully this copies the files.

Build actions like Publish are very unlikely to work correctly as the files won't have been included via the <Content/> entries.
2021-06-18 15:48:06 +10:00
Alex Maitland 325c083b94 Nuget - Exclude CefSharp.Core.Runtime.dll from bin when CefSharpTargetDir and targeting x64
See comments for details

Fix formatting

Issue #3319
2021-04-08 10:47:52 +10:00
Konstantin Preißer 462bc747bd Add support for Windows ARM64 to CefSharp.NETCore packages (#3359)
* Add support for Windows ARM64 for the NETCore packages.

Note: .NET 5.0 or higher is required to build a WinForms/WPF application for win-arm64.

Fixes cefsharp/CefSharp#2944

* PR feedback: Remove "WIN32" define as it is already defined by minwindef.h.

* PR feedback: Switch the CefSharp.*.Example.netcore and CefSharp.Test.netcore projects from cef.redist to chromiumembeddedframework.runtime.

Note: These projects are excluded for build when platform is 'arm64', as otherwise the build fails as WinForms and WPF are not yet available for ARM64 in .NET 5.0.

* Follow-Up: Update path to CefSharp.Test.dll.

* PR feedback: Also use RuntimeInformation for the .NET Framework example projects.

* PR feedback:
- Remove copying of CefRedist files in CefSharp.AfterBuild.targets which is no longer needed.
- Update .vsconfig to include the VC ARM64 build tools.
2021-04-01 17:27:48 +10:00
Alex Maitland bff3768f51 Nuget - TargetPlatform Map Win32 to x86 (VC++ projects) 2021-03-23 15:19:11 +10:00
Alex Maitland 0c6268f940 Nuget - Improvements and formatting fixes
- Remove CefSharpBuildAction default to NoAction when Nuget 5.0 and Library
  For those writing plugins this would have resulted in no files being copied, will rely on users setting
  to NoAction themselves when required
- When $PlatformTarget is empty default to $Platform as the fallback, older Non SDK Style library projects
  are known to not set PlatformTarget when Platform is AnyCPU which would have resulted in only the x86 files being copied.
- Fix formatting of CefSharp.Common.NETCore.targets
2021-03-23 10:49:14 +10:00
Alex Maitland 7950640bd8 Nuget - Sdk Style Project targeting AnyCPU generate error when PlatformTarget not set
When targeting AnyCPU with an SDK Style project PlatformTarget will default to x86 before build
and after build it will have been correctly updated to AnyCPU. This is too late for our purpose as we
have already copied the x86 files resulting in a build that won't run on an an x64 machine.

Issue https://github.com/dotnet/sdk/issues/1560

Disable an error to the user. Add <PlatformTarget>AnyCPU</PlatformTarget> as simple workaround to proj file.

See also https://github.com/cefsharp/CefSharp/discussions/3430 for background.

Release #3446
2021-03-16 15:27:24 +10:00
Alex Maitland e7d59c928e Revert "Nuget - Remove netcoreapp3.0 hacks"
This reverts commit 005f5c8862.
2021-03-14 19:41:28 +10:00
Alex Maitland 6d080ad3f9 Nuget (Net Core) - Add CefSharpBuildAction to CefSharpAfterBuildDiagnostic 2021-03-12 13:55:38 +10:00
Alex Maitland 005f5c8862 Nuget - Remove netcoreapp3.0 hacks
To continue using these packages you can specify AssetTargetFallback
https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#assettargetfallback

Resolves #3444
2021-03-12 13:35:47 +10:00
Alex Maitland 73e2192c95 Upgrade version numbers to 89.0.60 2021-03-12 13:20:12 +10:00
Alex Maitland 5780aefda3 Net Source - Add SourceLink support
- The Debug PDBs will now use SourceLink
- The C++/CLI projects will use SourceLink
- CefSharp.Core.dll now generates/uses a ref assembly
- The managed (c#) projects still embed sources/symbols for Release builds

At some point we should investigate generating a snupkg to reduce the dll size
2021-03-12 13:15:31 +10:00
Alex Maitland c13e2eea5e Nuget - Remove SDK Style project workaround for not PlatformTarget specified
- Remove the workound as it's not working (behaviour is different depending on the SDK version installed)
- Add Prefer32Bit to diag output

For SDK style projects the $(PlatformTarget) is incorrectly set by default
Issue https://github.com/dotnet/sdk/issues/1560

Explicitly setting $(PlatformTarget) in your project file is the recommended solution until the above issue is fixed.
2021-03-09 15:04:37 +10:00
Alex Maitland ba44f6ffce Nuget - Fix formatting 2021-03-09 15:04:37 +10:00
Jozef Izso 7e6e15af88 Fix typos in CefSharp.Common.targets (#3426) 2021-03-08 09:09:33 +10:00
Alex Maitland be58e78fc7 Nuget - CefSharpAfterBuildDiagnostic add extra properties 2021-03-06 13:41:24 +10:00
Alex Maitland c6dc9ebde9 Nuget - Default CefSharpBuildAction to NoAction when Library project PackageRef Nuget > 5.0
- NoAction should now disable AnyCPU checks
- Default to NoAction when Library and Nuget 5.0 when using PackageReference, the Transitive references should flow through to the consuming
projects.
2021-03-06 13:37:01 +10:00
Alex Maitland 5ebb08f3bc Net Core - Nuget Add CefSharpBuildAction and default to NoAction for Class Library
For class libraries we don't want to copy our files into their output folder by default as they won't actually,
so added CefSharpBuildAction and defaulted to NoAction (can be overridden by the user if required).

Consuming packages will have the transitive reference added and files copied into WinExe/Exe projects by default
2021-03-06 10:37:48 +10:00
Alex Maitland 07ce2e0ab3 Net Core - Nuget chromiumembeddedframework.runtime include BuildTransitive
Update dependency includes add BuildTransitive
2021-03-05 17:15:20 +10:00
Alex Maitland 9475ca99b8 Net Core - Improve Nuget debugging 2021-03-02 11:44:23 +10:00
Alex Maitland f8e07de1a3 Nuget - When CefSharpTargetDir set remove the duplicate CefSharp.Core.Runtime.dll file from the bin folder
- Extra copy of CefSharp.Core.Runtime.dll when setting CefSharpTargetDir (see https://github.com/cefsharp/CefSharp/discussions/3371#discussioncomment-416961)
- Fix formatting (tabs to spaces, should change this to tabs at some point)
2021-03-02 10:35:53 +10:00
Alex Maitland e627af899e Net Core - Improve Exclude BrowserSubProcess from .Net 5.0 SingleFile/SelfContained builds
Issue #3407
2021-03-01 11:41:01 +10:00
Alex Maitland edba4bef9e Net Core - Exclude BrowserSubProcess from .Net 5.0 SingleFile/SelfContained builds
Issue https://github.com/cefsharp/CefSharp/issues/3407
2021-02-27 15:02:29 +10:00
Alex Maitland 639bd6382f Nuget - Default AnyCPU Prefer32Bit to x86 when CefSharpAnyCpuSupport is not set
Can be overridden using CefSharpPlatformTargetOverride
2021-02-27 14:47:26 +10:00