From 7cbfb05f216a8d0b9a06adfbf2714f8c2a4b9952 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Fri, 13 Mar 2015 16:58:53 -0700 Subject: [PATCH] Currently we use package: to mean "/gen", which is not at all how Dart actually expects package: to work. This CL makes package:foo map to /packages/foo, similar to how Dartium or bin/dart would expect. This also means overlaying the /gen directory over the actual package outputs (as consumers of an SDK would expect) as well as adding an additional /lib indirection for the actual package source as the Dart pub tool will expect. This is far from perfect, but it unlocks us actually producing a sky SDK. I expect there may be some fallout from this change as I'm sure I missed some package: uses. We also don't have a general solution for all /foo/bar/baz includes which randomly included parts of mojo's source directory. Those will need to be updated to use a package: and deploy_sdk.py taught how to build a package for them. R=abarth@chromium.org Review URL: https://codereview.chromium.org/990493002 --- engine/src/flutter/SDK.md | 39 ++-- .../flutter/tests/services/event-sender.sky | 2 +- .../tests/services/iframe-embed-vmc.sky | 7 +- engine/src/flutter/tools/deploy_sdk.py | 205 ++++++++++++++++++ engine/src/flutter/tools/skydb | 18 +- engine/src/flutter/tools/skygo/sky_server.go | 6 +- .../src/flutter/tools/skygo/sky_server.sha1 | 2 +- engine/src/flutter/tools/skypy/skyserver.py | 4 +- 8 files changed, 257 insertions(+), 26 deletions(-) create mode 100755 engine/src/flutter/tools/deploy_sdk.py diff --git a/engine/src/flutter/SDK.md b/engine/src/flutter/SDK.md index f70a03cd78..76e8cd9856 100644 --- a/engine/src/flutter/SDK.md +++ b/engine/src/flutter/SDK.md @@ -6,34 +6,41 @@ iterating on Sky heavily, which means the framework and underlying engine are both likely to change in incompatible ways several times, but if you're interested in trying out the system, this document can help you get started. +Set up your computer +-------------------- + +1. Install the Dart SDK: + - https://www.dartlang.org/tools/download.html + +2. Install the ``adb`` tool from the Android SDK: + - https://developer.android.com/sdk/installing/index.html + +3. Install the Sky SDK: + - ``git clone https://github.com/domokit/sky_sdk.git`` + +4. Ensure sure $DART_SDK is set to the path of your Dart SDK and 'adb' + (inside 'platform-tools' in the android sdk) is in your $PATH. + + Set up your device ------------------ Currently Sky requires an Android device running the Lollipop (or newer) version of the Android operating system. -1. Install ``Sky`` on your device by via the Play Store. The Sky app on your - device is capable of displaying applications written using Sky. - -2. Enable developer mode on your device by visiting ``Settings > About phone`` +1. Enable developer mode on your device by visiting ``Settings > About phone`` and tapping the ``Build number`` field five times. -3. Enable ``USB debugging`` in ``Settings > Developer options``. - -Set up your computer --------------------- - -1. Install the ``adb`` tool from the Android SDK. - - Mac: ``brew install android-platform-tools`` - - Linux: ``sudo apt-get install android-tools-adb`` - -2. Download the Sky framework: - - ``git clone https://github.com/domokit/sky-sdk.git`` +2. Enable ``USB debugging`` in ``Settings > Developer options``. 3. Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device. + Running a Sky application ------------------------- -1. ``/path/to/sky-sdk/shelldb myapp.sky && adb logcat`` +1. ``sky_sdk/bin/sky --install sky_sdk/examples/index.sky`` + The --install flag is only necessary the first time to install SkyDemo.apk. + +2. Use ``adb logcat`` to view any errors or Dart print() output from the app. \ No newline at end of file diff --git a/engine/src/flutter/tests/services/event-sender.sky b/engine/src/flutter/tests/services/event-sender.sky index 6c58ef9c1e..2d039b0b5e 100644 --- a/engine/src/flutter/tests/services/event-sender.sky +++ b/engine/src/flutter/tests/services/event-sender.sky @@ -3,10 +3,10 @@