OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # This file defines rules that allow you to generate version resources for | |
6 # Windows images. | |
7 # | |
8 # GN: Use the "process_version" template in //chrome/version.gni. | |
9 # For an example, see the target //chrome:chrome_exe_version | |
10 | |
11 # Include 'version.gypi' at the top of your GYP file to define | |
12 # the required variables: | |
13 # | |
14 # 'includes': [ | |
15 # '<(DEPTH)/build/util/version.gypi', | |
16 # ], | |
17 # | |
18 # Then include this rule file in a productname_resources target: | |
19 # | |
20 # { | |
21 # 'target_name': 'chrome_version_resources', | |
22 # ... | |
23 # 'variables': { | |
24 # 'output_dir': 'product_version', | |
25 # 'branding_path': 'some/branding/file', | |
26 # 'template_input_path': 'some/product_version.rc.version', | |
27 # 'extra_variable_files_arguments': [ '-f', 'some/file/with/variables' ], | |
28 # 'extra_variable_files': [ 'some/file/with/variables' ], # NOTE: matches
that above | |
29 # }, | |
30 # 'includes': [ | |
31 # '<(DEPTH)/chrome/version_resource_rules.gypi', | |
32 # ], | |
33 # } | |
34 # | |
35 { | |
36 'rules': [ | |
37 { | |
38 'rule_name': 'version', | |
39 'extension': 'ver', | |
40 'variables': { | |
41 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', | |
42 'extra_variable_files%': [], | |
43 'extra_variable_files_arguments%': [], | |
44 }, | |
45 'inputs': [ | |
46 '<(version_py_path)', | |
47 '<(version_path)', | |
48 '<(branding_path)', | |
49 '<(lastchange_path)', | |
50 '<@(extra_variable_files)', | |
51 '<(template_input_path)', | |
52 ], | |
53 'outputs': [ | |
54 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)/<(RULE_INPUT_ROOT)_version.rc'
, | |
55 ], | |
56 'action': [ | |
57 'python', | |
58 '<(version_py_path)', | |
59 '-f', '<(RULE_INPUT_PATH)', | |
60 '-f', '<(version_path)', | |
61 '-f', '<(branding_path)', | |
62 '-f', '<(lastchange_path)', | |
63 '<@(extra_variable_files_arguments)', | |
64 '<(template_input_path)', | |
65 '<@(_outputs)', | |
66 ], | |
67 'message': 'Generating version information in <@(_outputs)' | |
68 }, | |
69 ], | |
70 } | |
OLD | NEW |