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

Side by Side Diff: frog/scripts/bootstrap/build_frogpad_js.py

Issue 10548047: Remove frog from the repository. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move test and update apidoc.gyp. Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/reader.dart ('k') | frog/scripts/bootstrap/frog.bat » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2011 Google Inc. All Rights Reserved.
2
3 import os
4 import platform
5 import shutil
6 import stat
7 import sys
8
9 DART_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
10 os.pardir, os.pardir, os.pardir)
11 FROG_DIR = os.path.join(DART_DIR, "frog")
12
13 sys.path.append(FROG_DIR)
14 import frog
15
16 # Runs frog.dart on the dart vm to compile frogpad.dart to frogpad.js
17 def main(args):
18 product_dir = args[1]
19 frogpad_js = os.path.join(product_dir, 'frog', 'bin', 'frogpad.js')
20
21 if platform.system() == "Windows":
22 with open(frogpad_js, 'w') as f:
23 f.write("frogpad is not supported on Windows")
24 return 0
25
26 vm = os.path.join(product_dir, 'dart')
27 frogpad_dart = os.path.join(
28 DART_DIR, 'tools', 'testing', 'frogpad', 'frogpad.dart')
29
30 if not os.path.exists(vm):
31 raise Exception("cannot find dart vm '%s'" % vm)
32
33 args = ['frog.py',
34 '--verbose',
35 '--vm=' + vm,
36 '--',
37 '--out=' + frogpad_js,
38 frogpad_dart]
39
40 exit_code = frog.main(args)
41 if exit_code:
42 return exit_code
43
44 if not os.path.exists(frogpad_js):
45 raise Exception("didn't generate '%s'" % frogpad_js)
46
47 return 0
48
49
50 if __name__ == '__main__':
51 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « frog/reader.dart ('k') | frog/scripts/bootstrap/frog.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698