| Index: mojo/public/tools/download_dart_snapshotter.py
|
| diff --git a/mojo/public/tools/download_shell_binary.py b/mojo/public/tools/download_dart_snapshotter.py
|
| similarity index 80%
|
| copy from mojo/public/tools/download_shell_binary.py
|
| copy to mojo/public/tools/download_dart_snapshotter.py
|
| index 4710f7edf7d8a11f56aaedd43357fc928bd5f2d0..9420cc93a3963f41a2b2ebbc4d9842512c74a67d 100755
|
| --- a/mojo/public/tools/download_shell_binary.py
|
| +++ b/mojo/public/tools/download_dart_snapshotter.py
|
| @@ -11,15 +11,14 @@ import tempfile
|
| import zipfile
|
|
|
| BINARY_FOR_PLATFORM = {
|
| - "linux-x64" : "mojo_shell",
|
| - "android-arm" : "MojoShell.apk"
|
| + "linux-x64" : "dart_snapshotter",
|
| }
|
|
|
| CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
|
| sys.path.insert(0, os.path.join(CURRENT_PATH, "pylib"))
|
| import gs
|
|
|
| -PREBUILT_FILE_PATH = os.path.join(CURRENT_PATH, "prebuilt", "shell")
|
| +PREBUILT_FILE_PATH = os.path.join(CURRENT_PATH, "prebuilt", "dart_snapshotter")
|
|
|
|
|
| def download(tools_directory, version_file):
|
| @@ -38,11 +37,9 @@ def download(tools_directory, version_file):
|
| pass # If the stamp file does not exist we need to download new binaries.
|
|
|
| if sys.platform.startswith("linux"):
|
| - platforms = ["linux-x64", "android-arm"]
|
| - elif sys.platform == "darwin":
|
| - platforms = ["android-arm"]
|
| + platforms = ["linux-x64"]
|
| else:
|
| - print "No prebuilt shell available for %s" % sys.platform
|
| + print "No prebuilt dart_snapshotter available for %s" % sys.platform
|
| return 0
|
|
|
| for platform in platforms:
|
| @@ -60,7 +57,7 @@ def download_version_for_platform(version, platform, tools_directory):
|
| depot_tools_path = find_depot_tools.add_depot_tools_to_path()
|
|
|
| basename = platform + ".zip"
|
| - gs_path = "gs://mojo/shell/" + version + "/" + basename
|
| + gs_path = "gs://mojo/dart_snapshotter/" + version + "/" + basename
|
|
|
| with tempfile.NamedTemporaryFile() as temp_zip_file:
|
| gs.download_from_public_bucket(gs_path, temp_zip_file.name,
|
| @@ -75,8 +72,8 @@ def download_version_for_platform(version, platform, tools_directory):
|
|
|
|
|
| def main():
|
| - parser = argparse.ArgumentParser(description="Download mojo_shell binaries "
|
| - "from google storage")
|
| + parser = argparse.ArgumentParser(
|
| + description="Download dart_snapshotter binaries from google storage")
|
| parser.add_argument("--tools-directory",
|
| dest="tools_directory",
|
| metavar="<tools-directory>",
|
| @@ -91,9 +88,9 @@ def main():
|
| type=str,
|
| default="../VERSION",
|
| help="Path to the file containing the version of the "
|
| - "shell to be fetched, specified as a relative path "
|
| - "from the location of this file (default: "
|
| - "%(default)s).")
|
| + "dart_snapshotter to be fetched, specified as a"
|
| + "relative path from the location of this file "
|
| + "(default: %(default)s).")
|
| args = parser.parse_args()
|
| return download(args.tools_directory, args.version_file)
|
|
|
|
|