MCPcopy Create free account
hub / github.com/cztomczak/cefpython / fix_cef_include_files

Function fix_cef_include_files

tools/automate.py:704–719  ·  view source on GitHub ↗

Fixes to CEF include header files for eg. VS2008 on Windows.

()

Source from the content-addressed store, hash-verified

702
703
704def fix_cef_include_files():
705 """Fixes to CEF include header files for eg. VS2008 on Windows."""
706 # TODO: This was fixed in upstream CEF, remove this code during
707 # next CEF update on Windows.
708 if platform.system() == "Windows" and get_msvs_for_python() == "2008":
709 print("[automate.py] Fixing CEF include/ files")
710 # cef_types_wrappers.h
711 cef_types_wrappers = os.path.join(Options.cef_binary, "include",
712 "internal", "cef_types_wrappers.h")
713 with open(cef_types_wrappers, "rb") as fp:
714 contents = fp.read().decode("utf-8")
715 # error C2059: syntax error : '{'
716 contents = contents.replace("s->range = {0, 0};",
717 "s->range.from = 0; s->range.to = 0;")
718 with open(cef_types_wrappers, "wb") as fp:
719 fp.write(contents.encode("utf-8"))
720
721
722def create_prebuilt_binaries():

Callers 1

build_cef_projectsFunction · 0.85

Calls 1

get_msvs_for_pythonFunction · 0.85

Tested by

no test coverage detected