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

Side by Side Diff: samples/android/tools/build.py

Issue 11362103: Rotating spheres sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More cleanup Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file.
6 #
7
8 """Build, install, and launch a sample Android application that uses Dart."""
9
10 import os
11 import platform
12 import subprocess
13 import sys
14
15 SCRIPT_DIR = os.path.dirname(sys.argv[0])
16 PROJECT_DIR = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
17 DART_ROOT = os.path.realpath(os.path.join(PROJECT_DIR, '../..'))
18 THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party')
19 ADB = os.path.join(THIRD_PARTY_ROOT, 'android_tools/sdk/platform-tools/adb')
20
21 def Main():
22 if platform.system() != "Linux":
23 sys.stderr.write("Android Dart support currently only builds on Linux.\n")
24 return -1
25 os.chdir(DART_ROOT)
26 subprocess.check_call(
27 ["tools/build.py", "--os=android", "-m", "release", "samples"])
28 os.chdir(PROJECT_DIR)
29 subprocess.check_call(
30 [ADB, "install", "-r", "bin/DartActivity-debug.apk"])
31 subprocess.check_call(
32 [ADB, "shell", "am", "start", "-n",
33 "org.dartlang.example.dart/org.dartlang.example.dart.DartActivity"])
34 return 0
35
36 if __name__ == '__main__':
37 sys.exit(Main())
OLDNEW
« no previous file with comments | « samples/android/src/org/dartlang/example/dart/DartActivity.java ('k') | samples/sample_extension/sample_extension.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698