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

Function compile_cpp_projects_unix

tools/build.py:526–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

524
525
526def compile_cpp_projects_unix():
527 print("[build.py] Compile C++ projects")
528 if CLEAN_FLAG:
529 print("[build.py] Clean C++ projects (--clean flag passed)")
530 clean_cpp_projects_unix()
531
532 # Need to allow continuing even when make fails, as it may
533 # fail because the "public" function declaration is not yet
534 # in cefpython API header file, but for it to be generated we need
535 # to run cython compiling, so in this case you continue even when
536 # make fails and then run the compile.py script again and this time
537 # make should succeed.
538
539 # -- CLIENT_HANDLER
540 print("[build.py] ~~ Build CLIENT_HANDLER project")
541
542 os.chdir(CLIENT_HANDLER_DIR)
543 if not FAST_FLAG:
544 subprocess.call("rm -f *.o *.a", shell=True)
545
546 ret = subprocess.call("make -f Makefile", shell=True)
547 if ret != 0:
548 compile_ask_to_continue()
549
550 # -- LIBCEFPYTHONAPP
551 print("[build.py] ~~ Build LIBCEFPYTHONAPP project")
552
553 os.chdir(SUBPROCESS_DIR)
554 if not FAST_FLAG:
555 subprocess.call("rm -f *.o *.a", shell=True)
556 subprocess.call("rm -f subprocess", shell=True)
557
558 ret = subprocess.call("make -f Makefile-libcefpythonapp", shell=True)
559 if ret != 0:
560 compile_ask_to_continue()
561
562 # -- SUBPROCESS
563 print("[build.py] ~~ Build SUBPROCESS project")
564 ret = subprocess.call("make -f Makefile", shell=True)
565 if ret != 0:
566 compile_ask_to_continue()
567
568 # Copy subprocess executable
569 subprocess_from = os.path.join(SUBPROCESS_DIR, "subprocess")
570 subprocess_to = os.path.join(CEFPYTHON_BINARY, "subprocess")
571 if os.path.exists(subprocess_from):
572 # shutil.copy() will also copy Permission bits
573 shutil.copy(subprocess_from, subprocess_to)
574
575 # -- CPP_UTILS
576 print("[build.py] ~~ Build CPP_UTILS project")
577
578 os.chdir(CPP_UTILS_DIR)
579 if not FAST_FLAG:
580 subprocess.call("rm -f *.o *.a", shell=True)
581
582 ret = subprocess.call("make -f Makefile", shell=True)
583 if ret != 0:

Callers 1

mainFunction · 0.85

Calls 3

clean_cpp_projects_unixFunction · 0.85
compile_ask_to_continueFunction · 0.85
copyMethod · 0.80

Tested by

no test coverage detected