Chromium Code Reviews| Index: editor/build/build.py |
| diff --git a/editor/build/build.py b/editor/build/build.py |
| index 7fa227834007297c27a8959d9dec11c73c47b39b..91d42ae59e3fea7285fe88d759ae9dd54f632c03 100755 |
| --- a/editor/build/build.py |
| +++ b/editor/build/build.py |
| @@ -868,6 +868,32 @@ def PostProcessEditorBuilds(out_dir): |
| print(' processing %s' % basename) |
| + # adjust memory params for 64 bit versions |
| + if (basename.endswith('-64.zip')): |
| + if (basename.startswith('darteditor-macos-')): |
| + inifile = join('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('dart', 'DartEditor.ini') |
| + |
| + if (basename.startswith('darteditor-win32-')): |
| + f = zipfile.ZipFile(zipFile) |
| + f.extract(inifile) |
| + f.close() |
| + else: |
|
ricow1
2013/09/26 17:35:40
why do we do it differently on windows and mac
danrubel
2013/09/26 18:28:45
I am following what's been done before in tools/cr
|
| + subprocess.call(['unzip', zipFile, inifile], env=os.environ) |
| + |
| + Modify64BitDartEditorIni(inifile) |
| + |
| + if (basename.startswith('darteditor-win32-')): |
| + f = zipfile.ZipFile(zipFile) |
| + f.write(inifile) |
| + f.close() |
| + else: |
| + subprocess.call(['zip', '-d', zipFile, inifile], env=os.environ) |
| + subprocess.call(['zip', '-q', zipFile, inifile], env=os.environ) |
| + |
| + os.remove(inifile) |
| + |
| # post-process the info.plist file |
| if (basename.startswith('darteditor-macos-')): |
| infofile = join('dart', 'DartEditor.app', 'Contents', 'Info.plist') |
| @@ -880,6 +906,17 @@ def PostProcessEditorBuilds(out_dir): |
| os.remove(infofile) |
| +def Modify64BitDartEditorIni(iniFilePath): |
| + 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 RunEditorTests(buildout, buildos): |
| StartBuildStep('run_tests') |