| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
| 3 # | |
| 4 # Use of this source code is governed by a BSD-style license | |
| 5 # that can be found in the LICENSE file in the root of the source | |
| 6 # tree. An additional intellectual property rights grant can be found | |
| 7 # in the file PATENTS. All contributing project authors may | |
| 8 # be found in the AUTHORS file in the root of the source tree. | |
| 9 | |
| 10 """Script to download the Google Play Services SDK without its license prompt. | |
| 11 | |
| 12 This script needs to run after Chromium has been cloned and the link to //build | |
| 13 has been created. | |
| 14 """ | |
| 15 | |
| 16 import os | |
| 17 import subprocess | |
| 18 import sys | |
| 19 | |
| 20 | |
| 21 ROOT_DIR = os.path.abspath(os.path.join( | |
| 22 os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir)) | |
| 23 CR_DIR = os.path.join(ROOT_DIR, 'chromium') | |
| 24 | |
| 25 | |
| 26 def main(): | |
| 27 # Workaround to avoid license prompt for Google Play Services SDK | |
| 28 # See https://bugs.webrtc.org/5578 for more details. | |
| 29 play_services_script = os.path.join(CR_DIR, 'src', 'build', 'android', | |
| 30 'play_services', 'update.py') | |
| 31 if os.path.isfile(play_services_script): | |
| 32 env = os.environ.copy() | |
| 33 | |
| 34 # Fake we're a buildbot to avoid the Google Play Services license prompt. | |
| 35 env['CHROME_HEADLESS'] = '1' | |
| 36 subprocess.check_call([sys.executable, play_services_script, 'download'], | |
| 37 env=env) | |
| 38 else: | |
| 39 print 'Cannot find %s, skipping.' % play_services_script | |
| 40 | |
| 41 | |
| 42 if __name__ == '__main__': | |
| 43 sys.exit(main()) | |
| OLD | NEW |