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

Unified Diff: tools/create_editor.py

Issue 24596007: update build to modify 64 bit DartEditor.ini (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix mac build Created 7 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« editor/build/build.py ('K') | « editor/build/build.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« editor/build/build.py ('K') | « editor/build/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698