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@\" " + | |
| 18 "short_name = \"@PRODUCT_SHORTNAME@\" " + | |
| 19 "bundle_id = \"@MAC_BUNDLE_ID@\" " + | |
| 20 "creator_code = \"@MAC_CREATOR_CODE@\" " | |
| 21 | |
| 17 _branding_file = "//chrome/app/theme/$branding_path_component/BRANDING" | 22 _branding_file = "//chrome/app/theme/$branding_path_component/BRANDING" |
| 18 _result = exec_script("version.py", | 23 _result = exec_script("version.py", |
| 19 [ | 24 [ |
| 20 "-f", | 25 "-f", |
| 21 rebase_path(_branding_file, root_build_dir), | 26 rebase_path(_branding_file, root_build_dir), |
| 22 "-t", | 27 "-t", |
| 23 "@PRODUCT_FULLNAME@", | 28 _branding_dictionary_template, |
| 24 ], | 29 ], |
| 25 "trim string", | 30 "scope", |
|
Mark Mentovai
2016/05/03 17:54:51
This change from “trim string” to “scope” is the m
Robert Sesek
2016/05/03 18:02:39
Yeah, it's a little confusing, but I mostly just c
| |
| 26 [ _branding_file ]) | 31 [ _branding_file ]) |
| 27 | 32 |
| 28 chrome_product_full_name = _result | 33 chrome_product_full_name = _result.full_name |
| 34 chrome_product_short_name = _result.short_name | |
| 35 | |
| 36 if (is_mac) { | |
| 37 chrome_mac_bundle_id = _result.bundle_id | |
| 38 chrome_mac_creator_code = _result.creator_code | |
| 39 } | |
| OLD | NEW |