blob: 7c43a0421b4bead4f8fa8f779a00247093567abd [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("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
if (is_win) {
executable("setup") {
sources = [
"setup.ico",
"setup.rc",
"setup_exe_version.rc.version",
"setup_main.cc",
"setup_main.h",
"setup_resource.h",
"uninstall.cc",
"uninstall.h",
]
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
deps = [
":lib",
":setup_exe_version",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
"//chrome/install_static:install_static_util",
"//components/crash/content/app:app",
"//components/crash/content/app:run_as_crashpad_handler",
]
}
static_library("lib") {
sources = [
"archive_patch_helper.cc",
"archive_patch_helper.h",
"install.cc",
"install.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",
"persistent_histogram_storage.cc",
"persistent_histogram_storage.h",
"progress_calculator.cc",
"progress_calculator.h",
"setup_constants.cc",
"setup_constants.h",
"setup_singleton.cc",
"setup_singleton.h",
"setup_util.cc",
"setup_util.h",
"update_active_setup_version_work_item.cc",
"update_active_setup_version_work_item.h",
"user_hive_visitor.cc",
"user_hive_visitor.h",
]
public_deps = [
"//base",
"//chrome/common:constants",
"//chrome/common:version_header",
"//chrome/install_static:install_static_util",
"//chrome/installer/util:with_rc_strings",
"//chrome_elf:constants",
"//components/base32",
"//components/crash/content/app:app",
"//components/crash/content/app:lib",
"//components/crash/core/common",
"//content/public/common:static_switches",
"//courgette:courgette_lib",
"//rlz:rlz_lib",
"//third_party/bspatch",
"//third_party/zlib",
]
}
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_singleton_unittest.cc",
"setup_util_unittest.cc",
"setup_util_unittest.h",
"update_active_setup_version_work_item_unittest.cc",
"user_hive_visitor_unittest.cc",
]
deps = [
":lib",
"//base",
"//base:i18n",
"//base/test:test_support",
"//chrome/install_static:install_static_util",
"//chrome/installer/mini_installer:unit_tests",
"//chrome/installer/util:test_support",
"//testing/gmock",
"//testing/gtest",
]
data = [
"//chrome/installer/test/data/",
"//chrome/test/data/installer/",
]
}
}