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