| # 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("//build/config/mac/rules.gni") |
| import("//build/util/version.gni") |
| import("//chrome/updater/branding.gni") |
| |
| group("mac") { |
| deps = [ |
| ":app_install", |
| ":browser_install_script", |
| ":updater_bundle", |
| ":updater_install_script", |
| "//chrome/updater/mac/signing", |
| ] |
| } |
| |
| source_set("network_fetcher_sources") { |
| sources = [ |
| "net/network.h", |
| "net/network_fetcher.h", |
| "net/network_fetcher.mm", |
| ] |
| |
| deps = [ |
| "//base", |
| "//components/crash/core/common:crash_key_lib", |
| "//components/update_client", |
| "//net", |
| ] |
| } |
| |
| source_set("updater_tests") { |
| testonly = true |
| |
| sources = [ "net/network_unittest.mm" ] |
| |
| deps = [ |
| ":network_fetcher_sources", |
| ":updater_setup_sources", |
| "//base/test:test_support", |
| "//net:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |
| |
| mac_app_bundle("updater_bundle") { |
| info_plist = "Info.plist" |
| output_name = updater_product_full_name |
| extra_substitutions = |
| [ "MAC_BUNDLE_IDENTIFIER=$mac_updater_bundle_identifier" ] |
| |
| sources = [ "main.cc" ] |
| deps = [ |
| ":app_install", |
| ":network_fetcher_sources", |
| ":updater_setup_sources", |
| "//chrome/updater:lib", |
| ] |
| } |
| |
| source_set("xpc_names") { |
| sources = [ |
| "xpc_service_names.h", |
| "xpc_service_names.mm", |
| ] |
| |
| deps = [ |
| "//base", |
| "//chrome/updater:version_header", |
| ] |
| |
| frameworks = [ "Foundation.framework" ] |
| } |
| |
| source_set("updater_setup_sources") { |
| sources = [ |
| "setup/setup.h", |
| "setup/setup.mm", |
| ] |
| |
| deps = [ |
| ":network_fetcher_sources", |
| ":xpc_names", |
| "//base", |
| "//chrome/common/mac:launchd", |
| "//chrome/updater:base", |
| "//chrome/updater:version_header", |
| "//components/crash/core/common:crash_key_lib", |
| "//mojo/public/cpp/platform", |
| ] |
| |
| allow_circular_includes_from = [ "//chrome/updater:base" ] |
| |
| frameworks = [ |
| "AppKit.framework", |
| "CoreServices.framework", |
| "ServiceManagement.framework", |
| ] |
| } |
| |
| source_set("app_install") { |
| sources = [ |
| "setup/app_install.cc", |
| "setup/app_install.h", |
| "setup/app_swap.cc", |
| "setup/app_swap.h", |
| ] |
| |
| deps = [ |
| ":updater_setup_sources", |
| "//base", |
| "//chrome/updater:base", |
| "//chrome/updater:lib", |
| "//chrome/updater:version_header", |
| ] |
| |
| allow_circular_includes_from = [ "//chrome/updater:lib" ] |
| } |
| |
| action("updater_install_script") { |
| script = "embed_variables.py" |
| |
| inputs = [ |
| script, |
| "setup/.install.sh", |
| ] |
| |
| outputs = [ "$root_out_dir/chrome/updater/.install" ] |
| |
| args = [ |
| "-i", |
| rebase_path("setup/.install.sh"), |
| "-o", |
| rebase_path(root_out_dir + "/chrome/updater/.install"), |
| "-p", |
| updater_product_full_name, |
| ] |
| } |
| |
| action("browser_install_script") { |
| script = "embed_variables.py" |
| |
| inputs = [ |
| script, |
| ".install.sh", |
| ] |
| |
| outputs = [ "$root_out_dir/$browser_product_name Packaging/updater/.install" ] |
| |
| args = [ |
| "-i", |
| rebase_path(".install.sh"), |
| "-o", |
| rebase_path( |
| root_out_dir + "/$browser_product_name Packaging/updater/.install"), |
| "-v", |
| chrome_version_full, |
| ] |
| } |
| |
| source_set("installer_sources") { |
| sources = [ |
| "installer.h", |
| "installer.mm", |
| ] |
| |
| deps = [ "//base" ] |
| } |
| |
| source_set("updater_setup_tests") { |
| testonly = true |
| |
| sources = [ "setup/setup_unittest.mm" ] |
| |
| data = [ "//chrome/test/data/updater/updater_setup_test_dmg.dmg" ] |
| |
| deps = [ |
| ":app_install", |
| ":installer_sources", |
| ":updater_setup_sources", |
| "//base", |
| "//base/test:test_support", |
| "//chrome/common:constants", |
| "//testing/gtest", |
| ] |
| } |
| |
| source_set("enterprise") { |
| sources = [ |
| "managed_preference_policy_manager.h", |
| "managed_preference_policy_manager.mm", |
| "managed_preference_policy_manager_impl.h", |
| "managed_preference_policy_manager_impl.mm", |
| ] |
| |
| deps = [ |
| "//base", |
| "//chrome/updater:base", |
| ] |
| } |
| |
| source_set("enterprise_tests") { |
| testonly = true |
| |
| sources = [ |
| "managed_preference_policy_manager_impl_unittest.mm", |
| "managed_preference_policy_manager_unittest.cc", |
| ] |
| |
| deps = [ |
| ":enterprise", |
| "//base", |
| "//base/test:test_support", |
| "//chrome/updater:base", |
| "//testing/gtest", |
| ] |
| } |