blob: 7bf0b6d6db61a4dff0a1090b8136b9ff3beeb16a [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/buildflag_header.gni")
import("//build/config/chrome_build.gni")
import("//chrome/installer/setup/buildflags.gni")
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "ZUCCHINI=$use_zucchini" ]
}
if (is_win) {
executable("setup") {
sources = [
"setup.rc",
"setup_main.cc",
"setup_main.h",
"setup_resource.h",
"uninstall.cc",
"uninstall.h",
]
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
deps = [
":buildflags",
":lib",
":setup_exe_version",
"//base",
"//build:branding_buildflags",
"//build/win:default_exe_manifest",
"//chrome/chrome_elf:constants",
"//chrome/common:constants",
"//chrome/install_static:install_static_util",
"//chrome/installer/util:with_rc_strings",
"//components/crash/core/app:app",
"//components/crash/core/app:crash_export_thunks",
"//components/crash/core/app:run_as_crashpad_handler",
"//content/public/common:static_switches",
"//rlz:rlz_lib_no_network",
]
libs = [ "netapi32.lib" ]
}
static_library("lib") {
sources = [
"${branding_path_component}_behaviors.cc",
"archive_patch_helper.cc",
"archive_patch_helper.h",
"brand_behaviors.h",
"install.cc",
"install.h",
"install_params.h",
"install_worker.cc",
"install_worker.h",
"installer_crash_reporter_client.cc",
"installer_crash_reporter_client.h",
"installer_crash_reporting.cc",
"installer_crash_reporting.h",
"installer_state.cc",
"installer_state.h",
"launch_chrome.cc",
"launch_chrome.h",
"modify_params.h",
"progress_calculator.cc",
"progress_calculator.h",
"setup_constants.cc",
"setup_constants.h",
"setup_install_details.cc",
"setup_install_details.h",
"setup_singleton.cc",
"setup_singleton.h",
"setup_util.cc",
"setup_util.h",
"uninstall_metrics.cc",
"uninstall_metrics.h",
"update_active_setup_version_work_item.cc",
"update_active_setup_version_work_item.h",
"user_experiment.cc",
"user_experiment.h",
"user_hive_visitor.cc",
"user_hive_visitor.h",
]
public_deps = [
":buildflags",
"//base",
"//chrome/installer/util:with_rc_strings",
]
deps = [
"//build:branding_buildflags",
"//chrome/common:constants",
"//chrome/common:version_header",
"//chrome/install_static:buildflags",
"//chrome/install_static:install_static_util",
"//components/base32",
"//components/crash/core/app",
"//components/crash/core/common",
"//components/metrics",
"//components/zucchini:zucchini_io",
"//components/zucchini:zucchini_lib",
"//courgette:courgette_lib",
"//third_party/bspatch",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/util",
"//ui/base:fullscreen_win",
]
}
process_version_rc_template("setup_exe_version") {
template_file = "setup_exe_version.rc.version"
output = "$target_gen_dir/setup_exe_version.rc"
}
# This test covers the mini installer and setup tests.
test("setup_unittests") {
sources = [
"archive_patch_helper_unittest.cc",
"install_unittest.cc",
"install_worker_unittest.cc",
"installer_state_unittest.cc",
"memory_unittest.cc",
"progress_calculator_unittest.cc",
"run_all_unittests.cc",
"setup_install_details_unittest.cc",
"setup_singleton_unittest.cc",
"setup_util_unittest.cc",
"setup_util_unittest.h",
"uninstall_metrics_unittest.cc",
"update_active_setup_version_work_item_unittest.cc",
"user_experiment_unittest.cc",
"user_hive_visitor_unittest.cc",
]
deps = [
":lib",
"//base",
"//base:i18n",
"//base/allocator:buildflags",
"//base/test:test_support",
"//build:branding_buildflags",
"//chrome/common:constants",
"//chrome/common:version_header",
"//chrome/install_static:buildflags",
"//chrome/install_static:install_static_util",
"//chrome/install_static/test:test_support",
"//chrome/installer/mini_installer:unit_tests",
"//chrome/installer/util:serial_unittests",
"//chrome/installer/util:test_support",
"//components/crash/core/app:test_support",
"//testing/gmock",
"//testing/gtest",
]
data = [
"//chrome/installer/test/data/",
"//chrome/test/data/installer/",
]
libs = [ "netapi32.lib" ]
}
}