BUILD.gn 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 2014 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//ash/ambient/resources/resources.gni")
  5. import("//build/config/chromeos/ui_mode.gni")
  6. import("//tools/grit/repack.gni")
  7. import("//ui/base/ui_features.gni")
  8. assert(is_chromeos_ash)
  9. assert(enable_hidpi)
  10. repack("ash_test_resources_unscaled") {
  11. output = "$root_build_dir/ash_test_resources_unscaled.pak"
  12. sources = [
  13. "$root_gen_dir/ash/public/cpp/resources/ash_public_unscaled_resources.pak",
  14. ]
  15. deps = [ "//ash/public/cpp/resources:ash_public_unscaled_resources" ]
  16. if (include_ash_ambient_animation_resources) {
  17. sources += [
  18. "$root_gen_dir/ash/ambient/resources/ash_ambient_lottie_resources.pak",
  19. ]
  20. deps += [ "//ash/ambient/resources:lottie_resources" ]
  21. }
  22. }
  23. # Repacks resources needed for ash_unittests, etc. at a given scale.
  24. # TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?)
  25. template("ash_test_resources") {
  26. percent = invoker.percent
  27. repack("ash_test_resources_${target_name}") {
  28. output = "$root_build_dir/${target_name}.pak"
  29. sources = [
  30. "$root_gen_dir/ash/login/resources/login_resources_${percent}_percent.pak",
  31. "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak",
  32. "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
  33. "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak",
  34. ]
  35. if (percent == "100") {
  36. sources += [
  37. "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
  38. "$root_gen_dir/ui/resources/webui_generated_resources.pak",
  39. ]
  40. }
  41. if (defined(invoker.sources)) {
  42. sources += invoker.sources
  43. }
  44. deps = [
  45. "//ash/login/resources",
  46. "//mojo/public/js:resources",
  47. "//ui/chromeos/resources",
  48. "//ui/resources",
  49. "//ui/views/resources",
  50. ]
  51. if (defined(invoker.deps)) {
  52. deps += invoker.deps
  53. }
  54. if (percent == "100") {
  55. # TODO(msw): This seems bad, but follows repack_ui_test_pak's example.
  56. deps += [ "//third_party/blink/public:resources_grit" ]
  57. sources += [
  58. "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
  59. ]
  60. }
  61. }
  62. }
  63. ash_test_resources("100_percent") {
  64. percent = "100"
  65. }
  66. ash_test_resources("200_percent") {
  67. percent = "200"
  68. }