| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
IMPORTANT NOTE: These instructions are for the new releases of CEF Python (Chrome v51 and later). Currently only Linux platform is being tested. For the old v31 release that is supported on all platforms, see build instructions on the wiki pages.
There are several types of builds you can perform:
Before you can build CEF Python or CEF you must satisfy requirements listed on this page.
Table of contents:
Complete steps for building CEF Python 53 using prebuilt binaries from GH releases.
Tested and works fine on Ubuntu 14.04 64-bit (cmake 2.8.12 and g++ 4.8.4)
Download ninja 1.7.1 or later and copy it to /usr/bin and chmod 755.
Install packages: sudo apt-get install python-dev cmake g++ libgtk2.0-dev
Install python dependencies by executing: cd cefpython/tools/ && sudo pip install -r requirements.txt (Cython version from requirements.txt must match exactly)
Download 64-bit Linux binaries and libraries from GH releases tagged 'v53-upstream'.
Copy "bin/*" to "cefpython/src/linux/binaries_64bit/"
Copy "lib/*" to "cefpython/src/linux/setup/lib_64bit/" (create dir)
Build cefpython:
cd cefpython/src/linux/ python compile.py 53.1
Below are platform specific requirements. Do these first before following instructions in the "All platforms" section that lists requirements common for all platforms.
Windows
Linux
All platforms
NOT WORKING YET
Prebuilt binaries are available on GitHub Releases and tagged eg. 'v51-upstream'.
Run the automate.py tool using the --prebuilt-cef flag that will download prebuilt binaries from GitHub Releases using version information from the "src/version/" directory.
cd tools/ python automate.py --prebuilt-cef
You should be fine by running automate.py with the default options, but if you need to customize the build then use the --help flag to see more.
Run the automate.py tool using the --build-cef flag. You can optionally set how many parallel ninja jobs to run (by default cores/2) with the --ninja-jobs flag.
The automate script will use version information from the "src/version/" directory. If you would like to use a custom CEF branch then you can use the --cef-branch flag - but note that this is only for advanced users as this will require updating cefpython's C++/Cython code.
If building on Linux and there are errors, see the MISSING PACKAGES note futher down.
You should be fine by running automate.py with the default options, but if you need to customize the build then use the --help flag to see more.
cd ~/cefpython/ mkdir build/ && cd build python ../tools/automate.py --build-cef --ninja-jobs 6 cd cef*_*_linux64/ cp bin/* ../../../src/linux/binaries_64bit/ mkdir ../../../src/linux/setup/lib_64bit/ cp lib/* ../../../src/linux/setup/lib_64bit/ cd ../../../src/linux/ python compile.py 51.0
MISSING PACKAGES (Linux): After the chromium sources are downloaded, it will try to build cef projects and if it fails due to missing packages make sure you've installed all the required packages listed in the Requirements section further up on this page. If it still fails, you can fix it by running the install-build-deps.sh script (intended for Ubuntu systems, but you could edit it). When the "ttf-mscorefonts-installer" graphical installer pops up don't install it - deny EULA.
cd build/chromium/src/build/ chmod 755 install-build-deps.sh sudo ./install-build-deps.sh --no-lib32 --no-arm --no-chromeos-fonts --no-nacl
After dependencies are satisifed re-run automate.py.
CEF Python official binaries come with custom CEF binaries with a few patches applied for our use case. These patches are in the patches/ directory.
On Linux before running any of CEF tools apply the issue73 patch first.
To build CEF follow the instructions on the Branches and Building CEF wiki page: https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
After it is successfully built - apply patches, rebuild and remake distribs.
Note that CEF patches must be applied in the "download_dir/chromium/src/cef/" directory, not in the "download_dir/cef/" directory.
There are two sites that provide latest builds of CEF:
To build the "libcef_dll_wrapper" library type these commands:
cd cef_binary/ mkdir build cd build/ cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release .. ninja libcef_dll_wrapper
To build CEF sample applications type ninja cefclient cefsimple.
Official CEF Python binaries come with additional patches to CEF/Chromium, see the patches/ directory. Whether you need these patches depends on your use case, they may not be required and thus you could use the Spotify binaries. Spotify builds have the issue73 patch (no tcmalloc) applied.
Create a patch from unstaged changes in current directory:
cd chromium/src/cef/ git diff --no-prefix --relative > issue251.patch
Apply a patch in current directory:
cd chromium/src/cef/ git apply issue251.patch
In case of a "No such file or directory" error and when paths seem to be correct, try the -p0 or -p1 flag:
git apply -p0 issue251.patch
To create a patch from last two commits (no --relative flag available in this case, so must be in root CEF dir):
git format-patch --no-prefix -2 HEAD --stdout > issue251.patch
| Back | FazBrowse Home | New Git URL |