OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This exposes the Chrome branding as GN variables for use in build files. | 5 # This exposes the Chrome branding as GN variables for use in build files. |
6 # | 6 # |
7 # PREFER NOT TO USE THESE. The GYP build uses this kind of thing extensively. | 7 # PREFER NOT TO USE THESE. The GYP build uses this kind of thing extensively. |
8 # However, it is far better to write an action to generate a file at | 8 # However, it is far better to write an action to generate a file at |
9 # build-time with the information you need. This allows better dependency | 9 # build-time with the information you need. This allows better dependency |
10 # checking and GN will run faster. | 10 # checking and GN will run faster. |
11 # | 11 # |
12 # These values should only be used if you REALLY need to depend on them at | 12 # These values should only be used if you REALLY need to depend on them at |
13 # build-time, for example, in the computation of output file names. | 13 # build-time, for example, in the computation of output file names. |
14 | 14 |
15 import("//build/config/chrome_build.gni") | 15 import("//build/config/chrome_build.gni") |
16 | 16 |
17 _branding_dictionary_template = "full_name = \"@PRODUCT_FULLNAME@\" " + | 17 _branding_dictionary_template = |
18 "short_name = \"@PRODUCT_SHORTNAME@\" " + | 18 "full_name = \"@PRODUCT_FULLNAME@\" " + |
19 "bundle_id = \"@MAC_BUNDLE_ID@\" " + | 19 "short_name = \"@PRODUCT_SHORTNAME@\" " + |
20 "creator_code = \"@MAC_CREATOR_CODE@\" " | 20 "bundle_id = \"@MAC_BUNDLE_ID@\" " + |
| 21 "creator_code = \"@MAC_CREATOR_CODE@\" " + |
| 22 "installer_full_name = \"@PRODUCT_INSTALLER_FULLNAME@\" " + |
| 23 "installer_short_name = \"@PRODUCT_INSTALLER_SHORTNAME@\" " |
21 | 24 |
22 _branding_file = "//chrome/app/theme/$branding_path_component/BRANDING" | 25 _branding_file = "//chrome/app/theme/$branding_path_component/BRANDING" |
23 _result = exec_script("version.py", | 26 _result = exec_script("version.py", |
24 [ | 27 [ |
25 "-f", | 28 "-f", |
26 rebase_path(_branding_file, root_build_dir), | 29 rebase_path(_branding_file, root_build_dir), |
27 "-t", | 30 "-t", |
28 _branding_dictionary_template, | 31 _branding_dictionary_template, |
29 ], | 32 ], |
30 "scope", | 33 "scope", |
31 [ _branding_file ]) | 34 [ _branding_file ]) |
32 | 35 |
33 chrome_product_full_name = _result.full_name | 36 chrome_product_full_name = _result.full_name |
34 chrome_product_short_name = _result.short_name | 37 chrome_product_short_name = _result.short_name |
| 38 chrome_product_installer_full_name = _result.installer_full_name |
| 39 chrome_product_installer_short_name = _result.installer_short_name |
35 | 40 |
36 if (is_mac) { | 41 if (is_mac) { |
37 chrome_mac_bundle_id = _result.bundle_id | 42 chrome_mac_bundle_id = _result.bundle_id |
38 chrome_mac_creator_code = _result.creator_code | 43 chrome_mac_creator_code = _result.creator_code |
39 } | 44 } |
OLD | NEW |