Chromium Code Reviews| 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@\" " + |
|
Robert Sesek
2016/09/21 21:41:21
Did gn format not try and change this?
Sidney San Martín
2016/09/21 23:19:20
gn format *did* this.
Robert Sesek
2016/09/22 14:46:55
Oh, cool. I was trying to convince it that this wa
| |
| 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@\" " + | |
| 24 "installer_bundle_id = \"@MAC_INSTALLER_BUNDLE_ID@\" " | |
| 21 | 25 |
| 22 _branding_file = "//chrome/app/theme/$branding_path_component/BRANDING" | 26 _branding_file = "//chrome/app/theme/$branding_path_component/BRANDING" |
| 23 _result = exec_script("version.py", | 27 _result = exec_script("version.py", |
| 24 [ | 28 [ |
| 25 "-f", | 29 "-f", |
| 26 rebase_path(_branding_file, root_build_dir), | 30 rebase_path(_branding_file, root_build_dir), |
| 27 "-t", | 31 "-t", |
| 28 _branding_dictionary_template, | 32 _branding_dictionary_template, |
| 29 ], | 33 ], |
| 30 "scope", | 34 "scope", |
| 31 [ _branding_file ]) | 35 [ _branding_file ]) |
| 32 | 36 |
| 33 chrome_product_full_name = _result.full_name | 37 chrome_product_full_name = _result.full_name |
| 34 chrome_product_short_name = _result.short_name | 38 chrome_product_short_name = _result.short_name |
| 39 chrome_product_installer_full_name = _result.installer_full_name | |
| 40 chrome_product_installer_short_name = _result.installer_short_name | |
| 35 | 41 |
| 36 if (is_mac) { | 42 if (is_mac) { |
| 37 chrome_mac_bundle_id = _result.bundle_id | 43 chrome_mac_bundle_id = _result.bundle_id |
| 38 chrome_mac_creator_code = _result.creator_code | 44 chrome_mac_creator_code = _result.creator_code |
| 45 chrome_mac_installer_bundle_id = _result.installer_bundle_id | |
| 39 } | 46 } |
| OLD | NEW |