| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 def Modify64BitDartEditorIni(iniFilePath): | 78 def Modify64BitDartEditorIni(iniFilePath): |
| 79 f = open(iniFilePath, 'r') | 79 f = open(iniFilePath, 'r') |
| 80 lines = f.readlines() | 80 lines = f.readlines() |
| 81 f.close() | 81 f.close() |
| 82 lines[lines.index('-Xms40m\n')] = '-Xms256m\n' | 82 lines[lines.index('-Xms40m\n')] = '-Xms256m\n' |
| 83 lines[lines.index('-Xmx1024m\n')] = '-Xmx2000m\n' | 83 lines[lines.index('-Xmx1024m\n')] = '-Xmx2000m\n' |
| 84 # Add -d64 to give better error messages to user in 64 bit mode. | 84 # Add -d64 to give better error messages to user in 64 bit mode. |
| 85 lines[lines.index('-vmargs\n')] = '-vmargs\n-d64\n' | 85 lines[lines.index('-vmargs\n')] = '-vmargs\n-d64\n' |
| 86 f = open(iniFilePath, 'w') | 86 f = open(iniFilePath, 'w') |
| 87 f.writelines(lines); | 87 f.writelines(lines) |
| 88 f.close() | 88 f.close() |
| 89 | 89 |
| 90 | 90 |
| 91 def GetEditorTemp(): | 91 def GetEditorTemp(): |
| 92 return join(BUILD, 'editor.build.temp') | 92 return join(BUILD, 'editor.build.temp') |
| 93 | 93 |
| 94 | 94 |
| 95 def GetDownloadCache(): | 95 def GetDownloadCache(): |
| 96 return GetEclipseBuildRoot() | 96 return GetEclipseBuildRoot() |
| 97 | 97 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |