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.
5 import("//tools/grit/grit_rule.gni")
6 import("//tools/grit/repack.gni")
8 # GYP version: ui/resources/ui_resources.gyp:ui_resources
12 ":ui_unscaled_resources_grd",
13 ":webui_resources_grd",
17 grit("ui_resources_grd") {
18 source = "ui_resources.grd"
20 "grit/ui_resources.h",
21 "grit/ui_resources_map.cc",
22 "grit/ui_resources_map.h",
23 "ui_resources_100_percent.pak",
24 "ui_resources_200_percent.pak",
25 "ui_resources_300_percent.pak",
29 grit("ui_unscaled_resources_grd") {
30 source = "ui_unscaled_resources.grd"
31 use_qualified_include = true
33 "grit/ui_unscaled_resources.h",
34 "ui_unscaled_resources.rc",
38 grit("webui_resources_grd") {
39 source = "../webui/resources/webui_resources.grd"
41 "grit/webui_resources.h",
42 "grit/webui_resources_map.cc",
43 "grit/webui_resources_map.h",
44 "webui_resources.pak",
49 copy("copy_ui_resources_100_percent") {
51 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
54 "$root_out_dir/ui_resources_100_percent.pak",
62 # On iOS and Mac the string resources need to go into a locale subfolder, which
63 # introduces an extra dependency.
65 # GYP version: ui/resources/ui_resources.gyp:ui_test_pak
66 # (copy_ui_test_pak action)
67 if (is_ios || is_mac) {
68 group("ui_test_pak") {
70 ":repack_ui_test_pak",
71 ":repack_ui_test_mac_locale_pack",
75 group("ui_test_pak") {
77 ":repack_ui_test_pak",
82 # GYP version: ui/resources/ui_resources.gyp:ui_test_pak
83 repack("repack_ui_test_pak") {
84 # Depend on ui_test_pak instead of this one.
85 visibility = [ ":ui_test_pak" ]
88 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
89 "$root_gen_dir/ui/resources/webui_resources.pak",
90 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
91 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
96 "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_100_percent.pak",
97 "$root_gen_dir/ui/chromeos/strings/ui_chromeos_strings_en-US.pak",
101 output = "$root_out_dir/ui_test.pak"
109 deps += [ ":copy_ui_resources_100_percent" ]
114 "//ui/chromeos/resources",
115 "//ui/chromeos/strings",
120 # Repack just the strings for the framework locales on Mac and iOS. This
121 # emulates repack_locales.py, but just for en-US. Note ui_test.pak is not simply
122 # copied, because it causes leaks from allocations within system libraries when
123 # trying to load non-string resources. http://crbug.com/413034.
124 repack("repack_ui_test_mac_locale_pack") {
125 visibility = [ ":ui_test_pak" ]
128 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
129 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
132 output = "$root_out_dir/ui/en.lproj/locale.pak"