In order to fix a bug in CEF I needed to be able to build the binaries.
The system requirements to build CEF are very high so I had to use part of the money donated to this project to buy more RAM and a new SSD drive for my PC.
Thank you so much to all the patreons and users that decided to make a donation!

The building process is described in the official CEF Wiki but if you need a shorter guide to build the 32 bit CEF binaries without proprietary codecs then follow these steps :
- The Windows SDK that comes with Visual Studio doesn't include the "Debugging tools for Windows" so you will need to download and install the Windows 10 SDK from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ The Windows SDK version must be the same as the version mentioned in the "BranchesAndBuilding" wiki at https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md At the time of this writing the Windows 10 SDK version needed for the 7049 branch is 10.0.22621.2428. To avoid issues it's very important to install the Windows SDK in the default directory. Also check if your computer has all the requirements to build Chromium. Read the official information here : https://chromium.googlesource.com/chromium/src/+/HEAD/docs/windows_build_instructions.md
- When you run the Windows SDK installer select all the installation options.
- Create a c:\symbols folder in your hard drive to store the symbols used by WinDbg
- Run WinDbg and open the "File->Symbol File Path" option and type this :
Code: Select all
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
- Create a Windows environment variable called _NT_SYMBOL_PATH and the this value :
Code: Select all
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
- Reboot Windows.
- Install Visual Studio 2022 Community in the default directory and select the "Desktop development with C++" workload. The Visual Studio version must be the same version mentioned in the "BranchesAndBuilding" wiki at https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md Make sure the "installation details" also include the same Windows SDK version installed in the first step. You can download the installer for free here : https://visualstudio.microsoft.com/downloads/
- Run Visual Studio and update it if necessary.
- The Wiki mentions that you need to create some directories to store the sources and other files and the new SSD drive is identified as "E" by Windows so I created those directories in e:\code\automate and e:\code\chromium_git
- Download automate-git.py into e:\code\automate from https://bitbucket.org/chromiumembedded/cef/raw/master/tools/automate/automate-git.py
- Download depot_tools.zip and decompress into e:\code\depot_tools from https://storage.googleapis.com/chrome-infra/depot_tools.zip
- Add e:\code\depot_tools to the PATH environment variable in Windows and reboot. Make sure this path entry is added before other paths with different versions of Python. If you get a message about installing Python from the Microsoft Store then add "e:\" and the depot_tools path in the first position.
- Run e:\code\depot_tools\update_depot_tools.bat
- Create a new BAT file called e:\code\buildcef32.bat with the following contents.
Code: Select all
set GN_DEFINES=is_official_build=true set GYP_MSVS_VERSION=2022 set CEF_ARCHIVE_FORMAT=tar.bz2 python3 automate\automate-git.py --download-dir=e:\code\chromium_git --branch=7049 --minimal-distrib --client-distrib --force-clean --with-pgo-profiles
- Run e:\code\buildcef32.bat
This will build the 32 bits CEF binaries. If you need to build the 64 bit version you would have to create and run a new file called e:\code\buildcef64.bat with the following contents :
Code: Select all
set GN_DEFINES=is_official_build=true
set GYP_MSVS_VERSION=2022
set CEF_ARCHIVE_FORMAT=tar.bz2
python3 automate\automate-git.py --download-dir=e:\code\chromium_git --branch=7049 --minimal-distrib --client-distrib --force-clean --x64-build --with-pgo-profiles
When buildcef32.bat or buildcef64.bat finish building and creating the packages you will find the tar.bz2 packages in this directory :
e:\code\chromium_git\chromium\src\cef\binary_distrib
The buildcef32.bat or buildcef64.bat scripts mentioned above will create the CEF binaries with the open source codecs only.
If you need to build the binaries with proprietary codecs you need to use the following scripts :
buildcef32.bat
Code: Select all
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2022
set CEF_ARCHIVE_FORMAT=tar.bz2
python3 automate\automate-git.py --download-dir=e:\code\chromium_git --branch=7049 --minimal-distrib --client-distrib --force-clean --with-pgo-profiles
Code: Select all
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2022
set CEF_ARCHIVE_FORMAT=tar.bz2
python3 automate\automate-git.py --download-dir=e:\code\chromium_git --branch=7049 --minimal-distrib --client-distrib --force-clean --x64-build --with-pgo-profiles
You need a really fast and powerful computer to build the binaries in a reasonable amount of time.
The Wiki pages state that you need at least 8GB of RAM and 40GB of free disk space but I would recommend much higher values. According some developers in the official CEF forum the latest versions it requires more than 40 GB of RAM to build the binaries.
I would also recommend to use a fast SSD 512GB drive only used to build CEF. Some users report that a 240GB drive is not big enough to build all the latest binaries.

The CPU speed and the amount of cores is very important to build CEF. I have an old Ryzen 5 CPU and it takes about 8 hours

To avoid making all this process even longer it's also recommended that you :
- Disable windows defender real-time protection.
- Turning off Indexing in the hard drives.
- Add the project folders and all the EXEs used to build the binaries to the "Exclusions" list of Windows Defender. I used the list from this repository and a few more https://gist.github.com/Ryan-Efendy/b7150b18d46d8a8bd18a178f982ef6ca
- C:\Windows\Microsoft.NET
- C:\Windows\assembly
- C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio
- C:\ProgramData\Microsoft\VisualStudio
- C:\Program Files (x86)\MSBuild
- C:\Program Files (x86)\Microsoft Visual Studio
- C:\Program Files (x86)\Microsoft SDKs
- E:\code
- devenv.exe
- dotnet.exe
- msbuild.exe
- node.exe
- node.js
- perfwatson2.exe
- ServiceHub.Host.Node.x86.exe
- vbcscompiler.exe
- testhost.exe
- datacollector.exe
- IntelliTrace.exe
- git.exe
- git-remote-https.exe
- clang-cl.exe
- nasm.exe
- ninja.exe
- python.exe
- python3.exe
- vpython3.exe
- lld-link.exe
The "commit hash" can be obtained from the CEF binaries line. For example, if you use the CEF binaries available in this link :
https://cef-builds.spotifycdn.com/cef_binary_90.5.7%2Bgcd9342c%2Bchromium-90.0.4430.85_windows32.tar.bz2
The "commit hash" value would be cd9342c. Notice that the commit value is located between the CEF version and the word "chromium". You also have to remove the plus signs encoded as %2B and the letter "g". The branch value is the third number after the word "chromium".
https://cef-builds.spotifycdn.com/cef_binary_90.5.7%2Bgcd9342c%2Bchromium-90.0.4430.85_windows32.tar.bz2
In this case, you would have this script to build the binaries with proprietary codecs from that old CEF commit :
buildcef32.bat
Code: Select all
set GN_DEFINES=is_official_build=true use_thin_lto=false proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2022
set CEF_ARCHIVE_FORMAT=tar.bz2
python3 automate\automate-git.py --download-dir=e:\code\chromium_git --checkout=cd9342c --branch=4430 --minimal-distrib --client-distrib --force-clean
Code: Select all
set GN_DEFINES=is_official_build=true use_thin_lto=false proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2022
set CEF_ARCHIVE_FORMAT=tar.bz2
python3 automate\automate-git.py --download-dir=e:\code\chromium_git --checkout=cd9342c --branch=4430 --minimal-distrib --client-distrib --force-clean --x64-build
Read the following document for more details about building Chromium :
https://chromium.googlesource.com/chromium/src/+/HEAD/docs/windows_build_instructions.md