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

Side by Side Diff: tools/build.py

Issue 810623005: Build Observatory with runtime (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | « runtime/tools/create_resources.py ('k') | tools/canary.dart » ('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 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import re 10 import re
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 metavar=HOST_CPUS, 69 metavar=HOST_CPUS,
70 default=str(HOST_CPUS)) 70 default=str(HOST_CPUS))
71 (vs_directory, vs_executable) = utils.GuessVisualStudioPath() 71 (vs_directory, vs_executable) = utils.GuessVisualStudioPath()
72 result.add_option("--devenv", 72 result.add_option("--devenv",
73 help='Path containing devenv.com on Windows', 73 help='Path containing devenv.com on Windows',
74 default=vs_directory) 74 default=vs_directory)
75 result.add_option("--executable", 75 result.add_option("--executable",
76 help='Name of the devenv.com/msbuild executable on Windows (varies for ' 76 help='Name of the devenv.com/msbuild executable on Windows (varies for '
77 'different versions of Visual Studio)', 77 'different versions of Visual Studio)',
78 default=vs_executable) 78 default=vs_executable)
79 result.add_option("--use-bootstrap-for-observatory",
80 help='Use a stripped down Dart binary built on the host machine '
81 'for building Observatory. Necessary on Linux machines which have '
82 'libc incompatibilities with the prebuilt Dart binaries.',
83 default=False, action="store_true")
79 return result 84 return result
80 85
81 86
82 def ProcessOsOption(os_name): 87 def ProcessOsOption(os_name):
83 if os_name == 'host': 88 if os_name == 'host':
84 return HOST_OS 89 return HOST_OS
85 return os_name 90 return os_name
86 91
87 92
88 def ProcessOptions(options, args): 93 def ProcessOptions(options, args):
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if success: 359 if success:
355 icon = 'dialog-information' 360 icon = 'dialog-information'
356 else: 361 else:
357 icon = 'dialog-error' 362 icon = 'dialog-error'
358 command = "notify-send -i '%s' '%s' '%s' &" % (icon, message, title) 363 command = "notify-send -i '%s' '%s' '%s' &" % (icon, message, title)
359 elif HOST_OS == 'win32': 364 elif HOST_OS == 'win32':
360 if success: 365 if success:
361 icon = 'info' 366 icon = 'info'
362 else: 367 else:
363 icon = 'error' 368 icon = 'error'
364 command = ("powershell -command \"" 369 command = ("powershell -command \""
365 "[reflection.assembly]::loadwithpartialname('System.Windows.Forms')" 370 "[reflection.assembly]::loadwithpartialname('System.Windows.Forms')"
366 "| Out-Null;" 371 "| Out-Null;"
367 "[reflection.assembly]::loadwithpartialname('System.Drawing')" 372 "[reflection.assembly]::loadwithpartialname('System.Drawing')"
368 "| Out-Null;" 373 "| Out-Null;"
369 "$n = new-object system.windows.forms.notifyicon;" 374 "$n = new-object system.windows.forms.notifyicon;"
370 "$n.icon = [system.drawing.systemicons]::information;" 375 "$n.icon = [system.drawing.systemicons]::information;"
371 "$n.visible = $true;" 376 "$n.visible = $true;"
372 "$n.showballoontip(%d, '%s', '%s', " 377 "$n.showballoontip(%d, '%s', '%s', "
373 "[system.windows.forms.tooltipicon]::%s);\"") % ( 378 "[system.windows.forms.tooltipicon]::%s);\"") % (
374 5000, # Notification stays on for this many milliseconds 379 5000, # Notification stays on for this many milliseconds
375 message, title, icon) 380 message, title, icon)
376 381
377 if command: 382 if command:
378 # Ignore return code, if this command fails, it doesn't matter. 383 # Ignore return code, if this command fails, it doesn't matter.
379 os.system(command) 384 os.system(command)
380 385
381 386
382 filter_xcodebuild_output = False 387 filter_xcodebuild_output = False
383 def BuildOneConfig(options, target, target_os, mode, arch, override_tools): 388 def BuildOneConfig(options, target, target_os, mode, arch, override_tools):
384 global filter_xcodebuild_output 389 global filter_xcodebuild_output
385 start_time = time.time() 390 start_time = time.time()
386 os.environ['DART_BUILD_MODE'] = mode 391 os.environ['DART_BUILD_MODE'] = mode
392 if options.use_bootstrap_for_observatory != False:
393 os.environ['DART_USE_BOOTSTRAP_BIN'] = '1'
387 build_config = utils.GetBuildConf(mode, arch, target_os) 394 build_config = utils.GetBuildConf(mode, arch, target_os)
388 if HOST_OS == 'macos': 395 if HOST_OS == 'macos':
389 filter_xcodebuild_output = True 396 filter_xcodebuild_output = True
390 project_file = 'dart.xcodeproj' 397 project_file = 'dart.xcodeproj'
391 if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()): 398 if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()):
392 project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName() 399 project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName()
393 args = ['xcodebuild', 400 args = ['xcodebuild',
394 '-project', 401 '-project',
395 project_file, 402 project_file,
396 '-target', 403 '-target',
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 else: 555 else:
549 if BuildOneConfig(options, target, target_os, 556 if BuildOneConfig(options, target, target_os,
550 mode, arch, cross_build) != 0: 557 mode, arch, cross_build) != 0:
551 return 1 558 return 1
552 559
553 return 0 560 return 0
554 561
555 562
556 if __name__ == '__main__': 563 if __name__ == '__main__':
557 sys.exit(Main()) 564 sys.exit(Main())
OLDNEW
« no previous file with comments | « runtime/tools/create_resources.py ('k') | tools/canary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698