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

Side by Side Diff: build/mac/tweak_info_plist.py

Issue 703073002: Fix tweak_info_plist's TOP path to be found relative to itself rather than the includer's SRCROOT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: -abspath Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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 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
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
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:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698