blob: b7dfb20eece9a1cd46cffd0e691c7769362f9b4e [file] [log] [blame]
# 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("//tools/grit/grit_rule.gni")
if (is_android) {
import("//build/config/android/rules.gni")
android_generated_java_resources = [
"java/res/values-am/generated_resources.xml",
"java/res/values-ar/generated_resources.xml",
"java/res/values-bg/generated_resources.xml",
"java/res/values-ca/generated_resources.xml",
"java/res/values-cs/generated_resources.xml",
"java/res/values-da/generated_resources.xml",
"java/res/values-de/generated_resources.xml",
"java/res/values-el/generated_resources.xml",
"java/res/values-en-rGB/generated_resources.xml",
"java/res/values-es-rUS/generated_resources.xml",
"java/res/values-es/generated_resources.xml",
"java/res/values-fa/generated_resources.xml",
"java/res/values-fi/generated_resources.xml",
"java/res/values-fr/generated_resources.xml",
"java/res/values-hi/generated_resources.xml",
"java/res/values-hr/generated_resources.xml",
"java/res/values-hu/generated_resources.xml",
"java/res/values-in/generated_resources.xml",
"java/res/values-it/generated_resources.xml",
"java/res/values-iw/generated_resources.xml",
"java/res/values-ja/generated_resources.xml",
"java/res/values-ko/generated_resources.xml",
"java/res/values-lt/generated_resources.xml",
"java/res/values-lv/generated_resources.xml",
"java/res/values-nb/generated_resources.xml",
"java/res/values-nl/generated_resources.xml",
"java/res/values-pl/generated_resources.xml",
"java/res/values-pt-rBR/generated_resources.xml",
"java/res/values-pt-rPT/generated_resources.xml",
"java/res/values-ro/generated_resources.xml",
"java/res/values-ru/generated_resources.xml",
"java/res/values-sk/generated_resources.xml",
"java/res/values-sl/generated_resources.xml",
"java/res/values-sr/generated_resources.xml",
"java/res/values-sv/generated_resources.xml",
"java/res/values-sw/generated_resources.xml",
"java/res/values-th/generated_resources.xml",
"java/res/values-tl/generated_resources.xml",
"java/res/values-tr/generated_resources.xml",
"java/res/values-uk/generated_resources.xml",
"java/res/values-vi/generated_resources.xml",
"java/res/values-zh-rCN/generated_resources.xml",
"java/res/values-zh-rTW/generated_resources.xml",
"java/res/values/generated_resources.xml",
]
}
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_generated_resources action)
grit("generated_resources") {
source = "generated_resources.grd"
output_dir = "$root_gen_dir/chrome"
use_qualified_include = true
outputs = [
"grit/generated_resources.h",
"generated_resources_am.pak",
"generated_resources_ar.pak",
"generated_resources_bg.pak",
"generated_resources_bn.pak",
"generated_resources_ca.pak",
"generated_resources_cs.pak",
"generated_resources_da.pak",
"generated_resources_de.pak",
"generated_resources_el.pak",
"generated_resources_en-GB.pak",
"generated_resources_en-US.pak",
"generated_resources_es.pak",
"generated_resources_es-419.pak",
"generated_resources_et.pak",
"generated_resources_fa.pak",
"generated_resources_fake-bidi.pak",
"generated_resources_fi.pak",
"generated_resources_fil.pak",
"generated_resources_fr.pak",
"generated_resources_gu.pak",
"generated_resources_he.pak",
"generated_resources_hi.pak",
"generated_resources_hr.pak",
"generated_resources_hu.pak",
"generated_resources_id.pak",
"generated_resources_it.pak",
"generated_resources_ja.pak",
"generated_resources_kn.pak",
"generated_resources_ko.pak",
"generated_resources_lt.pak",
"generated_resources_lv.pak",
"generated_resources_ml.pak",
"generated_resources_mr.pak",
"generated_resources_ms.pak",
"generated_resources_nl.pak",
"generated_resources_nb.pak",
"generated_resources_pl.pak",
"generated_resources_pt-BR.pak",
"generated_resources_pt-PT.pak",
"generated_resources_ro.pak",
"generated_resources_ru.pak",
"generated_resources_sk.pak",
"generated_resources_sl.pak",
"generated_resources_sr.pak",
"generated_resources_sv.pak",
"generated_resources_sw.pak",
"generated_resources_ta.pak",
"generated_resources_te.pak",
"generated_resources_th.pak",
"generated_resources_tr.pak",
"generated_resources_uk.pak",
"generated_resources_vi.pak",
"generated_resources_zh-CN.pak",
"generated_resources_zh-TW.pak",
]
if (is_android) {
outputs += android_generated_java_resources
}
}
if (is_android) {
java_strings_grd_prebuilt("java_strings_grd") {
grit_output_dir = "$root_gen_dir/chrome/java/res"
generated_files =
rebase_path(android_generated_java_resources, "java/res", ".")
}
}
# GYP version: chrome/chrome_resources.gyp:chrome_strings_map
action("make_generated_resources_map") {
# Targets should depend on generated_resources_map instead.
visibility = [ ":generated_resources_map" ]
script = "//chrome/browser/metrics/variations/generate_resources_map.py"
inputs = [
"$root_gen_dir/chrome/grit/generated_resources.h",
]
outputs = [
"$root_gen_dir/chrome/generated_resources_map.cc",
]
args =
rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
deps = [
":generated_resources",
]
}
# Collect the generated .cc file from make_generated_resources_map and put it
# in a source set so targets that depend on it will link the source rather than
# specifying it manually. This doesn't happen in the GYP build.
source_set("generated_resources_map") {
sources = get_target_outputs(":make_generated_resources_map")
}
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_google_chrome_strings action)
grit("google_chrome_strings") {
source = "google_chrome_strings.grd"
output_dir = "$root_gen_dir/chrome"
use_qualified_include = true
outputs = [
"grit/google_chrome_strings.h",
"google_chrome_strings_am.pak",
"google_chrome_strings_ar.pak",
"google_chrome_strings_bg.pak",
"google_chrome_strings_bn.pak",
"google_chrome_strings_ca.pak",
"google_chrome_strings_cs.pak",
"google_chrome_strings_da.pak",
"google_chrome_strings_de.pak",
"google_chrome_strings_el.pak",
"google_chrome_strings_en-GB.pak",
"google_chrome_strings_en-US.pak",
"google_chrome_strings_es.pak",
"google_chrome_strings_es-419.pak",
"google_chrome_strings_et.pak",
"google_chrome_strings_fa.pak",
"google_chrome_strings_fi.pak",
"google_chrome_strings_fil.pak",
"google_chrome_strings_fr.pak",
"google_chrome_strings_gu.pak",
"google_chrome_strings_he.pak",
"google_chrome_strings_hi.pak",
"google_chrome_strings_hr.pak",
"google_chrome_strings_hu.pak",
"google_chrome_strings_id.pak",
"google_chrome_strings_it.pak",
"google_chrome_strings_ja.pak",
"google_chrome_strings_kn.pak",
"google_chrome_strings_ko.pak",
"google_chrome_strings_lt.pak",
"google_chrome_strings_lv.pak",
"google_chrome_strings_ml.pak",
"google_chrome_strings_mr.pak",
"google_chrome_strings_ms.pak",
"google_chrome_strings_nl.pak",
"google_chrome_strings_nb.pak",
"google_chrome_strings_pl.pak",
"google_chrome_strings_pt-BR.pak",
"google_chrome_strings_pt-PT.pak",
"google_chrome_strings_ro.pak",
"google_chrome_strings_ru.pak",
"google_chrome_strings_sk.pak",
"google_chrome_strings_sl.pak",
"google_chrome_strings_sr.pak",
"google_chrome_strings_sv.pak",
"google_chrome_strings_sw.pak",
"google_chrome_strings_ta.pak",
"google_chrome_strings_te.pak",
"google_chrome_strings_th.pak",
"google_chrome_strings_tr.pak",
"google_chrome_strings_uk.pak",
"google_chrome_strings_vi.pak",
"google_chrome_strings_zh-CN.pak",
"google_chrome_strings_zh-TW.pak",
"google_chrome_strings_fake-bidi.pak",
]
}
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_chromium_strings action)
grit("chromium_strings") {
source = "chromium_strings.grd"
output_dir = "$root_gen_dir/chrome"
use_qualified_include = true
outputs = [
"grit/chromium_strings.h",
"chromium_strings_am.pak",
"chromium_strings_ar.pak",
"chromium_strings_bg.pak",
"chromium_strings_bn.pak",
"chromium_strings_ca.pak",
"chromium_strings_cs.pak",
"chromium_strings_da.pak",
"chromium_strings_de.pak",
"chromium_strings_el.pak",
"chromium_strings_en-GB.pak",
"chromium_strings_en-US.pak",
"chromium_strings_es.pak",
"chromium_strings_es-419.pak",
"chromium_strings_et.pak",
"chromium_strings_fa.pak",
"chromium_strings_fake-bidi.pak",
"chromium_strings_fi.pak",
"chromium_strings_fil.pak",
"chromium_strings_fr.pak",
"chromium_strings_gu.pak",
"chromium_strings_he.pak",
"chromium_strings_hi.pak",
"chromium_strings_hr.pak",
"chromium_strings_hu.pak",
"chromium_strings_id.pak",
"chromium_strings_it.pak",
"chromium_strings_ja.pak",
"chromium_strings_kn.pak",
"chromium_strings_ko.pak",
"chromium_strings_lt.pak",
"chromium_strings_lv.pak",
"chromium_strings_ml.pak",
"chromium_strings_mr.pak",
"chromium_strings_ms.pak",
"chromium_strings_nl.pak",
"chromium_strings_nb.pak",
"chromium_strings_pl.pak",
"chromium_strings_pt-BR.pak",
"chromium_strings_pt-PT.pak",
"chromium_strings_ro.pak",
"chromium_strings_ru.pak",
"chromium_strings_sk.pak",
"chromium_strings_sl.pak",
"chromium_strings_sr.pak",
"chromium_strings_sv.pak",
"chromium_strings_sw.pak",
"chromium_strings_ta.pak",
"chromium_strings_te.pak",
"chromium_strings_th.pak",
"chromium_strings_tr.pak",
"chromium_strings_uk.pak",
"chromium_strings_vi.pak",
"chromium_strings_zh-CN.pak",
"chromium_strings_zh-TW.pak",
]
}
source_set("test_support") {
testonly = true
visibility = [ "//chrome/test:test_support" ]
sources = [
"chrome_main_delegate.cc",
"chrome_main_delegate.h",
"close_handle_hook_win.cc",
"close_handle_hook_win.h",
]
deps = [
"//base",
"//chrome/browser",
"//chrome/child",
"//chrome/common",
"//chrome/plugin",
"//chrome/renderer",
"//chrome/utility",
"//content/public/app:both",
"//content/public/common",
"//ui/base",
]
if (is_mac) {
sources += [ "chrome_main_mac.mm" ]
}
if (enable_plugins && enable_nacl) {
deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
}
if (enable_remoting) {
deps += [ "//remoting/client/plugin" ]
}
}