From 1837d34fc20dc587b755a54f1a3a61e0470d638b Mon Sep 17 00:00:00 2001 From: cztomczak Date: Mon, 6 Mar 2017 12:58:56 +0100 Subject: [PATCH] Update to v56 on Windows (#276)... Minor fixes to tools, examples and build instructions. --- docs/Build-instructions.md | 13 ++++++------- examples/qt4.py | 3 +-- src/compile_time_constants.pxi | 2 +- src/version/cef_version_win.h | 20 ++++++++++---------- tools/automate.py | 10 ++++++---- tools/build.py | 5 +---- tools/common.py | 7 +++++++ 7 files changed, 32 insertions(+), 28 deletions(-) diff --git a/docs/Build-instructions.md b/docs/Build-instructions.md index ded592c3..5e2a414a 100644 --- a/docs/Build-instructions.md +++ b/docs/Build-instructions.md @@ -75,7 +75,7 @@ cd build/ 7) Install python dependencies: ``` -pip install -r ../tools/requirements.txt +pip install --upgrade -r ../tools/requirements.txt ``` 8) Download Windows binaries and libraries from @@ -119,7 +119,7 @@ cd build/ 5) Install python dependencies: ``` -sudo pip install -r ../tools/requirements.txt +sudo pip install --upgrade -r ../tools/requirements.txt ``` 6) Download Linux binaries and libraries from @@ -199,15 +199,14 @@ requirements common for all platforms. * MacOS 10.9+, Xcode5+ and Xcode command line tools. Only 64-bit builds are supported. -* Upgrade setuptools package to latest version otherwise there will be - problems with Cython: `sudo pip install --upgrade setuptools` ### All platforms -* Install dependencies for the automate.py tool by executing: - `cd tools/ && pip install -r requirements.txt` (on Linux use `sudo`). - This will install some PyPI packages including Cython. +* Install/update dependencies for the tools by executing: + `cd cefpython/tools/ && pip install --upgrade -r requirements.txt`. + On Linux use `sudo`. You should run it each time you update to newer + cefpython version to avoid issues. ## Build using prebuilt CEF binaries and libraries diff --git a/examples/qt4.py b/examples/qt4.py index dad875ca..d48ff45b 100644 --- a/examples/qt4.py +++ b/examples/qt4.py @@ -143,8 +143,7 @@ def focusInEvent(self, event): # stealing all focus due to Issue #284. if self.browser: if WINDOWS: - WindowUtils.OnSetFocus(self.cef_widget.getHandle(), - 0, 0, 0) + WindowUtils.OnSetFocus(self.getHandle(), 0, 0, 0) self.browser.SetFocus(True) def focusOutEvent(self, event): diff --git a/src/compile_time_constants.pxi b/src/compile_time_constants.pxi index 05306be6..10ec798a 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 = "Darwin" +DEF UNAME_SYSNAME = "Windows" DEF PY_MAJOR_VERSION = 2 diff --git a/src/version/cef_version_win.h b/src/version/cef_version_win.h index 3a20c3f4..5e718118 100644 --- a/src/version/cef_version_win.h +++ b/src/version/cef_version_win.h @@ -35,16 +35,16 @@ #ifndef CEF_INCLUDE_CEF_VERSION_H_ #define CEF_INCLUDE_CEF_VERSION_H_ -#define CEF_VERSION "3.2883.1553.g80bd606" +#define CEF_VERSION "3.2924.1575.g97389a9" #define CEF_VERSION_MAJOR 3 -#define CEF_COMMIT_NUMBER 1553 -#define CEF_COMMIT_HASH "80bd6062d7ac4c5fd1d7bc7ee78e8e59d4a040aa" +#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/automate.py b/tools/automate.py index 096abc9c..e3863f6e 100644 --- a/tools/automate.py +++ b/tools/automate.py @@ -221,20 +221,22 @@ def prebuilt_cef(): # Find cef_binary directory in the build directory if Options.cef_version: cef_binary = os.path.join(Options.build_dir, - "cef_binary_{cef_version}_*{sep}" + "cef_binary_{cef_version}_{os}{sep}" .format(cef_version=Options.cef_version, + os=CEF_POSTFIX2, sep=os.sep)) else: cef_binary = os.path.join(Options.build_dir, - "cef_binary_3.{cef_branch}.*{sep}" + "cef_binary_3.{cef_branch}.*_{os}{sep}" .format(cef_branch=Options.cef_branch, + os=CEF_POSTFIX2, sep=os.sep)) dirs = glob.glob(cef_binary) if len(dirs) == 1: Options.cef_binary = dirs[0] else: - print("ERROR: Could not find prebuilt binaries in the build dir.") - print(" Eg. cef_binary_3.2883.1553.g80bd606_windows32/") + print("ERROR: Could not find prebuilt binaries in the build dir:") + print(" {cef_binary}".format(cef_binary=cef_binary)) sys.exit(1) build_cef_projects() diff --git a/tools/build.py b/tools/build.py index 54b9c56e..05a0de6c 100644 --- a/tools/build.py +++ b/tools/build.py @@ -664,10 +664,7 @@ def build_cefpython_module(): # Move the cefpython module module_pattern = MODULE_NAME_TEMPLATE.format(pyversion=PYVERSION+"*", ext=MODULE_EXT) - if MAC: - module_pattern = "./build/lib*/"+module_pattern - else: - module_pattern = "./"+module_pattern + module_pattern = "./build/lib*/" + module_pattern move_file_by_pattern(module_pattern, os.path.join(CEFPYTHON_BINARY, MODULE_NAME)) diff --git a/tools/common.py b/tools/common.py index 40f79692..b71e0b26 100644 --- a/tools/common.py +++ b/tools/common.py @@ -10,16 +10,23 @@ # Architecture and OS postfixes ARCH32 = (8 * struct.calcsize('P') == 32) ARCH64 = (8 * struct.calcsize('P') == 64) +# OS_POSTFIX is for directories/files names in cefpython sources +# OS_POSTFIX2 is for platform name in cefpython binaries +# CEF_POSTFIX2 is for platform name in upstream CEF binaries OS_POSTFIX = ("win" if platform.system() == "Windows" else "linux" if platform.system() == "Linux" else "mac" if platform.system() == "Darwin" else "unknown") OS_POSTFIX2 = "unknown" +CEF_POSTFIX2 = "unknown" # Upstream CEF binaries postfix if OS_POSTFIX == "win": OS_POSTFIX2 = "win32" if ARCH32 else "win64" + CEF_POSTFIX2 = "windows32" if ARCH32 else "windows64" elif OS_POSTFIX == "mac": OS_POSTFIX2 = "mac32" if ARCH32 else "mac64" + CEF_POSTFIX2 = "macosx32" if ARCH32 else "macosx64" elif OS_POSTFIX == "linux": OS_POSTFIX2 = "linux32" if ARCH32 else "linux64" + CEF_POSTFIX2 = "linux32" if ARCH32 else "linux64" # Platforms WINDOWS = (platform.system() == "Windows")