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

Unified Diff: tools/grit/grit/tool/build.py

Issue 113974: Fix branded resource buiding.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/tool/build.py
===================================================================
--- tools/grit/grit/tool/build.py (revision 16995)
+++ tools/grit/grit/tool/build.py (working copy)
@@ -54,6 +54,9 @@
value VAL (defaults to 1) which will be used to control
conditional inclusion of resources.
+ -E NAME=VALUE Set environment variable NAME to VALUE (within grit).
+
+
Conditional inclusion of resources only affects the output of files which
control which resources get linked into a binary, e.g. it affects .rc files
meant for compilation but it does not affect resource header files (that define
@@ -66,13 +69,17 @@
def Run(self, opts, args):
self.output_directory = '.'
- (own_opts, args) = getopt.getopt(args, 'o:D:')
+ (own_opts, args) = getopt.getopt(args, 'o:D:E:')
for (key, val) in own_opts:
if key == '-o':
self.output_directory = val
elif key == '-D':
name, val = ParseDefine(val)
self.defines[name] = val
+ elif key == '-E':
+ (env_name, env_value) = val.split('=')
+ os.environ[env_name] = env_value
+
if len(args):
print "This tool takes no tool-specific arguments."
return 2
@@ -224,4 +231,3 @@
print warnings
if self.res.UberClique().HasMissingTranslations():
sys.exit(-1)
-
« no previous file with comments | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698