| # 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("//chrome/process_version_rc_template.gni") |
| import("//testing/test.gni") |
| |
| # This target builds the updater executable, its installer, and unittests. |
| group("win") { |
| deps = [ |
| ":updater", |
| "//chrome/updater/win/installer:installer", |
| ] |
| } |
| |
| executable("updater") { |
| sources = [ |
| "main.cc", |
| "updater.rc", |
| ] |
| |
| configs += [ "//build/config/win:windowed" ] |
| |
| libs = [ "winhttp.lib" ] |
| deps = [ |
| ":code", |
| ":version_resources", |
| "//build/win:default_exe_manifest", |
| "//chrome/updater:common", |
| ] |
| } |
| |
| copy("uninstall.cmd") { |
| sources = [ |
| "setup/uninstall.cmd", |
| ] |
| outputs = [ |
| "$target_gen_dir/uninstall.cmd", |
| ] |
| } |
| |
| process_version_rc_template("version_resources") { |
| sources = [ |
| "updater.ver", |
| ] |
| output = "$target_gen_dir/updater_exe.rc" |
| } |
| |
| source_set("code") { |
| sources = [ |
| "net/net_util.cc", |
| "net/net_util.h", |
| "net/network.h", |
| "net/network_fetcher.cc", |
| "net/network_fetcher.h", |
| "net/network_winhttp.cc", |
| "net/network_winhttp.h", |
| "net/scoped_hinternet.h", |
| "setup/setup.cc", |
| "setup/setup.h", |
| "setup/setup_util.cc", |
| "setup/setup_util.h", |
| "setup/uninstall.cc", |
| "setup/uninstall.h", |
| "task_scheduler.cc", |
| "task_scheduler.h", |
| "util.cc", |
| "util.h", |
| ] |
| |
| defines = [ "SECURITY_WIN32" ] |
| |
| libs = [ |
| "secur32.lib", |
| "taskschd.lib", |
| ] |
| |
| deps = [ |
| "//base", |
| "//chrome/installer/util:with_no_strings", |
| "//chrome/updater:common", |
| "//components/update_client", |
| ] |
| } |
| |
| # Tests built into Chrome's unit_tests.exe. |
| source_set("updater_tests") { |
| testonly = true |
| |
| sources = [ |
| "net/network_unittest.cc", |
| "util_unittest.cc", |
| ] |
| |
| deps = [ |
| ":code", |
| "//base/test:test_support", |
| "//testing/gtest", |
| ] |
| |
| data_deps = [ |
| ":updater_unittests", |
| "//chrome/updater/win/installer:installer_unittest", |
| ] |
| } |
| |
| # Specific tests which must run in their own process due to COM, security, or |
| # test isolation requirements. |
| test("updater_unittests") { |
| testonly = true |
| |
| sources = [ |
| "//chrome/updater/win/test/test_main.cc", |
| "task_scheduler_unittest.cc", |
| ] |
| |
| deps = [ |
| ":code", |
| "//base", |
| "//base/test:test_support", |
| "//chrome/updater/win/test:test_executables", |
| "//chrome/updater/win/test:test_strings", |
| "//testing/gtest", |
| ] |
| } |