Skip to content

Commit

Permalink
Update to v56 on Windows (#276)...
Browse files Browse the repository at this point in the history
Minor fixes to tools, examples and build instructions.
  • Loading branch information
cztomczak committed Mar 6, 2017
1 parent 0e83395 commit 1837d34
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 28 deletions.
13 changes: 6 additions & 7 deletions docs/Build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions examples/qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion src/compile_time_constants.pxi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file was generated by setup.py
DEF UNAME_SYSNAME = "Darwin"
DEF UNAME_SYSNAME = "Windows"
DEF PY_MAJOR_VERSION = 2
20 changes: 10 additions & 10 deletions src/version/cef_version_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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|
Expand Down
10 changes: 6 additions & 4 deletions tools/automate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 1 addition & 4 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
7 changes: 7 additions & 0 deletions tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1837d34

Please sign in to comment.