Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(773)

Unified Diff: sky/tools/skydb

Issue 1131373005: Have shelldb and skydb automatically download assets for you (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tools/shelldb ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/skydb
diff --git a/sky/tools/skydb b/sky/tools/skydb
index 22194295cc00c602c98575f7fdfb3e467c385600..faac8bac7c0dec18c8e9ca679836410bfe045b43 100755
--- a/sky/tools/skydb
+++ b/sky/tools/skydb
@@ -58,6 +58,17 @@ def gn_args_from_build_dir(build_dir):
return config
+def ensure_assets_are_downloaded(build_dir):
+ sky_pkg_dir = os.path.join(build_dir, 'gen', 'dart-pkg', 'sky')
+ sky_pkg_lib_dir = os.path.join(sky_pkg_dir, 'lib')
+ sky_icons_dir = \
+ os.path.join(sky_pkg_lib_dir, 'assets', 'material-design-icons')
+ if not os.path.isdir(sky_icons_dir):
+ logging.info('NOTE: sky/assets/material-design-icons missing, '
+ 'Running `download_material_design_icons` for you.')
+ subprocess.check_call(
+ [os.path.join(sky_pkg_lib_dir, 'download_material_design_icons')])
+
class SkyDebugger(object):
def __init__(self):
self.pids = {}
@@ -180,6 +191,8 @@ class SkyDebugger(object):
gn_args = gn_args_from_build_dir(self.paths.build_dir)
is_android = 'android_sdk_version' in gn_args
+ ensure_assets_are_downloaded(args.build_dir)
+
shell_found = True
if is_android:
apk_path = os.path.join(self.paths.build_dir, 'apks', ANDROID_APK_NAME)
« no previous file with comments | « sky/tools/shelldb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698