How to compile CEF H.264 & replace installed CEF from NuGet?

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

How to compile CEF H.264 & replace installed CEF from NuGet?

Postby goodwin74 » Sun Dec 06, 2020 5:59 am

Hello! I need help from those who built CEF from source. I would be grateful for any help.
I followed everything up to point 7 from the official instructions at the link https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md.
I got the "Out" folder with Debug_GN_x64 and Debug_GN_x86. Please tell me what to do next?

How to compile now the CEF and replace the already installed CEF from NuGet in the project?

ps Now the project has CefSharp.WinForms & CefSharp.Common 86.0.241 installed (from NuGet)
cef.redist.x86 & cef.redist.x64 86.0.24
goodwin74
Newbie
 
Posts: 4
Joined: Sun Dec 06, 2020 5:30 am

Re: How to compile CEF H.264 & replace installed CEF from Nu

Postby amaitland » Sun Dec 06, 2020 5:56 pm

Those are instructions for creating a development build. You need to create a release build.

The configuration for a release build on Windows is listed at https://bitbucket.org/chromiumembedded/ ... figuration

See https://github.com/cefsharp/CefSharp/wi ... audiovideo for some links to useful resources.
Maintainer of the CefSharp project.
amaitland
Master
 
Posts: 956
Joined: Wed Jan 14, 2015 2:35 am

Re: How to compile CEF H.264 & replace installed CEF from Nu

Postby goodwin74 » Sun Dec 06, 2020 6:35 pm

amaitland wrote:Those are instructions for creating a development build. You need to create a release build.

The configuration for a release build on Windows is listed at https://bitbucket.org/chromiumembedded/ ... figuration

See https://github.com/cefsharp/CefSharp/wi ... audiovideo for some links to useful resources.

I have three questions, tell me the answers, please :roll: .

1. Does this mean that I did not need to follow the steps from the instructions that I indicated, instead I had to do what is described in the instructions you specified?
Or does it need to be done after the instructions that I indicated above?

2. Where to get the automate-git.py which is specified in the instructions that you indicated above? Is this the same file that was specified in the instructions that I indicated in my first message?

3. Did I understand correctly that using the instructions that you specified, I can build CEF and insert it into an existing project with CefSharp from Nuget?
goodwin74
Newbie
 
Posts: 4
Joined: Sun Dec 06, 2020 5:30 am

Re: How to compile CEF H.264 & replace installed CEF from Nu

Postby akhudairy » Mon Jan 04, 2021 9:18 am

Hi.

I am still struggling here with completing a release build. But I think I can answer some of your questions.

for Question 1. I got no idea. What I am trying now is the same steps that you tried in master build wiki, but I in step 8 I am calling "ninja -C out\Release_GN_x86 cef". If it works I will update this answer. I will also try the steps in the page mentioned by amaitland, but will try to update the flag to support the codecs like set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome

Question 2. I am pretty sure it is the same autoamte-git.py that you downloaded from page https://bitbucket.org/chromiumembedded/ ... ckStart.md

Question 3. Yes you can using these steps
- Check you nuget package folder (D:\SSCollection\SSS\Assets\NuGetPackages\cef.redist.x86.84.4.1\CEF) or the 64 bit one if you are targeting 64.
- After you get a successful release build hopefully :) Copy the files that matches the files in above folder to a new folder, and make this new folder part of your project repository
- You can use Visual Studio Project Post Release Script, to run some commands to copy these files to your output directory and make sure they replace the ones from the nuget library.
- That's it. It should work. Having in mind that you were sure that you built the correct version of CEF that matches the Nuget library version.


Update 6 Jan 2021:
Using master build steps, but replacing step 8 with "ninja -C out\Release_GN_x86 cef" has worked just fine for us. I will update the thread once we try the other method.

Update 8 Jan 2021:
Using the automated build steps also worked just fine. I just had to do step 3 to from master build to install git and python as I was working on a new machine.
Also I made a little change to support the codec, and I added (python) command to last command. I copied all the commands to a batch file and executed it. I also set branch 4147 as I need cef 84.1.1, and used the 32 bit build.

set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2019
set CEF_ARCHIVE_FORMAT=tar.bz2
automate-git.py --download-dir=%download_dir% --branch=4147 --minimal-distrib --client-distrib --force-clean
akhudairy
Techie
 
Posts: 24
Joined: Wed Oct 21, 2020 7:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron