| # Copyright 2019 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/util/process_version.gni") |
| import("//chrome/updater/branding.gni") |
| import("//chrome/updater/updater_process_version_rc_template.gni") |
| import("//chrome/updater/zip.gni") |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| import("//testing/test.gni") |
| |
| # This target builds the updater executable, its installer, and unittests. |
| group("win") { |
| deps = [ |
| ":signing", |
| ":updater", |
| ":updater_zip", |
| "//chrome/updater/win/installer", |
| ] |
| } |
| |
| config("wrl_strict") { |
| # This definition is used in <wrl/module.h> to specify that only COM support |
| # is required in WRL and avoid a dependency on WinRT. |
| defines = [ "__WRL_CLASSIC_COM_STRICT__" ] |
| } |
| |
| source_set("updater_executable") { |
| sources = [ |
| "main.cc", |
| "updater.rc", |
| ] |
| |
| deps = [ |
| "//chrome/updater:base", |
| "//chrome/updater/win/ui/resources", |
| ] |
| |
| public_configs = [ "//build/config/win:windowed" ] |
| public_deps = [ "//build/win:default_exe_manifest" ] |
| |
| data_deps = [ ":uninstall.cmd" ] |
| } |
| |
| executable("updater") { |
| deps = [ |
| ":updater_executable", |
| ":version_resources", |
| "//chrome/updater:constants_prod", |
| ] |
| } |
| |
| executable("updater_test") { |
| deps = [ |
| ":updater_executable", |
| ":version_resources_test", |
| "//chrome/updater:constants_test", |
| ] |
| } |
| |
| copy("signing") { |
| sources = [ |
| "$root_out_dir/msi_custom_action.dll", |
| "$root_out_dir/tag.exe", |
| "//chrome/tools/build/win/resedit.py", |
| "//third_party/lzma_sdk/bin/win64/7zr.exe", |
| "signing/enterprise_standalone_installer.wxs.xml", |
| "signing/msi_from_standalone.py", |
| "signing/sign.py", |
| ] |
| |
| deps = [ |
| "//chrome/updater/tools:tag", |
| "//chrome/updater/win/installer:msi_custom_action", |
| ] |
| |
| outputs = [ "$root_out_dir/UpdaterSigning/{{source_file_part}}" ] |
| } |
| |
| artifact_zip("updater_zip") { |
| output = "$root_build_dir/updater.zip" |
| inputs = |
| [ |
| "$root_build_dir/UpdaterSetup.exe", |
| "$root_build_dir/UpdaterSetup_test.exe", |
| "$root_build_dir/qualification_app.exe", |
| "$root_build_dir/${updater_product_full_name}Util.exe", |
| "$root_gen_dir/chrome/updater/app/server/win/updater_idl.h", |
| "$root_gen_dir/chrome/updater/app/server/win/updater_internal_idl.h", |
| "$root_out_dir/LICENSE.${updater_product_full_name_dashed_lowercase}", |
| ] + get_target_outputs(":signing") |
| deps = [ |
| ":signing", |
| "//chrome/updater:updater_license", |
| "//chrome/updater/app/server/win:updater_idl", |
| "//chrome/updater/app/server/win:updater_internal_idl", |
| "//chrome/updater/test/qualification_app", |
| "//chrome/updater/tools:${updater_product_full_name}Util", |
| "//chrome/updater/win/installer", |
| "//chrome/updater/win/installer:installer_test", |
| ] |
| if (is_chrome_branded) { |
| inputs += [ |
| "$root_build_dir/GoogleUpdateAdmx.zip", |
| "$root_build_dir/GoogleCloudManagementAdmx.zip", |
| ] |
| deps += [ |
| "//chrome/updater/enterprise/win/google:GoogleCloudManagementAdmxZip", |
| "//chrome/updater/enterprise/win/google:GoogleUpdateAdmxZip", |
| ] |
| } |
| } |
| |
| process_version("uninstall.cmd") { |
| template_file = "setup/uninstall.cmd" |
| output = "$target_gen_dir/uninstall.cmd" |
| process_only = true |
| extra_args = [ |
| "-e", |
| "PRODUCT_FULLNAME=\"$updater_product_full_name\"", |
| "-e", |
| "COMPANY_SHORTNAME=\"$updater_company_short_name\"", |
| ] |
| } |
| |
| updater_process_version_rc_template("version_resources") { |
| original_filename = "updater.exe" |
| rc = "updater_exe.rc" |
| } |
| |
| updater_process_version_rc_template("version_resources_test") { |
| original_filename = "updater_test.exe" |
| rc = "updater_test_exe.rc" |
| suffix = "(test)" |
| } |