Index: chrome/version_resource_rules.gypi |
diff --git a/chrome/version_resource_rules.gypi b/chrome/version_resource_rules.gypi |
new file mode 100644 |
index 0000000000000000000000000000000000000000..772d453d3809a9cc484e29645c5c5708ec102bf7 |
--- /dev/null |
+++ b/chrome/version_resource_rules.gypi |
@@ -0,0 +1,67 @@ |
+# Copyright (c) 2012 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. |
+ |
+# This file defines rules that allow you to generate version resources for |
+# Windows images. |
+ |
+# Include 'version.gypi' at the top of your GYP file to define |
+# the required variables: |
+# |
+# 'includes': [ |
+# '<(DEPTH)/chrome/version.gypi', |
+# ], |
+# |
+# Then include this rule file in a productname_resources target: |
+# |
+# { |
+# 'target_name': 'chrome_version_resources', |
+# ... |
+# 'variables': { |
+# 'output_dir': 'product_version', |
+# 'branding_path': 'some/branding/file', |
+# 'template_input_path': 'some/product_version.rc.version', |
+# 'extra_variable_files_arguments': [ '-f', 'some/file/with/variables' ], |
+# 'extra_variable_files': [ 'some/file/with/variables' ], # NOTE: matches that above |
+# }, |
+# 'includes': [ |
+# '<(DEPTH)/chrome/version_resource_rules.gypi', |
+# ], |
+# } |
+# |
+{ |
+ 'rules': [ |
+ { |
+ 'rule_name': 'version', |
+ 'extension': 'ver', |
+ 'variables': { |
+ 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', |
+ 'extra_variable_files%': [], |
+ 'extra_variable_files_arguments%': [], |
+ }, |
+ 'inputs': [ |
+ '<(version_py_path)', |
+ '<(version_path)', |
+ '<(branding_path)', |
+ '<(lastchange_path)', |
+ '<@(extra_variable_files)', |
+ '<(template_input_path)', |
+ ], |
+ 'outputs': [ |
+ '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)/<(RULE_INPUT_ROOT)_version.rc', |
+ ], |
+ 'action': [ |
+ 'python', |
+ '<(version_py_path)', |
+ '-f', '<(RULE_INPUT_PATH)', |
+ '-f', '<(version_path)', |
+ '-f', '<(branding_path)', |
+ '-f', '<(lastchange_path)', |
+ '<@(extra_variable_files_arguments)', |
+ '<(template_input_path)', |
+ '<@(_outputs)', |
+ ], |
+ 'message': 'Generating version information in <@(_outputs)' |
+ }, |
+ ], |
+} |