blob: db317cd4e32605178246921ad14806cf2fb585ed [file] [log] [blame]
[email protected]63b99ff2014-04-24 00:37:301# 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
Yaron Friedman27c732b2019-04-02 23:31:065import("//build/config/android/config.gni")
Daniel Ruberyaf17ad32020-03-02 20:06:496import("//components/safe_browsing/buildflags.gni")
Scott Violet318a55f2018-03-30 19:08:197import("//printing/buildflags/buildflags.gni")
Yaron Friedman27c732b2019-04-02 23:31:068import("//tools/grit/grit_rule.gni")
[email protected]63b99ff2014-04-24 00:37:309
Mugdha Lakhanib6762162020-03-30 10:23:2510if (is_android) {
11 import("//build/config/android/rules.gni")
12}
13
droger1f86ef62015-10-01 13:05:2214about_credits_file = "$target_gen_dir/about_credits.html"
15
[email protected]797b25042014-07-01 23:54:1716group("resources") {
brettw717185d2015-09-18 19:58:5717 public_deps = [
[email protected]797b25042014-07-01 23:54:1718 ":components_resources",
19 ":components_scaled_resources",
Samuel Huang1b99a062020-01-08 22:20:3420 ":dev_ui_components_resources",
[email protected]797b25042014-07-01 23:54:1721 ]
22}
23
[email protected]63b99ff2014-04-24 00:37:3024grit("components_resources") {
25 source = "components_resources.grd"
scottmgac0ea0312014-12-03 19:21:0526
Nico Weberd77e027c2020-01-16 18:40:4827 inputs = [ about_credits_file ]
Jacques Chen818312d2019-07-22 18:12:0928
[email protected]b89c53842014-07-23 16:32:3229 outputs = [
hashimotocfb460f2014-09-25 06:59:0030 "grit/components_resources.h",
31 "components_resources.pak",
[email protected]b89c53842014-07-23 16:32:3232 ]
mukaifc01b282014-10-10 06:27:1133 output_dir = "$root_gen_dir/components"
droger1f86ef62015-10-01 13:05:2234
Jacques Chen6cd9b532019-08-08 02:53:1935 use_brotli = true
36
droger1f86ef62015-10-01 13:05:2237 grit_flags = [
38 "-E",
Jacques Chen818312d2019-07-22 18:12:0939 "about_credits_file=" + rebase_path(about_credits_file, root_build_dir),
droger1f86ef62015-10-01 13:05:2240 ]
Colin Blundell5c8efdd2020-01-24 11:04:0341
jzfeng3d83dad2017-05-09 03:44:1842 defines = [
43 "enable_basic_printing=$enable_basic_printing",
44 "enable_print_preview=$enable_print_preview",
Daniel Ruberyaf17ad32020-03-02 20:06:4945 "safe_browsing_mode=$safe_browsing_mode",
46 "is_fuchsia=$is_fuchsia",
jzfeng3d83dad2017-05-09 03:44:1847 ]
droger1f86ef62015-10-01 13:05:2248
Nico Weberd77e027c2020-01-16 18:40:4849 deps = [ ":about_credits" ]
Colin Blundell5c8efdd2020-01-24 11:04:0350
51 if (!is_ios) {
52 deps += [ "//components/resources/ssl/ssl_error_assistant:make_ssl_error_assistant_protobuf" ]
53 }
Daniel Ruberyaf17ad32020-03-02 20:06:4954
Daniel Rubery4fac1e82021-07-12 19:06:0655 if (safe_browsing_mode > 0) {
Colin Blundellc8669e32021-07-05 10:48:0456 deps += [
57 "//components/safe_browsing/content/resources:make_file_types_protobuf",
58 ]
Daniel Ruberyaf17ad32020-03-02 20:06:4959 }
[email protected]63b99ff2014-04-24 00:37:3060}
[email protected]797b25042014-07-01 23:54:1761
Samuel Huang1b99a062020-01-08 22:20:3462grit("dev_ui_components_resources") {
63 source = "dev_ui_components_resources.grd"
64
65 outputs = [
66 "grit/dev_ui_components_resources.h",
67 "dev_ui_components_resources.pak",
68 ]
69 output_dir = "$root_gen_dir/components"
70}
71
[email protected]797b25042014-07-01 23:54:1772grit("components_scaled_resources") {
73 source = "components_scaled_resources.grd"
scottmgac0ea0312014-12-03 19:21:0574
[email protected]b89c53842014-07-23 16:32:3275 outputs = [
hashimotocfb460f2014-09-25 06:59:0076 "grit/components_scaled_resources.h",
droger2a6ab542015-10-09 16:10:2877 "grit/components_scaled_resources_map.cc",
78 "grit/components_scaled_resources_map.h",
hashimotocfb460f2014-09-25 06:59:0079 "components_resources_100_percent.pak",
80 "components_resources_200_percent.pak",
lliabraaea7d7402014-10-31 22:09:3881 "components_resources_300_percent.pak",
[email protected]b89c53842014-07-23 16:32:3282 ]
mukaifc01b282014-10-10 06:27:1183 output_dir = "$root_gen_dir/components"
[email protected]797b25042014-07-01 23:54:1784}
droger1f86ef62015-10-01 13:05:2285
Takuto Ikuta674865952021-05-28 04:02:2486action("about_credits") {
droger1f86ef62015-10-01 13:05:2287 script = "//tools/licenses.py"
agrievebe961802017-02-15 18:48:2088 depfile = "$target_gen_dir/$target_name.d"
droger1f86ef62015-10-01 13:05:2289
90 inputs = [
droger1f86ef62015-10-01 13:05:2291 "../about_ui/resources/about_credits.tmpl",
92 "../about_ui/resources/about_credits_entry.tmpl",
93 ]
94
Nico Weberd77e027c2020-01-16 18:40:4895 outputs = [ about_credits_file ]
droger1f86ef62015-10-01 13:05:2296
97 args = [
sdefresned13d15b2016-02-17 18:06:5498 "--target-os=$target_os",
agrievebe961802017-02-15 18:48:2099 "--depfile",
100 rebase_path(depfile, root_build_dir),
droger1f86ef62015-10-01 13:05:22101 "credits",
102 rebase_path(about_credits_file, root_build_dir),
103 ]
Mohamed Heikal717315e2021-03-17 19:46:36104
105 # Defined by downstream projects.
106 if (defined(extra_third_party_notice_dirs)) {
107 args += [ "--extra-third-party-dirs=$extra_third_party_notice_dirs" ]
108 }
droger1f86ef62015-10-01 13:05:22109}
Mugdha Lakhanib6762162020-03-30 10:23:25110
111if (is_android) {
112 source_set("android_resources") {
113 sources = [
Clark DuVall911f84fc2020-06-17 03:47:03114 "android/blocked_content_resource_id.h",
Mugdha Lakhanib6762162020-03-30 10:23:25115 "android/page_info_resource_id.h",
116 "android/permissions_resource_id.h",
Evan Stade8fd3c8e42020-08-08 02:43:29117 "android/sms_resource_id.h",
Mugdha Lakhanib6762162020-03-30 10:23:25118 "android/theme_resources.h",
Alexander Cooperfc608d52020-10-12 20:03:34119 "android/webxr_resource_id.h",
Mugdha Lakhanib6762162020-03-30 10:23:25120 ]
Alexander Cooperfc608d52020-10-12 20:03:34121
122 public_deps = [ "//device/vr/buildflags" ]
Mugdha Lakhanib6762162020-03-30 10:23:25123 }
124}