From 28828651ee0cba6638989dca253ca56f29598afd Mon Sep 17 00:00:00 2001 From: cztomczak Date: Mon, 13 Mar 2017 20:51:47 +0100 Subject: [PATCH] Update to Chromium v56 on Linux Part 2 (#276)... Everything builds and runs fine now. tools/build.py works fine on Linux (#299). --- docs/Build-instructions.md | 2 +- src/compile_time_constants.pxi | 4 ++-- src/subprocess/Makefile | 8 +++----- src/version/cef_version_linux.h | 20 +++++++++---------- tools/build.py | 35 +++++++++++++++++++-------------- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/docs/Build-instructions.md b/docs/Build-instructions.md index 832e0f96..1b0cc0e2 100644 --- a/docs/Build-instructions.md +++ b/docs/Build-instructions.md @@ -348,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-chromeos-fonts --no-nacl +sudo ./install-build-deps.sh --no-chromeos-fonts --no-nacl --no-arm ``` After dependencies are satisifed re-run automate.py. diff --git a/src/compile_time_constants.pxi b/src/compile_time_constants.pxi index 632aab59..35f85002 100644 --- a/src/compile_time_constants.pxi +++ b/src/compile_time_constants.pxi @@ -1,3 +1,3 @@ # This file was generated by setup.py -DEF UNAME_SYSNAME = "Windows" -DEF PY_MAJOR_VERSION = 3 +DEF UNAME_SYSNAME = "Linux" +DEF PY_MAJOR_VERSION = 2 diff --git a/src/subprocess/Makefile b/src/subprocess/Makefile index 1ed3b15c..580cb784 100644 --- a/src/subprocess/Makefile +++ b/src/subprocess/Makefile @@ -27,13 +27,11 @@ INC = -I./../ -I./../common/ -I/usr/include/python2.7 \ -I/usr/lib/glib-2.0/include ifeq ($(UNAME_S), Linux) - LIB_DIRS = -L./../../build/cef_linux64/bin \ - -L./../../build/cef_linux32/bin \ - -L./../../build/cef_linux64/lib \ - -L./../../build/cef_linux32/lib + LIB_DIRS = -L$(CEF_BIN) \ + -L$(CEF_LIB) else ifeq ($(UNAME_S), Darwin) LIB_DIRS = -F$(CEF_BIN) \ - -L$(CEF_LIB) + -L$(CEF_LIB) endif ifeq ($(UNAME_S), Linux) diff --git a/src/version/cef_version_linux.h b/src/version/cef_version_linux.h index 39126c00..5e718118 100644 --- a/src/version/cef_version_linux.h +++ b/src/version/cef_version_linux.h @@ -35,16 +35,16 @@ #ifndef CEF_INCLUDE_CEF_VERSION_H_ #define CEF_INCLUDE_CEF_VERSION_H_ -#define CEF_VERSION "3.2883.1554.gf984155" +#define CEF_VERSION "3.2924.1575.g97389a9" #define CEF_VERSION_MAJOR 3 -#define CEF_COMMIT_NUMBER 1554 -#define CEF_COMMIT_HASH "f984155b3f0ad80833742d17cdab2065f3ec75ce" +#define CEF_COMMIT_NUMBER 1575 +#define CEF_COMMIT_HASH "97389a92ee2309ded830338d6afd61ba109d31d8" #define COPYRIGHT_YEAR 2017 -#define CHROME_VERSION_MAJOR 55 +#define CHROME_VERSION_MAJOR 56 #define CHROME_VERSION_MINOR 0 -#define CHROME_VERSION_BUILD 2883 -#define CHROME_VERSION_PATCH 87 +#define CHROME_VERSION_BUILD 2924 +#define CHROME_VERSION_PATCH 76 #define DO_MAKE_STRING(p) #p #define MAKE_STRING(p) DO_MAKE_STRING(p) @@ -63,13 +63,13 @@ extern "C" { // universal hash value will change if any platform is affected whereas the // platform hash values will change only if that particular platform is // affected. -#define CEF_API_HASH_UNIVERSAL "87b7eefcb86c87b28f86bfd7919f7d7a6cffc0d8" +#define CEF_API_HASH_UNIVERSAL "66de193ba22e1d92a99bb29d60f3107709aeefda" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "00823905486d7b7222da5654fe35d2d15f65543a" +#define CEF_API_HASH_PLATFORM "8055740cd08db66cefe838a826dc90806fadfb33" #elif defined(OS_MACOSX) -#define CEF_API_HASH_PLATFORM "f0180f006643782254250f34e858b98110a40e6e" +#define CEF_API_HASH_PLATFORM "12d8ab423df369b68d37c3667123a1812bc0d345" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "14b19454a4231fa10a77b8955954dc95f073af6b" +#define CEF_API_HASH_PLATFORM "86ab23c0d7dafbdff7f66764cf8dac5ec1712af4" #endif // Returns CEF version information for the libcef library. The |entry| diff --git a/tools/build.py b/tools/build.py index 0319a2ea..df0355b4 100644 --- a/tools/build.py +++ b/tools/build.py @@ -23,12 +23,13 @@ Options: VERSION Version number eg. 50.0 --no-run-examples Do not run examples after build, only unit tests - --rebuild-cpp Force rebuild of .vcproj C++ projects (DISABLED) --fast Fast mode --clean Clean C++ projects build files on Linux/Mac --kivy Run only Kivy example """ +# --rebuild-cpp Force rebuild of .vcproj C++ projects (DISABLED) + # How to debug on Linux: # 1. Install "python-dbg" package # 2. Install "python-wxgtk2.8-dbg" package @@ -236,7 +237,7 @@ def setup_environ(): pass # Mac env variables for makefiles - if MAC: + if MAC or LINUX: os.environ["CEF_BIN"] = os.path.join(CEF_BINARIES_LIBRARIES, "bin") os.environ["CEF_LIB"] = os.path.join(CEF_BINARIES_LIBRARIES, "lib") @@ -306,29 +307,33 @@ def fix_cefpython_api_header_file(): print("[build.py] cefpython API header file was not yet generated") return + # Original contents with open(CEFPYTHON_API_HFILE, "rb") as fo: contents = fo.read().decode("utf-8") - already_fixed = False - pragma = "#pragma warning(disable:4190)" - if pragma in contents: - already_fixed = True - print("[build.py] cefpython API header file is already fixed") - else: - if not MAC: + # Pragma fix on Windows + if WINDOWS: + already_fixed = False + pragma = "#pragma warning(disable:4190)" + if pragma in contents: + already_fixed = True + print("[build.py] cefpython API header file is already fixed") + else: contents = ("%s\n\n" % pragma) + contents + with open(CEFPYTHON_API_HFILE, "wb") as fo: + fo.write(contents.encode("utf-8")) + print("[build.py] Save {filename}" + .format(filename=CEFPYTHON_API_HFILE)) - if not already_fixed: - with open(CEFPYTHON_API_HFILE, "wb") as fo: - fo.write(contents.encode("utf-8")) - print("[build.py] Save {filename}" - .format(filename=CEFPYTHON_API_HFILE)) - + # Make a copy with a "_fixed" postfix if os.path.exists(CEFPYTHON_API_HFILE_FIXED): with open(CEFPYTHON_API_HFILE_FIXED, "rb") as fo: contents_fixed = fo.read().decode("utf-8") else: contents_fixed = "" + + # Resave fixed copy only if contents changed. Other scripts + # depend on "modified time" of the "_fixed" file. if contents != contents_fixed: print("[build.py] Save cefpython_fixed.h") with open(CEFPYTHON_API_HFILE_FIXED, "wb") as fo: