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

Side by Side Diff: tools/create_sdk.py

Issue 8972011: Fix paths in build process so we can build dartc (and then frog) on Windows. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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
« no previous file with comments | « tests/co19/co19-compiler.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 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 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. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 # A script which will be invoked from gyp to create an SDK. 7 # A script which will be invoked from gyp to create an SDK.
8 # 8 #
9 # Usage: create_sdk.py sdk_directory 9 # Usage: create_sdk.py sdk_directory
10 # 10 #
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if exists(SDK): 88 if exists(SDK):
89 rmtree(SDK) 89 rmtree(SDK)
90 90
91 # Create and populate sdk/bin. 91 # Create and populate sdk/bin.
92 BIN = join(SDK_tmp, 'bin') 92 BIN = join(SDK_tmp, 'bin')
93 os.makedirs(BIN) 93 os.makedirs(BIN)
94 94
95 # Copy the Dart VM binary into sdk/bin. 95 # Copy the Dart VM binary into sdk/bin.
96 # TODO(dgrove) - deal with architectures that are not ia32. 96 # TODO(dgrove) - deal with architectures that are not ia32.
97 build_dir = os.path.dirname(argv[1]) 97 build_dir = os.path.dirname(argv[1])
98 frogc_src_binary = join(HOME, 'frog', 'frogc')
99 frogc_dest_binary = join(BIN, 'frogc')
98 if utils.GuessOS() == 'win32': 100 if utils.GuessOS() == 'win32':
99 # TODO(dgrove) - deal with frogc.bat 101 # TODO(dgrove) - deal with frogc.bat
100 dart_src_binary = join(HOME, build_dir, 'dart.exe') 102 dart_src_binary = join(HOME, build_dir, 'dart.exe')
101 dart_dest_binary = join(BIN, 'dart.exe') 103 dart_dest_binary = join(BIN, 'dart.exe')
102 else: 104 else:
103 frogc_src_binary = join(HOME, 'frog', 'frogc')
104 dart_src_binary = join(HOME, build_dir, 'dart') 105 dart_src_binary = join(HOME, build_dir, 'dart')
105 dart_dest_binary = join(BIN, 'dart') 106 dart_dest_binary = join(BIN, 'dart')
106 frogc_dest_binary = join(BIN, 'frogc')
107 copyfile(dart_src_binary, dart_dest_binary) 107 copyfile(dart_src_binary, dart_dest_binary)
108 copymode(dart_src_binary, dart_dest_binary) 108 copymode(dart_src_binary, dart_dest_binary)
109 copyfile(frogc_src_binary, frogc_dest_binary) 109 copyfile(frogc_src_binary, frogc_dest_binary)
110 copymode(frogc_src_binary, frogc_dest_binary) 110 copymode(frogc_src_binary, frogc_dest_binary)
111 111
112 # Create sdk/bin/frogc.dart, and hack as needed. 112 # Create sdk/bin/frogc.dart, and hack as needed.
113 frog_src_dir = join(HOME, 'frog') 113 frog_src_dir = join(HOME, 'frog')
114 114
115 # Convert frogc.dart's imports from import('*') -> import('frog/*'). 115 # Convert frogc.dart's imports from import('*') -> import('frog/*').
116 frogc_contents = open(join(frog_src_dir, 'frogc.dart')).read() 116 frogc_contents = open(join(frog_src_dir, 'frogc.dart')).read()
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 UTIL = join(SDK_tmp, 'util') 373 UTIL = join(SDK_tmp, 'util')
374 os.makedirs(UTIL) 374 os.makedirs(UTIL)
375 375
376 copytree(join(HOME, 'utils', 'dartdoc'), join(UTIL, 'dartdoc'), 376 copytree(join(HOME, 'utils', 'dartdoc'), join(UTIL, 'dartdoc'),
377 ignore=ignore_patterns('.svn')) 377 ignore=ignore_patterns('.svn'))
378 378
379 move(SDK_tmp, SDK) 379 move(SDK_tmp, SDK)
380 380
381 if __name__ == '__main__': 381 if __name__ == '__main__':
382 sys.exit(Main(sys.argv)) 382 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « tests/co19/co19-compiler.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698