summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-14 22:01:26 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-14 22:01:26 +0000
commit1405220aad5d0885a3f583e95d9a96e76455b1c7 (patch)
tree86dcdcc3d656a236a958bbf93f7851cdbd3c59c3 /chrome/tools
parent6b82c608d606fc848c3b0849204968e9e649ef86 (diff)
downloadchromium_src-1405220aad5d0885a3f583e95d9a96e76455b1c7.zip
chromium_src-1405220aad5d0885a3f583e95d9a96e76455b1c7.tar.gz
chromium_src-1405220aad5d0885a3f583e95d9a96e76455b1c7.tar.bz2
Eliminate char/wchar_t conversions, probably-unsafe statics, and disk access
when determining the framework and helper app paths on the Mac. BUG=24833 TEST=app still works, tests still pass Review URL: http://codereview.chromium.org/267102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-xchrome/tools/build/make_version_cc.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/chrome/tools/build/make_version_cc.py b/chrome/tools/build/make_version_cc.py
new file mode 100755
index 0000000..2797595
--- /dev/null
+++ b/chrome/tools/build/make_version_cc.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Creates chrome_version.cc which contains the definition of the
+# kChromeVersion constant.
+
+import sys
+
+def main(me, args):
+ if len(args) != 2:
+ print >>sys.stderr, 'usage: %s version.cc version' % me
+ return 1
+
+ (cc_file, version) = args
+
+ contents = '''// automatically generated by %s
+
+namespace chrome {
+
+extern const char kChromeVersion[] = "%s";
+
+} // namespace chrome
+''' % (me, version)
+
+ output = open(cc_file, 'w')
+ output.write(contents)
+ output.close()
+
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[0], sys.argv[1:]))