7 from lib.config import enable_verbose_mode, get_target_arch
8 from lib.util import execute_stdout
11 SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
22 # ./script/update -t x64 --defines=''
23 # ./script/build --no_shared_library -t x64
24 # ./script/create-dist -c static_library -t x64 --no_zip
25 script_dir = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
26 'libchromiumcontent', 'script')
27 bootstrap = os.path.join(script_dir, 'bootstrap')
28 update = os.path.join(script_dir, 'update')
29 build = os.path.join(script_dir, 'build')
30 create_dist = os.path.join(script_dir, 'create-dist')
31 execute_stdout([sys.executable, bootstrap])
32 execute_stdout([sys.executable, update, '-t', args.target_arch,
33 '--defines', args.defines])
34 execute_stdout([sys.executable, build, '-R', '-t', args.target_arch])
35 execute_stdout([sys.executable, create_dist, '-c', 'static_library',
36 '--no_zip', '-t', args.target_arch])
40 parser = argparse.ArgumentParser(description='Build libchromiumcontent')
41 parser.add_argument('--target_arch',
42 help='Specify the arch to build for')
43 parser.add_argument('--defines', default='',
44 help='The definetions passed to gyp')
45 parser.add_argument('-v', '--verbose', action='store_true',
46 help='Prints the output of the subprocesses')
47 return parser.parse_args()
50 if __name__ == '__main__':