1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//ash/ambient/resources/resources.gni")
import("//build/config/chrome_build.gni")
import("//chromeos/ash/components/scalable_iph/scalable_iph.gni")
import("//tools/grit/repack.gni")
import("//ui/base/ui_features.gni")
assert(is_chromeos)
assert(enable_hidpi)
repack("ash_test_resources_unscaled") {
output = "$root_build_dir/ash_test_resources_unscaled.pak"
sources = [
"$root_gen_dir/ash/public/cpp/resources/ash_public_unscaled_resources.pak",
"$root_gen_dir/ash/quick_insert/resources/quick_insert_resources.pak",
"$root_gen_dir/ash/system/mahi/resources/mahi_resources.pak",
"$root_gen_dir/ash/system/video_conference/resources/vc_resources.pak",
"$root_gen_dir/ash/wm/overview/birch/resources/coral_resources.pak",
]
deps = [
"//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/quick_insert/resources:quick_insert_resources",
"//ash/system/mahi/resources:mahi_resources",
"//ash/system/video_conference/resources:vc_resources",
"//ash/wm/overview/birch/resources:coral_resources_grit",
]
if (include_ash_ambient_animation_resources) {
sources += [
"$root_gen_dir/ash/ambient/resources/ash_ambient_lottie_resources.pak",
]
deps += [ "//ash/ambient/resources:lottie_resources" ]
}
if (enable_cros_scalable_iph) {
sources += [ "$root_gen_dir/chromeos/ash/ash_resources.pak" ]
deps += [ "//chromeos/ash/resources" ]
}
}
# Repacks resources needed for ash_unittests, etc. at a given scale.
# TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?)
template("ash_test_resources") {
percent = invoker.percent
repack("ash_test_resources_${target_name}") {
output = "$root_build_dir/${target_name}.pak"
sources = [
"$root_gen_dir/ash/login/resources/login_resources_${percent}_percent.pak",
"$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak",
"$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
"$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak",
]
if (percent == "100") {
sources += [
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/ui/webui/resources/webui_resources.pak",
]
}
if (defined(invoker.sources)) {
sources += invoker.sources
}
deps = [
"//ash/login/resources",
"//mojo/public/js:resources",
"//ui/chromeos/resources",
"//ui/resources",
"//ui/views/resources",
"//ui/webui/resources",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
if (is_chrome_branded) {
sources += [ "$root_gen_dir/chromeos/ash/resources/internal/ash_internal_resources_${percent}_percent.pak" ]
deps +=
[ "//chromeos/ash/resources/internal:ash_internal_scaled_resources" ]
}
if (percent == "100") {
# TODO(msw): This seems bad, but follows repack_ui_test_pak's example.
deps += [ "//third_party/blink/public:resources_grit" ]
sources += [
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
]
}
}
}
ash_test_resources("100_percent") {
percent = "100"
}
ash_test_resources("200_percent") {
percent = "200"
}
|