Clone wiki

cef / BranchesAndBuilding

This Wiki page provides information about CEF branches and instructions for downloading, building and packaging source code.

Note to Editors: Changes made to this Wiki page without prior approval via the CEF Forum or Issue Tracker may be lost or reverted.



Background

The CEF project is an extension of the Chromium project hosted at http://www.chromium.org. CEF maintains development and release branches that track Chromium branches. CEF source code can be built manually or with automated tools.

Development

Ongoing development of CEF occurs in the CEF master branch. This location tracks the current Chromium master branch and is not recommended for production use.

Current CEF master branch build requirements are as follows. See the MasterBuildQuickStart Wiki page for a development build quick-start guide.

Windows Build Requirements macOS Build Requirements Linux Build Requirements
Win 7+, VS2017 15.7.1+, Win10.0.17134.0 SDK, Ninja macOS 10.10-10.13, 10.10+ build system, 10.10+ deployment target, 10.10 base SDK, Xcode 9.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja

The following URLs should be used for downloading development versions of CEF.

CEF1 is no longer actively developed or supported. See the CEF1 Retirement Plan for details.

Release Branches

CEF branches are created to track each Chromium release milesone (MXX) branch. Users developing applications for production environments are encouraged to use release branches for the following reasons:

  • Binary CEF builds are tied to specific Chromium releases.
  • Release versions of CEF/Chromium are better tested and more appropriate for release applications.
  • Within a release branch the CEF API is "frozen" and generally only security/bug fixes are applied.
  • CEF release branches can include patches to Chromium/Blink source if necessary.
  • CEF master development won't interfere with consumer release schedules.

Modern CEF release version numbers have the format X.YYYY.A.gHHHHHHH where:

  • "X" is the CEF major version (currently 3).
  • "YYYY" is the Chromium branch.
  • "A" is an incremental number representing the number of commits in the current branch. This is roughly equivalent to the SVN revision number but on a per-branch basis and assists people in quickly determining the order of builds in the same branch (for bug reports, etc).
  • "gHHHHHHH" is the 7-character abbreviation for the Git commit hash. This facilitates lookup of the relevant commit history in Git.

Detailed Chromium and CEF version information is available in the include/cef_version.h header file that will be created during the build process or by loading the “about:version” URL in a CEF-derived application.

CEF release branches and associated platform build requirements are as follows.

Current Release Branches (Supported)

Support for newer branches begins when they enter the Chromium beta channel. Support for older branches ends when they exit the Chromium stable channel. The Spotify automated builder provides CEF builds for the current Chromium stable channel and will switch to the next Chromium branch when that branch is promoted to the stable channel. Updating CEF branches is currently a manual process so there will likely be a delay between Chromium release announcements and the availability of associated CEF builds. See the Chromium release calendar for estimated Chromium release dates and versions.

Branch Date Release Branch Chromium Version Windows Build Requirements macOS Build Requirements Linux Build Requirements
Oct 2018 3578 71 Win 7+, VS2017 15.7.1+, Win10.0.17134.0 SDK, Ninja macOS 10.10-10.13, 10.10+ build system, 10.10+ deployment target, 10.10 base SDK, Xcode 9.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Sep 2018 3538 70 Win 7+, VS2017 15.7.1+, Win10.0.17134.0 SDK, Ninja macOS 10.10-10.13, 10.10+ build system, 10.10+ deployment target, 10.10 base SDK, Xcode 9.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja

Legacy Release Branches (Unsupported)

Legacy CEF builds are available from the Spotify automated builder back to 2704 branch. Building legacy branches is not supported. If you choose to build a legacy branch you will need to solve any build errors on your own.

  • Newer legacy branches (within the past year) can often be built using the same tooling as current branches. You will need to (a) manually download depot_tools, (b) sync depot_tools to a revision that existed at the time of the branch, and (c) set the DEPOT_TOOLS_UPDATE=0 environment variable to keep it from updating automatically.
  • Older legacy branches can potentially be built by downloading a CEF source archive at the desired branch from here and a Chromium source archive at the associated/required version from here, and then combining them to create the required directory structure.
  • See the Build Notes section at the end of this page for historical build details.
Branch Date Release Branch Chromium Version CEF1 CEF3 Windows Build Requirements macOS Build Requirements Linux Build Requirements
Jul 2018 3497 69 No Yes Win 7+, VS2017 15.7.1+, Win10.0.17134.0 SDK, Ninja macOS 10.10-10.13, 10.10+ build system, 10.10+ deployment target, 10.10 base SDK, Xcode 9.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Jun 2018 3440 68 No Yes Win 7+, VS2017 15.7.1+, Win10.0.17134.0 SDK, Ninja macOS 10.10-10.13, 10.10+ build system, 10.10+ deployment target, 10.10 base SDK, Xcode 9.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Apr 2018 3396 67 No Yes Win 7+, VS2017 15.3.2+, Win10.0.15063.468 SDK, Ninja macOS 10.9-10.13, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 9.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Mar 2018 3359 66 No Yes Win 7+, VS2017 15.3.2+, Win10.0.15063.468 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Jan 2018 3325 65 No Yes Win 7+, VS2017 15.3.2+, Win10.0.15063.468 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Dec 2017 3282 64 No Yes Win 7+, VS2017 15.3.2+, Win10.0.15063.468 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Oct 2017 3239 63 No Yes Win 7+, VS2017 15.3.2+, Win10.0.15063.468 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Sep 2017 3202 62 No Yes Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Jul 2017 3163 61 No Yes Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Jun 2017 3112 60 No Yes Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Apr 2017 3071 59 No Yes Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Jessie+, Ninja
Mar 2017 3029 58 No Yes Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 8.3, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Jan 2017 2987 57 No Yes Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 7.3.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Nov 2016 2924 56 No Yes Win 7+, VS2015u3, Win10.0.10586 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.9+ deployment target, 10.10 base SDK, Xcode 7.3.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Oct 2016 2883 55 No Yes Win 7+, VS2015u3, Win10.0.10586 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.7+ deployment target, 10.10 base SDK, Xcode 7.3.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Aug 2016 2840 54 No Yes Win 7+, VS2015u2 or VS2015u3, Win10.0.10586 SDK, Ninja macOS 10.9-10.12, 10.9+ build system, 10.7+ deployment target, 10.10 base SDK, Xcode 7.3.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Jul 2016 2785 53 No Yes Win 7+, VS2015u2 or VS2015u3, Win10.0.10586 SDK, Ninja macOS 10.9-10.11, 10.9+ build system, 10.7+ deployment target, 10.10 base SDK, Xcode 7.3.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
May 2016 2743 52 No Yes Win 7+, VS2015u2 or VS2015u3, Win10.0.10586 SDK, Ninja macOS 10.9-10.11, 10.9+ build system, 10.7+ deployment target, 10.10 base SDK, Xcode 7.1.1-7.3.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Apr 2016 2704 51 No Yes Win 7+, VS2015u2, Win10.0.10586 SDK, Ninja macOS 10.9-10.11, 10.9+ build system, 10.7+ deployment target, 10.10 base SDK, Xcode 7.1.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Jan 2016 2623 49 No Yes WinXP+, VS2013u4 or VS2015u1 (experimental), Win10 SDK, Ninja macOS 10.6-10.11, 10.7+ build system, 10.6+ deployment target, 10.10 base SDK, Xcode 7.1.1, Ninja, 64-bit only Ubuntu 14.04+, Debian Wheezy+, Ninja
Oct 2015 2526 47 No Yes WinXP+, VS2013u4 or VS2015u1 (experimental), Win8.1 SDK, Ninja macOS 10.6-10.11, 10.6+ deployment target, 10.10 base SDK, Xcode 6.1, Ninja, 64-bit only Ubuntu 12.04+, Debian Wheezy+, Ninja
Jul 2015 2454 45 No Yes WinXP+, VS2013u4, Win8.1 SDK, Ninja macOS 10.6-10.10, 10.6+ deployment target, 10.9 base SDK, Xcode 6.1, Ninja, 64-bit only Ubuntu 12.04+, Debian Wheezy+, Ninja
Apr 2015 2357 43 No Yes WinXP+, VS2013u4, Win8.1 SDK, Ninja macOS 10.6-10.10, 10.6+ deployment target, 10.9 base SDK, Xcode 6.1, Ninja, 64-bit only Ubuntu 12.04+, Debian Wheezy+, Ninja
Jan 2015 2272 41 No Yes WinXP+, VS2013u4, Win8.1 SDK, Ninja macOS 10.6-10.10, 10.6+ deployment target, 10.9 base SDK, Xcode 6.1, Ninja, 64-bit only Ubuntu 12.04+, Debian Wheezy+, Ninja
Oct 2014 2171 39 No Yes WinXP+, VS2013u4, Win8.1 SDK, Ninja macOS 10.6-10.9, 10.6+ SDK, Xcode 5.1.1, Ninja Ubuntu 12.04+, Debian Wheezy+, Ninja
Aug 2014 2062 37 No Yes WinXP+, VS2013, Win8 SDK, Ninja macOS 10.6-10.9, 10.6+ SDK, Xcode 5.1.1, Ninja Ubuntu 12.04+, Debian Wheezy+, Ninja
Apr 2014 1916 35 No Yes WinXP+, VS2013, Win8 SDK, Ninja macOS 10.6-10.9, 10.6+ SDK, Xcode 5.1.1, Ninja Ubuntu 12.04+, Debian Wheezy+, Ninja
Jan 2014 1750 33 No Yes WinXP+, VS2010-2013, Win8 SDK, Ninja macOS 10.6-10.9, 10.6+ SDK, Xcode 5.1.1, Ninja Ubuntu 12.04+, Debian Wheezy+, Ninja
Oct 2013 1650 31 No Yes WinXP+, VS2010-2012, Win8 SDK, Ninja (optional) macOS 10.6-10.9, 10.6+ SDK, Xcode 5.1.1, Ninja Ubuntu 12.04+, Debian Wheezy+, Ninja
Jul 2013 1547 29 No Yes WinXP+, VS2010-2012, Win8 SDK, Ninja (optional) macOS 10.6-10.8, 10.6+ SDK, Xcode 3.2.6-4.x, Ninja (optional) Ubuntu 12.04+, Debian Squeeze+, Ninja
Apr 2013 1453 27 Yes Yes WinXP+, VS2010, Win8 SDK, Ninja (optional) macOS 10.6-10.8, 10.6+ SDK, Xcode 3.2.6-4.x, Ninja (optional) Ubuntu 12.04+, Debian Squeeze+, Ninja (optional)
Jan 2013 1364 25 Yes Yes WinXP+, VS2010, Win8 SDK, Ninja (optional) macOS 10.6-10.8, Xcode 3.2.6-4.x, Ninja (optional) Ubuntu 12.04+, Debian Squeeze+, Ninja (optional)
Oct 2012 1271 23 Yes Yes WinXP+, VS2010, Win7 SDK macOS 10.6-10.8, 10.6+ SDK, Xcode 3.2.6-4.x Ubuntu 12.04+, Debian Squeeze+
Aug 2012 1180 21 Yes Yes WinXP+, VS2010, Win7 SDK macOS 10.6-10.7, 10.5+ SDK, Xcode 3.2.6-4.x Ubuntu 12.04+, Debian Squeeze+
Apr 2012 1084 19 Yes No WinXP+, VS2008, Win7 SDK macOS 10.6-10.7, 10.5+ SDK, Xcode 3.2.6-4.x Ubuntu 10.04+, Debian Squeeze+
Feb 2012 1025 18 Yes No WinXP+, VS2008, Win7 SDK macOS 10.6-10.7, 10.5+ SDK, Xcode 3.2.6-4.x Ubuntu 10.04+, Debian Squeeze+
Dec 2011 963 17 Yes No WinXP+, VS2008, Win7 SDK macOS 10.6-10.7, 10.5+ SDK, Xcode 3.2.6 Ubuntu 10.04+, Debian Squeeze+

The following URL should be used for downloading release versions of CEF where YYYY is the release branch number.

Note that 1025 and older branches contain only CEF1 source code and that 1547 and newer branches contain only CEF3 source code.

Building from Source

Building from source code is currently supported on Windows, macOS and Linux platforms. Use of the Automated Method described below is recommended. Building the current CEF/Chromium master branch for local development is described on the MasterBuildQuickStart Wiki page. Building the current CEF/Chromium stable branch automatically for production use is described on the AutomatedBuildSetup Wiki page. For other branches see the build requirements listed in the “Release Branches” section above and the “Build Notes” section below.

Automated Method

CEF provides tools for automatically downloading, building and packaging Chromium and CEF source code. These tools are the recommended way of building CEF locally and can also be integrated with automated build systems as described on the AutomatedBuildSetup Wiki page. See the MasterBuildQuickStart Wiki page for an example of the recommended workflow for local development builds.

These steps apply to the Git workflow only. The Git workflow is recommended for all users and supports CEF3 master and newer CEF3 release branches (1750+).

1. Download the automate-git.py script. Use the most recent master version of this script even when building release branches.

2. On Linux: Chromium requires that certain packages be installed. You can install them by running the install-build-deps.sh script or by explicitly running the necessary installation commands.

3. Run the automate-git.py script at whatever interval is appropriate (for each CEF commit, once per day, once per week, etc).

To build master:

python /path/to/automate/automate-git.py --download-dir=/path/to/download

To build a release branch:

python /path/to/automate/automate-git.py --download-dir=/path/to/download --branch=2785

By default the script will download depot_tools, Chromium and CEF source code, run Debug and Release builds of CEF, and create a binary distribution package containing the build artifacts in the “/path/to/download/chromium/src/cef/binary_distrib” directory. Future runs of the script will perform the minimum work necessary (unless otherwise configured using command-line flags). For example, if there are no pending CEF or Chromium updates the script will do nothing.

If you run the script and CEF or Chromium updates are pending the “/path/to/download/chromium/src/cef” directory will be removed and replaced with a clean copy from “/path/to/download/cef_(branch)” (specify the --no-update command-line flag to disable updates). Make sure to back up any changes that you made in the “/path/to/download/chromium/src/cef” directory before re-running the script.

The same download directory can be used for building multiple CEF branches (just specify a different --branch command-line value). The existing “/path/to/download/chromium/src/out” directory will be moved to “/path/to/download/out_(previousbranch)” so that the build output from the previous branch is not lost. When you switch back to a previous branch the out directory will be restored to its original location.

The script will create a 32-bit build on Windows by default. To create a 64-bit build on Windows, macOS or Linux specify the --x64-build command-line flag. 32-bit builds on macOS are no longer supported starting with 2272 branch so this flag is now required when building 2272+ on that platform.

If you receive Git errors when moving an existing checkout from one branch to another you can force a clean Chromium Git checkout (specify the --force-clean command-line flag) and optionally a clean download of Chromium dependencies (specify the --force-clean-deps command-line flag). Any build output that currently exists in the “src/out” directory will be deleted. Re-downloading the Chromium dependencies can take approximately 30 minutes with a reasonably fast internet connection.

Add the --help command-line switch to output a complete list of supported command-line options.

Manual Downloading

See the MasterBuildQuickStart Wiki page for an example of the recommended developer workflow.

Manual Building

See the MasterBuildQuickStart Wiki page for an example of the recommended developer workflow.

Manual Packaging

After building both Debug and Release configurations you can use the make_distrib tool (.bat on Windows, .sh on macOS and Linux) to create a binary distribution.

cd /path/to/chromium/src/cef/tools
./make_distrib.sh --ninja-build

If the process succeeds a binary distribution package will be created in the /path/to/chromium/src/cef/binary_distrib directory.

See the make_distrib.py script for additional usage options.

The resulting binary distribution can then be built using CMake and platform toolchains. See the README.txt file included with the binary distribution for more information.

Build Notes

This section summarizes build-related requirements and options.

  • Building on most platforms will require at least 8GB of system memory.
  • Ninja must be used when building newer CEF/Chromium branches.
  • Clang is used by default for compiling/linking Chromium/CEF on macOS in all branches, Linux starting in 2063 branch, and Windows starting in 3282 branch.
  • GYP is supported by 2785 branch and older. GN is supported by 2785 branch and newer, and required starting with 2840 branch. Set CEF_USE_GN=1 to build 2785 branch with GN instead of GYP.
  • To perform a 64-bit build on Windows (any branch) or macOS (branch 2171 or older) set GYP_DEFINES=target_arch=x64 (GYP only) or build the out/[Debug|Release]_GN_x64 target (GN only). To perform a 32-bit Linux build on a 64-bit Linux system see instructions on the AutomatedBuildSetup Wiki page.
  • To perform an “official” build set GYP_DEFINES=buildtype=Official (GYP only) or GN_DEFINES=is_official_build=true (GN only). This will disable debugging code and enable additional link-time optimizations in Release builds. See instructions on the AutomatedBuildSetup Wiki page for additional official build recommendations.
  • Windows -
    • If multiple versions of Visual Studio are installed on your system you can set the GYP_MSVS_VERSION environment variable to create project files for that version. For example, set the value to "2015" for VS2015 or "2017" for VS2017. Check the Chromium documentation for the correct value when using other Visual Studio versions.
    • If you wish to use Visual Studio for debugging and compiling in combination with a Ninja build you can set GYP_GENERATORS=ninja,msvs-ninja (GYP only) or GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/* (GN only) to generate both Ninja and VS project files. Visual Studio is supported only for debugging and compiling individual source files -- it will not build whole targets successfully. You must use Ninja when building CEF/Chromium targets.
    • For best local developer (non-official debug) build-time performance:
      • When using VS2015 set GN_DEFINES=is_win_fastlink=true for improved compile and link time.
      • When using VS2017 set GN_DEFINES=use_jumbo_build=true for improved compile and link time.
      • Component builds are supported by 3202 branch and newer and significantly reduce link time. Add is_component_build=true to GN_DEFINES in combination with the above VS-version-specific values. Component builds cannot be used to create a CEF binary distribution. See issue #1617 for details.
  • macOS -
    • The combination of deployment target and base SDK version will determine the platforms supported by the resulting binaries. For proper functioning you must use the versions specified under build requirements for each branch.
    • 32-bit builds are no longer supported with 2272 branch and newer. See here for the Chromium announcement.
  • Linux -
    • CEF is developed and tested on the Ubuntu version specified in the "Release Branches" section. It should be possible to build and run CEF on other compatible Linux distributions but this is untested.
    • The libgtkglext1-dev package is required in branch 1547 and newer to support the off-screen rendering example in cefclient. This is only a requirement for cefclient and not a requirement for other applications using CEF.

Updated