Build cefclient, cefsimple, ceftests, libcef_dll_wrapper.
()
| 368 | |
| 369 | |
| 370 | def build_cef_projects(): |
| 371 | """Build cefclient, cefsimple, ceftests, libcef_dll_wrapper.""" |
| 372 | print("[automate.py] Build cef projects...") |
| 373 | |
| 374 | if WINDOWS: |
| 375 | fix_cmake_variables_permanently_windows() |
| 376 | |
| 377 | fix_cef_include_files() |
| 378 | |
| 379 | # Find cef_binary directory. |
| 380 | # Might already be set if --prebuilt-cef flag was passed. |
| 381 | if not Options.cef_binary: |
| 382 | if platform.system() == "Windows": |
| 383 | files = glob.glob(os.path.join(Options.binary_distrib, |
| 384 | "cef_binary_*_symbols")) |
| 385 | assert len(files) == 1, ("More than one dir with release" |
| 386 | " symbols found") |
| 387 | symbols = files[0] |
| 388 | if Options.release_build: |
| 389 | cef_binary = symbols.replace("_release_symbols", "") |
| 390 | else: |
| 391 | cef_binary = symbols.replace("_debug_symbols", "") |
| 392 | assert "symbols" not in os.path.basename(cef_binary) |
| 393 | else: |
| 394 | postfix2 = CEF_POSTFIX2 |
| 395 | if Options.x86: |
| 396 | postfix2 = get_cef_postfix2_for_arch("32bit") |
| 397 | files = glob.glob(os.path.join(Options.binary_distrib, |
| 398 | "cef_binary_*_"+postfix2)) |
| 399 | assert len(files) == 1, "Error finding binary distrib" |
| 400 | cef_binary = files[0] |
| 401 | assert os.path.exists(cef_binary) |
| 402 | Options.cef_binary = cef_binary |
| 403 | |
| 404 | # Set build directory |
| 405 | build_cefclient_dir = os.path.join(Options.cef_binary, |
| 406 | "build_cefclient") |
| 407 | cefclient_exe = os.path.join(build_cefclient_dir, "tests", "cefclient", |
| 408 | Options.build_type, |
| 409 | "cefclient" + APP_EXT) |
| 410 | |
| 411 | # Check whether already built |
| 412 | already_built = False |
| 413 | if os.path.exists(cefclient_exe): |
| 414 | already_built = True |
| 415 | elif os.path.exists(build_cefclient_dir): |
| 416 | # Last build failed, clean directory |
| 417 | assert build_cefclient_dir |
| 418 | shutil.rmtree(build_cefclient_dir) |
| 419 | print("[automate.py] Create build_cefclient/ dir in cef_binary*/ dir") |
| 420 | os.makedirs(build_cefclient_dir) |
| 421 | else: |
| 422 | print("[automate.py] Create build_cefclient/ dir in cef_binary*/ dir") |
| 423 | os.makedirs(build_cefclient_dir) |
| 424 | |
| 425 | # Build cefclient, cefsimple, ceftests |
| 426 | if already_built: |
| 427 | print("[automate.py] Already built: cefclient, cefsimple, ceftests") |
no test coverage detected