| 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 import("//build/config/locales.gni") | 5 import("//build/config/locales.gni") |
| 6 import("//ui/base/ui_features.gni") | 6 import("//ui/base/ui_features.gni") |
| 7 import("chrome_repack_locales.gni") | 7 import("chrome_repack_locales.gni") |
| 8 | 8 |
| 9 # Generates a rule to repack a set of resources, substituting a given string | 9 # Generates a rule to repack a set of resources, substituting a given string |
| 10 # in for the percentage (e.g. "100", "200"). It generates the repacked files in | 10 # in for the percentage (e.g. "100", "200"). It generates the repacked files in |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 # Defines repack() targets used by Chrome. Specifically: | 160 # Defines repack() targets used by Chrome. Specifically: |
| 161 # * chrome_100_percent.pak | 161 # * chrome_100_percent.pak |
| 162 # * chrome_200_percent.pak (optionally) | 162 # * chrome_200_percent.pak (optionally) |
| 163 # * resources.pak | 163 # * resources.pak |
| 164 # * locale .pak files | 164 # * locale .pak files |
| 165 # | 165 # |
| 166 # Paramters: | 166 # Paramters: |
| 167 # output_dir [required]: Directory to output .pak files. Locale .pak files | 167 # output_dir [required]: Directory to output .pak files. Locale .pak files |
| 168 # will always be place in $output_dir/locales | 168 # will always be place in $output_dir/locales |
| 169 # additional_extra_paks: List of extra .pak sources for resources.pak. | 169 # additional_extra_paks: List of extra .pak sources for resources.pak. |
| 170 # additional_locale_source_patterns: additional_source_patterns for |
| 171 # chrome_repack_locales(). |
| 170 # copy_data_to_bundle: | 172 # copy_data_to_bundle: |
| 171 # deps: | 173 # deps: |
| 172 # output_dir: | 174 # output_dir: |
| 173 # public_deps: | 175 # public_deps: |
| 174 # repack_whitelist: | 176 # repack_whitelist: |
| 175 # visibility: | 177 # visibility: |
| 176 # Normal meanings. | 178 # Normal meanings. |
| 177 # | 179 # |
| 178 template("chrome_paks") { | 180 template("chrome_paks") { |
| 179 chrome_repack_percent("${target_name}_100_percent") { | 181 chrome_repack_percent("${target_name}_100_percent") { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 220 |
| 219 chrome_repack_locales("${target_name}_locales") { | 221 chrome_repack_locales("${target_name}_locales") { |
| 220 forward_variables_from(invoker, | 222 forward_variables_from(invoker, |
| 221 [ | 223 [ |
| 222 "copy_data_to_bundle", | 224 "copy_data_to_bundle", |
| 223 "deps", | 225 "deps", |
| 224 "repack_whitelist", | 226 "repack_whitelist", |
| 225 "visibility", | 227 "visibility", |
| 226 ]) | 228 ]) |
| 227 | 229 |
| 230 if (defined(invoker.additional_locale_source_patterns)) { |
| 231 additional_source_patterns = invoker.additional_locale_source_patterns |
| 232 } |
| 228 input_locales = locales | 233 input_locales = locales |
| 229 output_dir = "${invoker.output_dir}/locales" | 234 output_dir = "${invoker.output_dir}/locales" |
| 230 | 235 |
| 231 if (is_mac) { | 236 if (is_mac) { |
| 232 output_locales = locales_as_mac_outputs | 237 output_locales = locales_as_mac_outputs |
| 233 } else { | 238 } else { |
| 234 output_locales = locales | 239 output_locales = locales |
| 235 } | 240 } |
| 236 } | 241 } |
| 237 | 242 |
| 238 group(target_name) { | 243 group(target_name) { |
| 239 forward_variables_from(invoker, [ "deps" ]) | 244 forward_variables_from(invoker, [ "deps" ]) |
| 240 public_deps = [ | 245 public_deps = [ |
| 241 ":${target_name}_100_percent", | 246 ":${target_name}_100_percent", |
| 242 ":${target_name}_extra", | 247 ":${target_name}_extra", |
| 243 ":${target_name}_locales", | 248 ":${target_name}_locales", |
| 244 ] | 249 ] |
| 245 if (enable_hidpi) { | 250 if (enable_hidpi) { |
| 246 public_deps += [ ":${target_name}_200_percent" ] | 251 public_deps += [ ":${target_name}_200_percent" ] |
| 247 } | 252 } |
| 248 if (defined(invoker.public_deps)) { | 253 if (defined(invoker.public_deps)) { |
| 249 public_deps += invoker.public_deps | 254 public_deps += invoker.public_deps |
| 250 } | 255 } |
| 251 } | 256 } |
| 252 } | 257 } |
| OLD | NEW |