Page 1 of 1

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

PostPosted: Sun Dec 06, 2020 5:59 am
by goodwin74
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

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

PostPosted: Sun Dec 06, 2020 5:56 pm
by amaitland
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.

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

PostPosted: Sun Dec 06, 2020 6:35 pm
by goodwin74
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?

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

PostPosted: Mon Jan 04, 2021 9:18 am
by akhudairy
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

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

PostPosted: Wed Aug 31, 2022 6:35 am
by joakim
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.


Hello,
and thank you so much for your great work!

I compile the H264 version and everything is ok!!!

But I would like to compile only the release X64 version

the script is this:

cd %ROOT%chromium_git\chromium\src


REM ninja -C out\Debug_GN_x86 cef
REM ninja -C out\Release_GN_x86 cef

REM ninja -C out\Debug_GN_x64 cef
call ninja -C out\Release_GN_x64 cef

but all the 4 version compile

What am i doing wrong?

Thank You for help!
JoaKim

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

PostPosted: Sun Sep 04, 2022 2:55 pm
by amaitland
If you have a question about compiling CEF then ask in viewforum.php?f=6