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

Side by Side Diff: grit/tool/build.py

Issue 176993010: Start to implicitly include \n in rc_header_format. (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | « grit/format/rc_header_unittest.py ('k') | 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''The 'grit build' tool along with integration for this tool with the 6 '''The 'grit build' tool along with integration for this tool with the
7 SCons build system. 7 SCons build system.
8 ''' 8 '''
9 9
10 import filecmp 10 import filecmp
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 -w WHITELISTFILE Path to a file containing the string names of the 78 -w WHITELISTFILE Path to a file containing the string names of the
79 resources to include. Anything not listed is dropped. 79 resources to include. Anything not listed is dropped.
80 80
81 -t PLATFORM Specifies the platform the build is targeting; defaults 81 -t PLATFORM Specifies the platform the build is targeting; defaults
82 to the value of sys.platform. The value provided via this 82 to the value of sys.platform. The value provided via this
83 flag should match what sys.platform would report for your 83 flag should match what sys.platform would report for your
84 target platform; see grit.node.base.EvaluateCondition. 84 target platform; see grit.node.base.EvaluateCondition.
85 85
86 -h HEADERFORMAT Custom format string to use for generating rc header files. 86 -h HEADERFORMAT Custom format string to use for generating rc header files.
87 The string should have two placeholders: {textual_id} 87 The string should have two placeholders: {textual_id}
88 and {numeric_id}. E.g. "#define {textual_id} {numeric_id}\n" 88 and {numeric_id}. E.g. "#define {textual_id} {numeric_id}"
89 Otherwise it will use the default "#define SYMBOL 1234" 89 Otherwise it will use the default "#define SYMBOL 1234"
90 90
91 Conditional inclusion of resources only affects the output of files which 91 Conditional inclusion of resources only affects the output of files which
92 control which resources get linked into a binary, e.g. it affects .rc files 92 control which resources get linked into a binary, e.g. it affects .rc files
93 meant for compilation but it does not affect resource header files (that define 93 meant for compilation but it does not affect resource header files (that define
94 IDs). This helps ensure that values of IDs stay the same, that all messages 94 IDs). This helps ensure that values of IDs stay the same, that all messages
95 are exported to translation interchange files (e.g. XMB files), etc. 95 are exported to translation interchange files (e.g. XMB files), etc.
96 ''' 96 '''
97 97
98 def ShortDescription(self): 98 def ShortDescription(self):
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 self.MakeDirectoriesTo(depfile) 357 self.MakeDirectoriesTo(depfile)
358 outfile = self.fo_create(depfile, 'wb') 358 outfile = self.fo_create(depfile, 'wb')
359 outfile.writelines(depfile_contents) 359 outfile.writelines(depfile_contents)
360 360
361 @staticmethod 361 @staticmethod
362 def MakeDirectoriesTo(file): 362 def MakeDirectoriesTo(file):
363 '''Creates directories necessary to contain |file|.''' 363 '''Creates directories necessary to contain |file|.'''
364 dir = os.path.split(file)[0] 364 dir = os.path.split(file)[0]
365 if not os.path.exists(dir): 365 if not os.path.exists(dir):
366 os.makedirs(dir) 366 os.makedirs(dir)
OLDNEW
« no previous file with comments | « grit/format/rc_header_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698