# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//printing/features/features.gni") import("//tools/grit/grit_rule.gni") import("//third_party/brotli/brotli.gni") about_credits_file = "$target_gen_dir/about_credits.html" about_credits_file_bro = "$target_gen_dir/about_credits.bro" group("resources") { public_deps = [ ":components_resources", ":components_scaled_resources", ] } grit("components_resources") { source = "components_resources.grd" # TODO(hashimoto): Remove this line. output_name = "components_resources_new" outputs = [ "grit/components_resources.h", "components_resources.pak", ] output_dir = "$root_gen_dir/components" grit_flags = [ "-E", "about_credits_file=" + rebase_path(about_credits_file_bro, root_build_dir), ] defines = [ "enable_basic_printing=$enable_basic_printing", "enable_print_preview=$enable_print_preview", ] deps = [ ":compressed_about_credits", ] } grit("components_scaled_resources") { source = "components_scaled_resources.grd" # TODO(hashimoto): Remove this line. output_name = "components_scaled_resources_new" outputs = [ "grit/components_scaled_resources.h", "grit/components_scaled_resources_map.cc", "grit/components_scaled_resources_map.h", "components_resources_100_percent.pak", "components_resources_200_percent.pak", "components_resources_300_percent.pak", ] output_dir = "$root_gen_dir/components" } compress_file_brotli("compressed_about_credits") { input_file = about_credits_file output_file = about_credits_file_bro deps = [ ":about_credits", ] } action("about_credits") { script = "//tools/licenses.py" depfile = "$target_gen_dir/$target_name.d" inputs = [ "../about_ui/resources/about_credits.tmpl", "../about_ui/resources/about_credits_entry.tmpl", ] outputs = [ about_credits_file, ] args = [ "--target-os=$target_os", "--depfile", rebase_path(depfile, root_build_dir), "credits", rebase_path(about_credits_file, root_build_dir), ] }