| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2013, 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 a build of the editor. | 7 # A script which will be invoked from gyp to create a build of the editor. |
| 8 # | 8 # |
| 9 # Usage: ./tools/create_editor.py | 9 # Usage: ./tools/create_editor.py |
| 10 # [--mode <mode>] [--arch <arch>] [--out <output>] [--build <build>] | 10 # [--mode <mode>] [--arch <arch>] [--out <output>] [--build <build>] |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 print build_cmd | 201 print build_cmd |
| 202 buildRcpStatus = subprocess.call(build_cmd, shell=utils.IsWindows()) | 202 buildRcpStatus = subprocess.call(build_cmd, shell=utils.IsWindows()) |
| 203 | 203 |
| 204 if buildRcpStatus != 0: | 204 if buildRcpStatus != 0: |
| 205 sys.exit(buildRcpStatus) | 205 sys.exit(buildRcpStatus) |
| 206 | 206 |
| 207 # build_rcp.xml will put the built editor archive in the OUTPUT directory | 207 # build_rcp.xml will put the built editor archive in the OUTPUT directory |
| 208 # (dart-editor-macosx.cocoa.x86.zip). It contains the editor application in a | 208 # (dart-editor-macosx.cocoa.x86.zip). It contains the editor application in a |
| 209 # dart/ subdirectory. We unzip the contents of the archive into OUTPUT. It | 209 # dart/ subdirectory. We unzip the contents of the archive into OUTPUT. It |
| 210 # will use the ../dart-sdk directory as its SDK. | 210 # will use the ../dart-sdk directory as its SDK. |
| 211 archives = glob.glob(join(OUTPUT, '*.zip')) | 211 archives = glob.glob(join(OUTPUT, 'd*.zip')) |
| 212 | 212 |
| 213 if archives: | 213 if archives: |
| 214 ProcessEditorArchive(arch, archives[0], OUTPUT) | 214 ProcessEditorArchive(arch, archives[0], OUTPUT) |
| 215 | 215 |
| 216 if os.path.exists(GetEditorTemp()): | 216 if os.path.exists(GetEditorTemp()): |
| 217 shutil.rmtree(GetEditorTemp()) | 217 shutil.rmtree(GetEditorTemp()) |
| 218 | 218 |
| 219 print('\nEditor build successful') | 219 print('\nEditor build successful') |
| 220 | 220 |
| 221 | 221 |
| 222 if __name__ == '__main__': | 222 if __name__ == '__main__': |
| 223 sys.exit(Main()) | 223 sys.exit(Main()) |
| OLD | NEW |