summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 00:16:37 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 00:16:37 +0000
commitc29a3f2a810c7d113e444555ba6ba34f870d37fe (patch)
tree77ce85bdd413f13f60462ec1f899b01c5501c53e /tools
parent0d4b67fb35fdcd99d866b77dc4ab8aa5acb92938 (diff)
downloadchromium_src-c29a3f2a810c7d113e444555ba6ba34f870d37fe.zip
chromium_src-c29a3f2a810c7d113e444555ba6ba34f870d37fe.tar.gz
chromium_src-c29a3f2a810c7d113e444555ba6ba34f870d37fe.tar.bz2
Fix branded resource buiding.
One visible change: new tab page has Google icon, not Chromium. Gyp doesn't have a set environment variable facility; hence the addition of a command line option to grit. Review URL: http://codereview.chromium.org/113974 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/grit/grit/tool/build.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py
index daabaf8..affe699 100644
--- a/tools/grit/grit/tool/build.py
+++ b/tools/grit/grit/tool/build.py
@@ -54,6 +54,9 @@ Options:
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 @@ are exported to translation interchange files (e.g. XMB files), etc.
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 @@ are exported to translation interchange files (e.g. XMB files), etc.
print warnings
if self.res.UberClique().HasMissingTranslations():
sys.exit(-1)
-