diff --git a/docs/Build-instructions.md b/docs/Build-instructions.md index 821adab6..832e0f96 100644 --- a/docs/Build-instructions.md +++ b/docs/Build-instructions.md @@ -12,6 +12,7 @@ Table of contents: * [Build using prebuilt CEF binaries and libraries](#build-using-prebuilt-cef-binaries-and-libraries) * [Build using CEF binaries from Spotify Automated Builds](#build-using-cef-binaries-from-spotify-automated-builds) * [Build upstream CEF from sources](#build-upstream-cef-from-sources) + * [Possible errors](#possible-errors) * [Build CEF manually](#build-cef-manually) * [CEF Automated Builds (Spotify and Adobe)](#cef-automated-builds-spotify-and-adobe) * [Notes](#notes) @@ -191,8 +192,9 @@ requirements common for all platforms. * Official binaries are built on Ubuntu 14.04 (cmake 2.8.12, g++ 4.8.4) * Download [ninja](http://martine.github.io/ninja/) 1.7.1 or later and copy it to /usr/bin and chmod 755. - * Install required packages using one of the three methods below: - 1. Type command: `sudo apt-get install bison build-essential cdbs curl devscripts dpkg-dev elfutils fakeroot flex g++ git-core git-svn gperf libapache2-mod-php5 libasound2-dev libav-tools libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libffi-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-psutil python-numpy python-opencv python-openssl python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho fonts-thai-tlwg wdiff zip` + * Install/upgrade required packages using one of the three methods below + (these packages should be upgraded each time you update to newer CEF): + 1. Type command: `sudo apt-get install bison build-essential cdbs curl devscripts dpkg-dev elfutils fakeroot flex g++ git-core git-svn gperf libapache2-mod-php5 libasound2-dev libav-tools libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libffi-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-psutil python-numpy python-opencv python-openssl python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho fonts-thai-tlwg wdiff wget zip` 2. See the list of packages on the [cef/AutomatedBuildSetup.md](https://bitbucket.org/chromiumembedded/cef/wiki/AutomatedBuildSetup.md#markdown-header-linux-configuration) wiki page. @@ -298,13 +300,16 @@ a custom CEF branch then 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 (Linux)" 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 options. +Remember to always upgrade packages listed in Requirements section each +time you update to newer CEF. + +On Linux if there are errors about missing packages or others, +then see solutions in the [Possible errors](#possible-errors) section. + The commands below will build CEF from sources with custom CEF Python patches applied and then build the CEF Python package (xx.x is version number): @@ -323,6 +328,15 @@ module, make installer package, install the package and run unit tests and examples. See the notes for commands for creating package installer and/or wheel package for distribution. +### Possible errors + +__Debug_GN_arm/ configuration error (Linux)__: Even though building +on Linux for Linux, Chromium still runs ARM configuration files. If +there is an error showing that pkg-config fails with GTK 3 library +then see solution in the third post in this topic on CEF Forum: +[Debug_GN_arm error when building on Linux, *not* arm] +(https://magpcss.org/ceforum/viewtopic.php?f=6&t=14976). + __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 @@ -334,7 +348,7 @@ 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 +sudo ./install-build-deps.sh --no-chromeos-fonts --no-nacl ``` After dependencies are satisifed re-run automate.py. @@ -442,7 +456,12 @@ cd chromium/src/cef/ git diff --no-prefix --relative > issue251.patch ``` -Apply a patch in current directory: +Apply a patch in current directory and ignore git index: +``` +patch -p0 < issue251.patch +``` + +Apply a patch in current directory and do not ignore git index: ``` cd chromium/src/cef/ git apply -v -p0 issue251.patch diff --git a/patches/issue125.patch b/patches/issue125.patch index 0f332367..1cde324a 100644 --- a/patches/issue125.patch +++ b/patches/issue125.patch @@ -1,8 +1,8 @@ diff --git http_cache_transaction.cc http_cache_transaction.cc -index 45f3db6aed3c..373b1e3c5b45 100644 +index 717522eb6951..e92ba22a9ca9 100644 --- http_cache_transaction.cc +++ http_cache_transaction.cc -@@ -2552,7 +2552,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) { +@@ -2554,7 +2554,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) { // blocking page is shown. An alternative would be to reverse-map the cert // status to a net error and replay the net error. if ((response_.headers->HasHeaderValue("cache-control", "no-store")) || diff --git a/patches/issue231.patch b/patches/issue231.patch index 80175a2f..c265759b 100644 --- a/patches/issue231.patch +++ b/patches/issue231.patch @@ -83,10 +83,10 @@ index 6a759309..ad620d7f 100644 + return PathService::Override(pref_key, file_path); +} diff --git libcef_dll/libcef_dll.cc libcef_dll/libcef_dll.cc -index cc1aafe5..bde00c09 100644 +index 1f037f92..b0274ad8 100644 --- libcef_dll/libcef_dll.cc +++ libcef_dll/libcef_dll.cc -@@ -930,6 +930,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) { +@@ -927,6 +927,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) { return _retval; } @@ -111,10 +111,10 @@ index cc1aafe5..bde00c09 100644 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING diff --git libcef_dll/wrapper/libcef_dll_wrapper.cc libcef_dll/wrapper/libcef_dll_wrapper.cc -index 08ddbd83..42e7dca1 100644 +index c4a1b559..a0b7765b 100644 --- libcef_dll/wrapper/libcef_dll_wrapper.cc +++ libcef_dll/wrapper/libcef_dll_wrapper.cc -@@ -851,6 +851,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) { +@@ -848,6 +848,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) { return _retval?true:false; } diff --git a/patches/issue251.patch b/patches/issue251.patch index 0c2ddc7d..e1e9bc4e 100644 --- a/patches/issue251.patch +++ b/patches/issue251.patch @@ -1,5 +1,5 @@ diff --git include/capi/cef_drag_data_capi.h include/capi/cef_drag_data_capi.h -index 5f86225..1684de2 100644 +index 2e84df8f..5b17e212 100644 --- include/capi/cef_drag_data_capi.h +++ include/capi/cef_drag_data_capi.h @@ -39,6 +39,7 @@ @@ -34,7 +34,7 @@ index 5f86225..1684de2 100644 diff --git include/cef_drag_data.h include/cef_drag_data.h -index 8f8094b..8b4602b 100644 +index 8f8094b4..8b4602b1 100644 --- include/cef_drag_data.h +++ include/cef_drag_data.h @@ -39,6 +39,7 @@ @@ -70,21 +70,21 @@ index 8f8094b..8b4602b 100644 }; #endif // CEF_INCLUDE_CEF_DRAG_DATA_H_ -diff --git libcef/browser/osr/web_contents_view_osr.cc libcef/browser/osr/web_contents_view_osr.cc -index c39a29c..8b3c30a 100644 ---- libcef/browser/osr/web_contents_view_osr.cc -+++ libcef/browser/osr/web_contents_view_osr.cc -@@ -6,6 +6,7 @@ - #include "libcef/browser/osr/web_contents_view_osr.h" +diff --git libcef/browser/osr/browser_platform_delegate_osr.cc libcef/browser/osr/browser_platform_delegate_osr.cc +index 2cf44f6d..2e6b8c32 100644 +--- libcef/browser/osr/browser_platform_delegate_osr.cc ++++ libcef/browser/osr/browser_platform_delegate_osr.cc +@@ -7,6 +7,7 @@ + #include #include "libcef/browser/browser_host_impl.h" +#include "libcef/browser/image_impl.h" #include "libcef/browser/osr/render_widget_host_view_osr.h" + #include "libcef/browser/osr/web_contents_view_osr.h" #include "libcef/common/drag_data_impl.h" - -@@ -230,7 +231,9 @@ void CefWebContentsViewOSR::StartDragging( - if (browser.get()) - handler = browser->GetClient()->GetRenderHandler(); +@@ -393,7 +394,9 @@ void CefBrowserPlatformDelegateOsr::StartDragging( + CefRefPtr handler = + browser_->GetClient()->GetRenderHandler(); if (handler.get()) { - CefRefPtr drag_data(new CefDragDataImpl(drop_data)); + CefRefPtr cef_image(new CefImageImpl(image)); @@ -94,7 +94,7 @@ index c39a29c..8b3c30a 100644 base::MessageLoop::ScopedNestableTaskAllower allow( base::MessageLoop::current()); diff --git libcef/common/drag_data_impl.cc libcef/common/drag_data_impl.cc -index 6b632ab..2f12b92 100644 +index 6b632ab2..2f12b928 100644 --- libcef/common/drag_data_impl.cc +++ libcef/common/drag_data_impl.cc @@ -20,6 +20,13 @@ CefDragDataImpl::CefDragDataImpl(const content::DropData& data) @@ -142,7 +142,7 @@ index 6b632ab..2f12b92 100644 + else return false; +} diff --git libcef/common/drag_data_impl.h libcef/common/drag_data_impl.h -index 64f29ed..9870726 100644 +index 64f29ed3..98707262 100644 --- libcef/common/drag_data_impl.h +++ libcef/common/drag_data_impl.h @@ -7,6 +7,7 @@ @@ -181,7 +181,7 @@ index 64f29ed..9870726 100644 // True if this object is read-only. bool read_only_; diff --git libcef_dll/cpptoc/drag_data_cpptoc.cc libcef_dll/cpptoc/drag_data_cpptoc.cc -index c36069e..ddb5729 100644 +index ffad1755..70a6c5c2 100644 --- libcef_dll/cpptoc/drag_data_cpptoc.cc +++ libcef_dll/cpptoc/drag_data_cpptoc.cc @@ -11,6 +11,7 @@ @@ -256,7 +256,7 @@ index c36069e..ddb5729 100644 template<> CefRefPtr CefCppToC