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

Side by Side Diff: editor/build/build.py

Issue 25173003: Give better error messages for users when trying to run the 64 bit editor on a 32 bit JVM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/create_editor.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, 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 import glob 7 import glob
8 import gsutil 8 import gsutil
9 import imp 9 import imp
10 import optparse 10 import optparse
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 subprocess.call(['zip', '-q', zipFile, infofile], env=os.environ) 907 subprocess.call(['zip', '-q', zipFile, infofile], env=os.environ)
908 os.remove(infofile) 908 os.remove(infofile)
909 909
910 910
911 def Modify64BitDartEditorIni(iniFilePath): 911 def Modify64BitDartEditorIni(iniFilePath):
912 f = open(iniFilePath, 'r') 912 f = open(iniFilePath, 'r')
913 lines = f.readlines() 913 lines = f.readlines()
914 f.close() 914 f.close()
915 lines[lines.index('-Xms40m\n')] = '-Xms256m\n' 915 lines[lines.index('-Xms40m\n')] = '-Xms256m\n'
916 lines[lines.index('-Xmx1000m\n')] = '-Xmx2000m\n' 916 lines[lines.index('-Xmx1000m\n')] = '-Xmx2000m\n'
917 # Add -d64 to give better error messages to user in 64 bit mode.
918 lines[lines.index('-vmargs\n')] = '-vmargs\n-d64\n'
917 f = open(iniFilePath, 'w') 919 f = open(iniFilePath, 'w')
918 f.writelines(lines); 920 f.writelines(lines);
919 f.close() 921 f.close()
920 922
921 923
922 def RunEditorTests(buildout, buildos): 924 def RunEditorTests(buildout, buildos):
923 StartBuildStep('run_tests') 925 StartBuildStep('run_tests')
924 926
925 for editorArchive in _GetTestableRcpArchives(buildout): 927 for editorArchive in _GetTestableRcpArchives(buildout):
926 with utils.TempDir('editor_') as tempDir: 928 with utils.TempDir('editor_') as tempDir:
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 """delete the given file - do not re-throw any exceptions that occur""" 1263 """delete the given file - do not re-throw any exceptions that occur"""
1262 if os.path.exists(f): 1264 if os.path.exists(f):
1263 try: 1265 try:
1264 os.remove(f) 1266 os.remove(f)
1265 except OSError: 1267 except OSError:
1266 print 'error deleting %s' % f 1268 print 'error deleting %s' % f
1267 1269
1268 1270
1269 if __name__ == '__main__': 1271 if __name__ == '__main__':
1270 sys.exit(main()) 1272 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/create_editor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698