123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- # Copyright 2019 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("//build/config/features.gni")
- import("//build/config/sanitizers/sanitizers.gni")
- import("//build/config/ui.gni")
- import("//build/config/win/console_app.gni")
- import("//build/config/win/manifest.gni")
- import("//tools/grit/grit_rule.gni")
- import("//tools/grit/repack.gni")
- import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
- if (is_android) {
- import("//build/config/android/config.gni")
- }
- static_library("weblayer_shell_lib") {
- testonly = true
- sources = [
- "app/shell_main_params.cc",
- "app/shell_main_params.h",
- "browser/shell.cc",
- "browser/shell.h",
- "common/shell_switches.cc",
- "common/shell_switches.h",
- ]
- if (is_android) {
- sources += [ "browser/shell_android.cc" ]
- }
- configs += [ "//build/config:precompiled_headers" ]
- public_deps = [ "//weblayer:weblayer_lib" ]
- deps = [
- ":resources",
- "//base",
- "//base:base_static",
- "//base/third_party/dynamic_annotations",
- "//net",
- "//net:net_resources",
- "//sandbox",
- "//skia",
- "//third_party/icu",
- "//ui/base",
- "//ui/base/clipboard",
- "//ui/base/ime/init",
- "//ui/display",
- "//ui/events:events_base",
- "//ui/gfx",
- "//ui/gfx/geometry",
- "//ui/gfx/ipc",
- "//ui/gfx/ipc/geometry",
- "//ui/gfx/ipc/skia",
- "//ui/gl",
- "//ui/platform_window",
- "//url",
- "//v8",
- "//weblayer:resources",
- ]
- if (is_linux || is_chromeos) {
- deps += [
- "//third_party/fontconfig",
- "//ui/gfx:test_support",
- ]
- }
- if (is_android) {
- deps += [ "//ui/android" ]
- }
- if (toolkit_views) {
- deps += [ "//ui/views" ]
- }
- if (use_aura) {
- deps += [
- "//ui/aura",
- "//ui/aura:test_support",
- "//ui/events",
- "//ui/strings",
- "//ui/wm",
- ]
- if (toolkit_views) {
- sources += [ "browser/shell_views.cc" ]
- deps += [
- "//ui/color:color_headers",
- "//ui/native_theme",
- "//ui/resources",
- "//ui/views:test_support",
- "//ui/views/controls/webview",
- "//ui/wm:test_support",
- ]
- }
- }
- if (is_linux || is_chromeos) {
- deps += [ "//build/config/freetype" ]
- }
- }
- grit("weblayer_shell_resources_grit") {
- testonly = true
- # External code should depend on ":resources" instead.
- visibility = [ ":*" ]
- source = "shell_resources.grd"
- outputs = [
- "grit/shell_resources.h",
- "weblayer_shell_resources.pak",
- ]
- }
- copy("copy_shell_resources") {
- testonly = true
- sources = [ "$target_gen_dir/weblayer_shell_resources.pak" ]
- outputs = [ "$root_out_dir/weblayer_shell_resources.pak" ]
- public_deps = [ ":weblayer_shell_resources_grit" ]
- }
- group("resources") {
- testonly = true
- public_deps = [ ":copy_shell_resources" ]
- }
- repack("shell_pak") {
- testonly = true
- sources = [ "$root_gen_dir/weblayer/shell/weblayer_shell_resources.pak" ]
- deps = [ ":resources" ]
- output = "$root_out_dir/weblayer_shell.pak"
- }
- repack("support_pak") {
- testonly = true
- sources = [
- "$root_gen_dir/components/components_resources.pak",
- "$root_gen_dir/components/components_resources_100_percent.pak",
- "$root_gen_dir/components/strings/components_chromium_strings_en-US.pak",
- "$root_gen_dir/components/strings/components_locale_settings_en-US.pak",
- "$root_gen_dir/components/strings/components_strings_en-US.pak",
- "$root_gen_dir/content/content_resources.pak",
- "$root_gen_dir/content/dev_ui_content_resources.pak",
- "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
- "$root_gen_dir/net/net_resources.pak",
- "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
- "$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak",
- "$root_gen_dir/third_party/blink/public/strings/blink_strings_en-US.pak",
- "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
- "$root_gen_dir/ui/resources/webui_generated_resources.pak",
- "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
- "$root_gen_dir/ui/strings/ax_strings_en-US.pak",
- "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
- "$root_gen_dir/weblayer/weblayer_resources.pak",
- ]
- deps = [
- "//components/resources",
- "//components/strings",
- "//content:content_resources",
- "//content:dev_ui_content_resources",
- "//mojo/public/js:resources",
- "//net:net_resources",
- "//third_party/blink/public:resources",
- "//third_party/blink/public:scaled_resources_100_percent",
- "//third_party/blink/public/strings",
- "//ui/resources",
- "//ui/strings",
- "//weblayer:resources",
- ]
- if (toolkit_views) {
- deps += [ "//ui/views/resources" ]
- sources +=
- [ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
- }
- if (is_android) {
- deps += [ "//ui/android:ui_java_resources" ]
- } else {
- deps += [ "//content/browser/tracing:resources" ]
- sources += [ "$root_gen_dir/content/browser/tracing/tracing_resources.pak" ]
- }
- output = "$root_out_dir/weblayer_support.pak"
- }
- repack("pak") {
- testonly = true
- sources = [
- "$root_out_dir/weblayer_shell.pak",
- "$root_out_dir/weblayer_support.pak",
- ]
- deps = [
- ":shell_pak",
- ":support_pak",
- ]
- output = "$root_out_dir/weblayer.pak"
- }
- if (is_android) {
- group("weblayer_shell") {
- testonly = true
- deps = [ "//weblayer/shell/android:weblayer_shell_apk" ]
- }
- group("weblayer_support") {
- testonly = true
- deps = [ "//weblayer/shell/android:weblayer_support_apk" ]
- }
- } else {
- executable("weblayer_shell") {
- testonly = true
- sources = [ "app/shell_main.cc" ]
- if (is_win) {
- sources += [ "app/shell.rc" ]
- }
- defines = []
- deps = [
- ":weblayer_shell_lib",
- "//base",
- "//build/win:default_exe_manifest",
- "//net",
- ]
- data_deps = [
- ":pak",
- "//tools/v8_context_snapshot:v8_context_snapshot",
- ]
- if (is_win) {
- deps += [ "//sandbox" ]
- if (win_console_app) {
- defines += [ "WIN_CONSOLE_APP" ]
- } else {
- # Set /SUBSYSTEM:WINDOWS unless a console build has been requested.
- configs -= [ "//build/config/win:console" ]
- configs += [ "//build/config/win:windowed" ]
- }
- data_deps +=
- [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ]
- }
- if ((is_linux || is_chromeos) && !is_component_build) {
- # Set rpath to find our own libfreetype even in a non-component build.
- configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
- }
- }
- }
|