| 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("//chrome/common/features.gni") | 6 import("//chrome/common/features.gni") |
| 7 import("//extensions/features/features.gni") | 7 import("//extensions/features/features.gni") |
| 8 import("//ui/base/ui_features.gni") | 8 import("//ui/base/ui_features.gni") |
| 9 import("chrome_repack_locales.gni") | 9 import("chrome_repack_locales.gni") |
| 10 | 10 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 # Defines repack() targets used by Chrome. Specifically: | 177 # Defines repack() targets used by Chrome. Specifically: |
| 178 # * chrome_100_percent.pak | 178 # * chrome_100_percent.pak |
| 179 # * chrome_200_percent.pak (optionally) | 179 # * chrome_200_percent.pak (optionally) |
| 180 # * resources.pak | 180 # * resources.pak |
| 181 # * locale .pak files | 181 # * locale .pak files |
| 182 # | 182 # |
| 183 # Paramters: | 183 # Paramters: |
| 184 # output_dir [required]: Directory to output .pak files. Locale .pak files | 184 # output_dir [required]: Directory to output .pak files. Locale .pak files |
| 185 # will always be place in $output_dir/locales | 185 # will always be place in $output_dir/locales |
| 186 # additional_extra_paks: List of extra .pak sources for resources.pak. | 186 # additional_extra_paks: List of extra .pak sources for resources.pak. |
| 187 # locale_whitelist: if set, override repack_whitelist for locale .pak files. | 187 # exclude_locale_paks: if set to true, skip chrome_repack_locales. |
| 188 # copy_data_to_bundle: | 188 # copy_data_to_bundle: |
| 189 # deps: | 189 # deps: |
| 190 # output_dir: | 190 # output_dir: |
| 191 # public_deps: | 191 # public_deps: |
| 192 # repack_whitelist: | 192 # repack_whitelist: |
| 193 # visibility: | 193 # visibility: |
| 194 # Normal meanings. | 194 # Normal meanings. |
| 195 # | 195 # |
| 196 template("chrome_paks") { | 196 template("chrome_paks") { |
| 197 chrome_repack_percent("${target_name}_100_percent") { | 197 chrome_repack_percent("${target_name}_100_percent") { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 227 "deps", | 227 "deps", |
| 228 "output_dir", | 228 "output_dir", |
| 229 "repack_whitelist", | 229 "repack_whitelist", |
| 230 "visibility", | 230 "visibility", |
| 231 ]) | 231 ]) |
| 232 if (defined(invoker.additional_extra_paks)) { | 232 if (defined(invoker.additional_extra_paks)) { |
| 233 additional_paks = invoker.additional_extra_paks | 233 additional_paks = invoker.additional_extra_paks |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 chrome_repack_locales("${target_name}_locales") { | 237 if (!defined(invoker.exclude_locale_paks) || !invoker.exclude_locale_paks) { |
| 238 forward_variables_from(invoker, | 238 chrome_repack_locales("${target_name}_locales") { |
| 239 [ | 239 forward_variables_from(invoker, |
| 240 "copy_data_to_bundle", | 240 [ |
| 241 "deps", | 241 "copy_data_to_bundle", |
| 242 "visibility", | 242 "deps", |
| 243 ]) | 243 "repack_whitelist", |
| 244 if (defined(invoker.locale_whitelist)) { | 244 "visibility", |
| 245 repack_whitelist = invoker.locale_whitelist | 245 ]) |
| 246 } else if (defined(invoker.repack_whitelist)) { | |
| 247 repack_whitelist = invoker.repack_whitelist | |
| 248 } | |
| 249 | 246 |
| 250 input_locales = locales | 247 input_locales = locales |
| 251 output_dir = "${invoker.output_dir}/locales" | 248 output_dir = "${invoker.output_dir}/locales" |
| 252 | 249 |
| 253 if (is_mac) { | 250 if (is_mac) { |
| 254 output_locales = locales_as_mac_outputs | 251 output_locales = locales_as_mac_outputs |
| 255 } else { | 252 } else { |
| 256 output_locales = locales | 253 output_locales = locales |
| 254 } |
| 257 } | 255 } |
| 258 } | 256 } |
| 259 | 257 |
| 260 group(target_name) { | 258 group(target_name) { |
| 261 forward_variables_from(invoker, [ "deps" ]) | 259 forward_variables_from(invoker, [ "deps" ]) |
| 262 public_deps = [ | 260 public_deps = [ |
| 263 ":${target_name}_100_percent", | 261 ":${target_name}_100_percent", |
| 264 ":${target_name}_extra", | 262 ":${target_name}_extra", |
| 265 ":${target_name}_locales", | |
| 266 ] | 263 ] |
| 264 if (!defined(invoker.exclude_locale_paks) || !invoker.exclude_locale_paks) { |
| 265 public_deps += [ ":${target_name}_locales" ] |
| 266 } |
| 267 if (enable_hidpi) { | 267 if (enable_hidpi) { |
| 268 public_deps += [ ":${target_name}_200_percent" ] | 268 public_deps += [ ":${target_name}_200_percent" ] |
| 269 } | 269 } |
| 270 if (defined(invoker.public_deps)) { | 270 if (defined(invoker.public_deps)) { |
| 271 public_deps += invoker.public_deps | 271 public_deps += invoker.public_deps |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 } | 274 } |
| OLD | NEW |