| # Copyright 2018 The Fuchsia 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("//build/components.gni") |
| import("//build/icu/icu_executable.gni") |
| import("//build/icu/icu_fuchsia_component.gni") |
| import("//build/icu/icu_fuchsia_package.gni") |
| import("//build/icu/icu_source_set.gni") |
| |
| icu_executable("bin") { |
| output_name = "a11y_manager" |
| |
| sources = [ "main.cc" ] |
| |
| icu_deps = [ |
| ":lib", |
| "//src/intl/intl_services:lib", |
| ] |
| |
| deps = [ |
| "//sdk/lib/inspect/component/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/ui/a11y/lib/annotation", |
| "//src/ui/a11y/lib/util", |
| "//src/ui/a11y/lib/view", |
| "//third_party/glm", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/trace-provider", |
| ] |
| } |
| |
| l10n_files = [ |
| # Needed to load Screen Reader strings. |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/en/l10n.json" |
| dest = "data/assets/locales/en/l10n.json" |
| language = "en" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/ar-XB/l10n.json" |
| dest = "data/assets/locales/ar-XB/l10n.json" |
| language = "ar-XB" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/da/l10n.json" |
| dest = "data/assets/locales/da/l10n.json" |
| language = "da" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/de/l10n.json" |
| dest = "data/assets/locales/de/l10n.json" |
| language = "de" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/de-CH/l10n.json" |
| dest = "data/assets/locales/de-CH/l10n.json" |
| language = "de-CH" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/en-GB/l10n.json" |
| dest = "data/assets/locales/en-GB/l10n.json" |
| language = "en-GB" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/en-XA/l10n.json" |
| dest = "data/assets/locales/en-XA/l10n.json" |
| language = "en-XA" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/en-XC/l10n.json" |
| dest = "data/assets/locales/en-XC/l10n.json" |
| language = "en-XC" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/es/l10n.json" |
| dest = "data/assets/locales/es/l10n.json" |
| language = "es" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/es-419/l10n.json" |
| dest = "data/assets/locales/es-419/l10n.json" |
| language = "es-419" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/fr/l10n.json" |
| dest = "data/assets/locales/fr/l10n.json" |
| language = "fr" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/fr-CA/l10n.json" |
| dest = "data/assets/locales/fr-CA/l10n.json" |
| language = "fr-CA" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/it/l10n.json" |
| dest = "data/assets/locales/it/l10n.json" |
| language = "it" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/ja/l10n.json" |
| dest = "data/assets/locales/ja/l10n.json" |
| language = "ja" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/ko/l10n.json" |
| dest = "data/assets/locales/ko/l10n.json" |
| language = "ko" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/nb/l10n.json" |
| dest = "data/assets/locales/nb/l10n.json" |
| language = "nb" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/nl/l10n.json" |
| dest = "data/assets/locales/nl/l10n.json" |
| language = "nl" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/no/l10n.json" |
| dest = "data/assets/locales/no/l10n.json" |
| language = "no" |
| }, |
| { |
| path = "$target_gen_dir/../../lib/screen_reader/i18n/sv/l10n.json" |
| dest = "data/assets/locales/sv/l10n.json" |
| language = "sv" |
| }, |
| ] |
| |
| l10n_resource_deps = [] |
| |
| foreach(file, l10n_files) { |
| language = file.language |
| name = "resource_$language" |
| resource(name) { |
| sources = [ file.path ] |
| outputs = [ file.dest ] |
| deps = [ "//src/ui/a11y/lib/screen_reader/i18n:resources" ] |
| } |
| l10n_resource_deps += [ ":$name" ] |
| } |
| |
| icu_fuchsia_component("component_v2") { |
| component_name = "a11y-manager" |
| manifest = "meta/a11y_manager.cml" |
| icu_deps = [ |
| ":bin", |
| |
| # Fuchsia's ICU does not have libicudata.so, and the locale data MUST |
| # be loaded from a file instead. |
| "//src/lib/icu:icudtl", |
| ] |
| deps = [ "//src/ui/a11y/lib/screen_reader/i18n:resources" ] |
| deps += l10n_resource_deps |
| } |
| |
| icu_fuchsia_package("a11y-manager") { |
| icu_deps = [ ":component_v2" ] |
| } |
| |
| icu_source_set("lib") { |
| sources = [ |
| "app.cc", |
| "app.h", |
| ] |
| |
| icu_public_deps = [ "//src/ui/a11y/lib:lib" ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.accessibility:fuchsia.accessibility_hlcpp", |
| "//sdk/fidl/fuchsia.accessibility.gesture:fuchsia.accessibility.gesture_hlcpp", |
| "//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_hlcpp", |
| "//sdk/fidl/fuchsia.accessibility.tts:fuchsia.accessibility.tts_hlcpp", |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp", |
| "//sdk/fidl/fuchsia.math:fuchsia.math_hlcpp", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings_hlcpp", |
| "//sdk/fidl/fuchsia.ui.input.accessibility:fuchsia.ui.input.accessibility_hlcpp", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_hlcpp", |
| "//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_hlcpp", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| ] |
| } |