Chromium Code Reviews| Index: tools/create_editor.py |
| diff --git a/tools/create_editor.py b/tools/create_editor.py |
| index 6c9596387cf9127866722b25cd99cdf9ba02fff7..4394c7ddce9b0f4632758ad5d7570cad04d7f4fe 100644 |
| --- a/tools/create_editor.py |
| +++ b/tools/create_editor.py |
| @@ -45,7 +45,7 @@ def AntPath(): |
| return join(parent, 'ant') |
| -def ProcessEditorArchive(archive, outDir): |
| +def ProcessEditorArchive(arch, archive, outDir): |
| tempDir = join(GetEditorTemp(), 'editor.out') |
| try: |
| os.makedirs(tempDir) |
| @@ -60,6 +60,13 @@ def ProcessEditorArchive(archive, outDir): |
| else: |
| subprocess.call(['unzip', '-q', archive, '-d', tempDir]) |
| + if arch == 'x64': |
| + if utils.GuessOS() == 'macos': |
| + inifile = join(tempDir, 'dart', 'DartEditor.app', 'Contents', 'MacOS', 'DartEditor.ini') |
|
ricow1
2013/09/26 17:35:40
long line
danrubel
2013/09/26 18:28:45
Done.
|
| + else: |
| + inifile = join(tempDir, 'dart', 'DartEditor.ini') |
| + Modify64BitDartEditorIni(inifile) |
| + |
| for src in glob.glob(join(tempDir, 'dart', '*')): |
| shutil.move(src, outDir) |
| @@ -67,6 +74,17 @@ def ProcessEditorArchive(archive, outDir): |
| os.unlink(archive) |
| +def Modify64BitDartEditorIni(iniFilePath): |
|
ricow1
2013/09/26 17:35:40
You could make this slightly more generic in case
danrubel
2013/09/26 18:28:45
Good idea for a future CL.
|
| + f = open(iniFilePath, 'r') |
| + lines = f.readlines() |
| + f.close() |
| + lines[lines.index('-Xms40m\n')] = '-Xms256m\n' |
| + lines[lines.index('-Xmx1000m\n')] = '-Xmx2000m\n' |
| + f = open(iniFilePath, 'w') |
| + f.writelines(lines); |
| + f.close() |
| + |
| + |
| def GetEditorTemp(): |
| return join(BUILD, 'editor.build.temp') |
| @@ -188,7 +206,7 @@ def Main(): |
| archives = glob.glob(join(OUTPUT, '*.zip')) |
| if archives: |
| - ProcessEditorArchive(archives[0], OUTPUT) |
| + ProcessEditorArchive(arch, archives[0], OUTPUT) |
| if os.path.exists(GetEditorTemp()): |
| shutil.rmtree(GetEditorTemp()) |