2018-11-27 17:21:42 -05:00
|
|
|
import sys
|
|
|
|
from util import run
|
|
|
|
from third_party import tp, google_env
|
|
|
|
|
|
|
|
|
|
|
|
def download_v8_prebuilt():
|
|
|
|
if sys.platform == 'win32':
|
2018-11-30 02:25:59 -05:00
|
|
|
download_prebuilt("prebuilt/win/v8.lib.sha1")
|
|
|
|
# TODO Ideally we wouldn't have to download both builds of V8.
|
|
|
|
download_prebuilt("prebuilt/win/v8_debug.lib.sha1")
|
2018-11-27 17:21:42 -05:00
|
|
|
elif sys.platform.startswith('linux'):
|
2018-11-30 02:25:59 -05:00
|
|
|
download_prebuilt("prebuilt/linux64/libv8.a.sha1")
|
2018-11-27 17:21:42 -05:00
|
|
|
elif sys.platform == 'darwin':
|
2018-11-30 02:25:59 -05:00
|
|
|
download_prebuilt("prebuilt/mac/libv8.a.sha1")
|
2018-11-27 17:21:42 -05:00
|
|
|
|
2018-11-30 02:25:59 -05:00
|
|
|
|
|
|
|
def download_prebuilt(sha1_file):
|
2018-11-27 17:21:42 -05:00
|
|
|
run([
|
|
|
|
"python",
|
|
|
|
tp('depot_tools/download_from_google_storage.py'),
|
|
|
|
'--platform=' + sys.platform,
|
|
|
|
'--no_auth',
|
|
|
|
'--bucket=denoland',
|
|
|
|
'--sha1_file',
|
|
|
|
sha1_file,
|
|
|
|
],
|
|
|
|
env=google_env())
|
|
|
|
|
|
|
|
|
|
|
|
def load():
|
|
|
|
download_v8_prebuilt()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(load())
|