# Copyright 2016 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/features.gni") import("//build/config/mac/base_rules.gni") import("//build/util/branding.gni") import("//build/util/version.gni") import("//chrome/process_version_rc_template.gni") import("mac_signing_sources.gni") group("mac") { public_deps = [ ":copies" ] } _packaging_dir = "$root_out_dir/$chrome_product_full_name Packaging" process_version_rc_template("sign_config") { visibility = [ ":copy_signing" ] process_only = true template_file = "signing/build_props_config.py.in" output = "$_packaging_dir/signing/build_props_config.py" _full_target_name = get_label_info(target_name, "label_no_toolchain") _file_path = rebase_path(template_file) _local_chrome_branded = "False" if (is_chrome_branded) { _local_chrome_branded = "True" } extra_args = [ "-e", "GEN_HEADER=\"THIS FILE IS AUTOMATICALLY GENERATED BY $_full_target_name.\n# The original copy is at $_file_path.\n\"", "-e", "IS_CHROME_BRANDED=$_local_chrome_branded", ] } copy("copy_signing") { visibility = [ ":copies" ] deps = [ ":sign_config" ] sources = mac_signing_sources if (is_chrome_branded) { sources += [ "internal/internal_config.py" ] } outputs = [ "$_packaging_dir/signing/{{source_file_part}}" ] } copy("copies") { visibility = [ ":mac" ] deps = [ ":copy_signing", "//chrome:entitlements", "//chrome/installer/mac/third_party/bsdiff:goobsdiff", "//chrome/installer/mac/third_party/bsdiff:goobspatch", "//chrome/installer/mac/third_party/xz:lzma_decompress", "//chrome/installer/mac/third_party/xz:xz", "//chrome/installer/mac/third_party/xz:xzdec", ] sources = [ "$root_gen_dir/chrome/app-entitlements.plist", "$root_out_dir/goobsdiff", "$root_out_dir/goobspatch", "$root_out_dir/liblzma_decompress.dylib", "$root_out_dir/xz", "$root_out_dir/xzdec", "//chrome/app/helper-gpu-entitlements.plist", "//chrome/app/helper-plugin-entitlements.plist", "//chrome/app/helper-renderer-entitlements.plist", "dirdiffer.sh", "dirpatcher.sh", "dmgdiffer.sh", "notarize_thing.py", "pkg-dmg", "pkg_postinstall.in", "sign_chrome.py", ] if (is_chrome_branded) { sources += [ "keystone_install.sh" ] } if (is_chrome_branded) { sources += [ "//chrome/app/theme/google_chrome/mac/app_beta.icns", "//chrome/app/theme/google_chrome/mac/app_canary.icns", "//chrome/app/theme/google_chrome/mac/app_dev.icns", "//chrome/app/theme/google_chrome/mac/document_beta.icns", "//chrome/app/theme/google_chrome/mac/document_canary.icns", "//chrome/app/theme/google_chrome/mac/document_dev.icns", "internal/Google_Chrome.provisionprofile", "internal/Google_Chrome_Beta.provisionprofile", "internal/Google_Chrome_Canary.provisionprofile", "internal/Google_Chrome_Dev.provisionprofile", "internal/chrome_beta_dmg_dsstore", "internal/chrome_beta_dmg_icon.icns", "internal/chrome_canary_dmg_dsstore", "internal/chrome_canary_dmg_icon.icns", "internal/chrome_dev_dmg_dsstore", "internal/chrome_dev_dmg_icon.icns", "internal/chrome_dmg_background.png", "internal/chrome_dmg_dsstore", "internal/chrome_dmg_icon.icns", ] } outputs = [ "$_packaging_dir/{{source_file_part}}" ] } group("mac_signing_tests") { data = mac_signing_sources + [ "signing/commands_test.py", "signing/model_test.py", "signing/modification_test.py", "signing/notarize_test.py", "signing/parts_test.py", "signing/pipeline_test.py", "signing/run_mac_signing_tests.py", "signing/signing_test.py", "signing/test_common.py", "signing/test_config.py", # The run_isolated_script_test.py script and its dependencies. "//testing/scripts/run_isolated_script_test.py", "//testing/scripts/common.py", "//testing/xvfb.py", "//testing/test_env.py", "//third_party/catapult/third_party/typ/", ] }