-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcefapp-vercheck.py
executable file
·42 lines (34 loc) · 1.39 KB
/
cefapp-vercheck.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env vpython3
import os
top = os.path.join(os.getcwd(), "bin")
from cefct import libcefdef
libcefdef.LoadLibrary(os.path.join(top, "libcef" + libcefdef.dllext))
from cefct import libcef as cef
from cefct import libcefinternal as cefi
from cefct import libcefsizes
print("cef_version_info {}.{}.{}.{}".format(
cefi.cef_version_info(0),
cefi.cef_version_info(1),
cefi.cef_version_info(2),
cefi.cef_version_info(3),
))
print("chrome_version_info {}.{}.{}.{}".format(
cefi.cef_version_info(4),
cefi.cef_version_info(5),
cefi.cef_version_info(6),
cefi.cef_version_info(7),
))
hashname = ["platform", "universal", "commit"]
for i in range(3):
v = ''.join(map(chr, cefi.cef_api_hash(i)[:40]))
print("hash({})= {}".format(hashname[i], v))
assert cefi.CEF_VERSION_MAJOR == cefi.cef_version_info(0)
assert cefi.CEF_VERSION_MINOR == cefi.cef_version_info(1)
assert cefi.CEF_VERSION_PATCH == cefi.cef_version_info(2)
assert cefi.CEF_COMMIT_NUMBER == cefi.cef_version_info(3)
assert cefi.CHROME_VERSION_MAJOR == cefi.cef_version_info(4)
assert cefi.CHROME_VERSION_MINOR == cefi.cef_version_info(5)
assert cefi.CHROME_VERSION_BUILD == cefi.cef_version_info(6)
assert cefi.CHROME_VERSION_PATCH == cefi.cef_version_info(7)
assert cefi.CEF_COMMIT_HASH == ''.join(map(chr, cefi.cef_api_hash(2)[:40]))
#assert cefi.CEF_COMMIT_HASH == bytes(cefi.cef_api_hash(2)[:40]).decode("ascii")