From a23ffd7a1bb815a1120c37e162705734bb4f827b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 9 Nov 2015 18:24:32 +0800 Subject: [PATCH] Rely on "download" script for argument verification --- script/bootstrap.py | 41 +++++++++-------------------------------- vendor/brightray | 2 +- 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/script/bootstrap.py b/script/bootstrap.py index c9a3b32ed49..ef48c1f8023 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -26,24 +26,6 @@ def main(): os.chdir(SOURCE_ROOT) args = parse_args() - if (args.libcc_source_path != None and - args.libcc_shared_library_path != None and - args.libcc_static_library_path != None): - if (not os.path.isdir(args.libcc_source_path)): - print "Error: Directory does not exist:", args.libcc_source_path - sys.exit(0) - elif (not os.path.isdir(args.libcc_shared_library_path)): - print "Error: Directory does not exist:", args.libcc_shared_library_path - sys.exit(0) - elif (not os.path.isdir(args.libcc_static_library_path)): - print "Error: Directory does not exist:", args.libcc_static_library_path - sys.exit(0) - elif (args.libcc_source_path != None or - args.libcc_shared_library_path != None or - args.libcc_static_library_path != None): - print "Error: All options of libchromiumcontent are required OR let " \ - "electron choose it" - sys.exit(0) if not args.yes and PLATFORM != 'win32': check_root() if args.verbose: @@ -58,8 +40,7 @@ def main(): setup_python_libs() update_node_modules('.') bootstrap_brightray(args.dev, args.url, args.target_arch, - args.libcc_source_path, - args.libcc_shared_library_path, + args.libcc_source_path, args.libcc_shared_library_path, args.libcc_static_library_path) if args.target_arch in ['arm', 'ia32'] and PLATFORM == 'linux': @@ -91,17 +72,13 @@ def parse_args(): parser.add_argument('--target_arch', default=get_target_arch(), help='Manually specify the arch to build for') parser.add_argument('--libcc_source_path', required=False, - help='The source path of libchromiumcontent. ' \ - 'NOTE: All options of libchromiumcontent are ' - 'required OR let electron choose it') + help='The source path of libchromiumcontent. ' \ + 'NOTE: All options of libchromiumcontent are ' \ + 'required OR let electron choose it') parser.add_argument('--libcc_shared_library_path', required=False, - help='The shared library path of libchromiumcontent. ' \ - 'NOTE: All options of libchromiumcontent are ' \ - 'required OR let electron choose it') + help='The shared library path of libchromiumcontent.') parser.add_argument('--libcc_static_library_path', required=False, - help='The static library path of libchromiumcontent. ' \ - 'NOTE: All options of libchromiumcontent are ' \ - 'required OR let electron choose it') + help='The static library path of libchromiumcontent.') return parser.parse_args() @@ -138,9 +115,9 @@ def bootstrap_brightray(is_dev, url, target_arch, libcc_source_path, if (libcc_source_path != None and libcc_shared_library_path != None and libcc_static_library_path != None): - args = args + ['--libcc_source_path', libcc_source_path, - '--libcc_shared_library_path', libcc_shared_library_path, - '--libcc_static_library_path', libcc_static_library_path] + args += ['--libcc_source_path', libcc_source_path, + '--libcc_shared_library_path', libcc_shared_library_path, + '--libcc_static_library_path', libcc_static_library_path] execute_stdout([sys.executable, bootstrap] + args) diff --git a/vendor/brightray b/vendor/brightray index 3773af58a20..80543fe2b0f 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 3773af58a204c5899cc811d58f831466549277bf +Subproject commit 80543fe2b0fc04b5096b1ba7ebb9553431d8dfc0