| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # | 7 # |
| 8 # Xcode supports build variable substitutions and CPP; sadly, that doesn't work | 8 # Xcode supports build variable substitutions and CPP; sadly, that doesn't work |
| 9 # because: | 9 # because: |
| 10 # | 10 # |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 import optparse | 23 import optparse |
| 24 import os | 24 import os |
| 25 from os import environ as env | 25 from os import environ as env |
| 26 import plistlib | 26 import plistlib |
| 27 import re | 27 import re |
| 28 import subprocess | 28 import subprocess |
| 29 import sys | 29 import sys |
| 30 import tempfile | 30 import tempfile |
| 31 | 31 |
| 32 TOP = os.path.join(env['SRCROOT'], '..') | 32 TOP = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) |
| 33 | 33 |
| 34 | 34 |
| 35 def _GetOutput(args): | 35 def _GetOutput(args): |
| 36 """Runs a subprocess and waits for termination. Returns (stdout, returncode) | 36 """Runs a subprocess and waits for termination. Returns (stdout, returncode) |
| 37 of the process. stderr is attached to the parent.""" | 37 of the process. stderr is attached to the parent.""" |
| 38 proc = subprocess.Popen(args, stdout=subprocess.PIPE) | 38 proc = subprocess.Popen(args, stdout=subprocess.PIPE) |
| 39 (stdout, stderr) = proc.communicate() | 39 (stdout, stderr) = proc.communicate() |
| 40 return (stdout, proc.returncode) | 40 return (stdout, proc.returncode) |
| 41 | 41 |
| 42 | 42 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 # Info.plist will work perfectly well in any plist format, but traditionally | 271 # Info.plist will work perfectly well in any plist format, but traditionally |
| 272 # applications use xml1 for this, so convert it to ensure that it's valid. | 272 # applications use xml1 for this, so convert it to ensure that it's valid. |
| 273 proc = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', DEST_INFO_PLIST, | 273 proc = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', DEST_INFO_PLIST, |
| 274 temp_info_plist.name]) | 274 temp_info_plist.name]) |
| 275 proc.wait() | 275 proc.wait() |
| 276 return proc.returncode | 276 return proc.returncode |
| 277 | 277 |
| 278 | 278 |
| 279 if __name__ == '__main__': | 279 if __name__ == '__main__': |
| 280 sys.exit(Main(sys.argv[1:])) | 280 sys.exit(Main(sys.argv[1:])) |
| OLD | NEW |