blob: a172ec17cc5f138646ad306048ad864ad2fc70f2 [file] [log] [blame]
# Copyright 2015 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("//tools/grit/repack.gni")
import("//tools/grit/grit_rule.gni")
repack("pak") {
sources = [
"$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
"$root_gen_dir/blink/public/resources/blink_resources.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
"$root_gen_dir/content/app/strings/content_strings_en-US.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/net/net_resources.pak",
"$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
"$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
"$root_gen_dir/ui/strings/ui_strings_en-US.pak",
]
deps = [
"//content:resources",
"//content/app/resources",
"//content/app/strings",
"//content/browser/tracing:resources",
"//net:net_resources",
"//third_party/WebKit/public:image_resources",
"//third_party/WebKit/public:resources",
"//ui/resources",
"//ui/strings",
]
if (toolkit_views) {
deps += [ "//ui/views/resources" ]
sources +=
[ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
}
output = "$root_out_dir/blimp_engine.pak"
}
source_set("unit_tests") {
testonly = true
deps = [
"//blimp/engine/browser:unit_tests",
]
}
if (is_linux) {
executable("blimp_engine_app") {
sources = [
"app/blimp_main.cc",
]
deps = [
":pak",
"//blimp/engine/app",
"//blimp/net:blimp_net",
]
}
group("blimp_engine") {
deps = [
":blimp_engine_app",
":pak",
"//sandbox/linux:chrome_sandbox",
]
# List dependencies as both deps and data_deps to ensure changes trigger a
# rebuild and "gn desc ... runtime_deps" correctly prints the data_deps.
data_deps = deps
}
# Builds and bundles the engine into a tarball that can be used to build a
# Docker image.
action("blimp_engine_bundle") {
script = "//blimp/tools/bundle-engine.py"
# These form the arguments to the script.
_rebased_out_dir = rebase_path(root_out_dir)
_rebased_dockerfile = rebase_path("//blimp/engine/Dockerfile")
_rebased_manifest = rebase_path("//blimp/engine/engine-manifest.txt")
_bundle = "$root_out_dir/blimp_engine_bundle.tar"
# Detail the target & "source"-file dependencies, and output, for GN.
deps = [
"//blimp/engine:blimp_engine",
]
sources = [
_rebased_dockerfile,
_rebased_manifest,
]
outputs = [
_bundle,
]
# Manually specify the actual arguments to the script.
args = [
"--build-dir",
_rebased_out_dir,
"--dockerfile",
_rebased_dockerfile,
"--manifest",
_rebased_manifest,
"--output",
rebase_path(_bundle),
]
}
}