Fixes to CEF include header files for eg. VS2008 on Windows.
()
| 702 | |
| 703 | |
| 704 | def 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 | |
| 722 | def create_prebuilt_binaries(): |
no test coverage detected