Allow specifying the arch of libchromiumcontent to download
This commit is contained in:
parent
5c9a1d9a43
commit
0deeae0214
2 changed files with 12 additions and 10 deletions
|
@ -14,14 +14,17 @@ DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
return (update_submodules() or
|
|
||||||
download_libchromiumcontent(args.dev, args.commit, args.url))
|
update_submodules()
|
||||||
|
download_libchromiumcontent(args.dev, args.commit, args.target_arch, args.url)
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
||||||
parser.add_argument('-c', '--commit', nargs='?', default='HEAD',
|
parser.add_argument('-c', '--commit', required=True,
|
||||||
help='The commit of libchromiumcontent to download.')
|
help='The commit of libchromiumcontent to download.')
|
||||||
|
parser.add_argument('-t', '--target_arch', required=True,
|
||||||
|
help='The arch of libchromiumcontent to download.')
|
||||||
parser.add_argument('-d', '--dev', action='store_true',
|
parser.add_argument('-d', '--dev', action='store_true',
|
||||||
help='Do not download static_library build')
|
help='Do not download static_library build')
|
||||||
parser.add_argument('url', help='The base URL from which to download '
|
parser.add_argument('url', help='The base URL from which to download '
|
||||||
|
@ -36,17 +39,16 @@ def update_submodules():
|
||||||
'--recursive']))
|
'--recursive']))
|
||||||
|
|
||||||
|
|
||||||
def download_libchromiumcontent(is_dev, commit, url):
|
def download_libchromiumcontent(is_dev, commit, target_arch, url):
|
||||||
mkdir_p(DOWNLOAD_DIR)
|
mkdir_p(DOWNLOAD_DIR)
|
||||||
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
||||||
'download')
|
'download')
|
||||||
target = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')
|
target_dir = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')
|
||||||
|
args = ['-f', '-c', commit, '-t', target_arch, url, target_dir]
|
||||||
if is_dev:
|
if is_dev:
|
||||||
subprocess.check_call([sys.executable, download, '-f', '-c', commit, url,
|
subprocess.check_call([sys.executable, download] + args)
|
||||||
target])
|
|
||||||
else:
|
else:
|
||||||
subprocess.check_call([sys.executable, download, '-s', '-f', '-c', commit,
|
subprocess.check_call([sys.executable, download, '-s'] + args)
|
||||||
url, target])
|
|
||||||
|
|
||||||
|
|
||||||
def mkdir_p(path):
|
def mkdir_p(path):
|
||||||
|
|
2
brightray/vendor/libchromiumcontent
vendored
2
brightray/vendor/libchromiumcontent
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit a325ed7b30bf0680881783edd92ca235b5468e11
|
Subproject commit 185a9535aa88ba19b03d3b76d172a9558ae37354
|
Loading…
Add table
Add a link
Reference in a new issue