| # Copyright 2016 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/config/mac/mac_sdk.gni") |
| import("//build/util/branding.gni") |
| import("//chrome/browser/buildflags.gni") |
| import("//chrome/process_version_rc_template.gni") |
| import("//chrome/version.gni") |
| import("//testing/test.gni") |
| import("//ui/gl/features.gni") |
| import("mac_signing_sources.gni") |
| |
| if (is_chrome_branded) { |
| import("//third_party/widevine/scripts/widevine_signing_sources.gni") |
| } |
| |
| group("mac") { |
| public_deps = [ |
| ":copies", |
| "//third_party/libdmg-hfsplus:dmg_tool", |
| "//third_party/libdmg-hfsplus:hfs_tool", |
| ] |
| } |
| |
| _packaging_dir = "$root_out_dir/$chrome_product_full_name Packaging" |
| |
| template("generate_dmg_dsstore") { |
| action(target_name) { |
| script = "generate_dsstore.py" |
| outputs = [ "$_packaging_dir/${invoker.output_name}" ] |
| args = [ |
| "--volume-name", |
| invoker.volume_name, |
| "--app-name", |
| invoker.app_name, |
| rebase_path(outputs[0], root_build_dir), |
| ] |
| } |
| } |
| |
| if (is_chrome_branded) { |
| generate_dmg_dsstore("generate_chrome_dmg_dsstore") { |
| output_name = "chrome_dmg_dsstore" |
| volume_name = "Google Chrome" |
| app_name = "Google Chrome.app" |
| } |
| |
| generate_dmg_dsstore("generate_chrome_beta_dmg_dsstore") { |
| output_name = "chrome_beta_dmg_dsstore" |
| volume_name = "Google Chrome Beta" |
| app_name = "Google Chrome Beta.app" |
| } |
| |
| generate_dmg_dsstore("generate_chrome_dev_dmg_dsstore") { |
| output_name = "chrome_dev_dmg_dsstore" |
| volume_name = "Google Chrome Dev" |
| app_name = "Google Chrome Dev.app" |
| } |
| |
| generate_dmg_dsstore("generate_chrome_canary_dmg_dsstore") { |
| output_name = "chrome_canary_dmg_dsstore" |
| volume_name = "Google Chrome Canary" |
| app_name = "Google Chrome Canary.app" |
| } |
| } |
| |
| 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" |
| } |
| _enable_updater = "False" |
| if (enable_updater) { |
| _enable_updater = "True" |
| } |
| _use_static_angle = "False" |
| if (use_static_angle) { |
| _use_static_angle = "True" |
| } |
| extra_args = [ |
| "-e", |
| "GEN_HEADER=\"THIS FILE IS AUTOMATICALLY GENERATED BY $_full_target_name.\n\"", |
| "-e", |
| "IS_CHROME_BRANDED=$_local_chrome_branded", |
| "-e", |
| "ENABLE_UPDATER=$_enable_updater", |
| "-e", |
| "USE_STATIC_ANGLE=$_use_static_angle", |
| ] |
| } |
| |
| 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}}" ] |
| } |
| |
| if (is_chrome_branded) { |
| copy("copy_widevine_signing") { |
| visibility = [ ":copies" ] |
| |
| sources = rebase_path(widevine_signing_sources, |
| "", |
| "//third_party/widevine/scripts") |
| |
| outputs = [ "$_packaging_dir/widevine/{{source_file_part}}" ] |
| } |
| } |
| |
| copy("copies") { |
| visibility = [ ":mac" ] |
| |
| deps = [ |
| ":copy_signing", |
| "//chrome:entitlements", |
| "//third_party/libdmg-hfsplus:dmg_tool", |
| "//third_party/libdmg-hfsplus:hfs_tool", |
| ] |
| |
| sources = [ |
| "$root_gen_dir/chrome/app-entitlements.plist", |
| "$root_out_dir/dmg_tool", |
| "$root_out_dir/hfs_tool", |
| "//chrome/app/helper-gpu-entitlements.plist", |
| "//chrome/app/helper-renderer-entitlements.plist", |
| "pkg-dmg", |
| "pkg_postinstall.in", |
| "pkg_preinstall.in", |
| "rebrand_chrome.py", |
| "sign_chrome.py", |
| "universalizer.py", |
| ] |
| |
| if (is_chrome_branded) { |
| deps += [ |
| ":copy_widevine_signing", |
| ":generate_chrome_beta_dmg_dsstore", |
| ":generate_chrome_canary_dmg_dsstore", |
| ":generate_chrome_dev_dmg_dsstore", |
| ":generate_chrome_dmg_dsstore", |
| ] |
| sources += [ |
| "//chrome/app/theme/google_chrome/mac/Assets_beta.car", |
| "//chrome/app/theme/google_chrome/mac/Assets_canary.car", |
| "//chrome/app/theme/google_chrome/mac/Assets_dev.car", |
| "//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", |
| "internal/Google_Chrome.765bb3620a0f7a33500da39b20122b1cec41140f.provisionprofile", |
| "internal/Google_Chrome.e809e0e54407d4f3914b7883b7ed28650316ac2e.provisionprofile", |
| "internal/Google_Chrome_Beta.765bb3620a0f7a33500da39b20122b1cec41140f.provisionprofile", |
| "internal/Google_Chrome_Beta.e809e0e54407d4f3914b7883b7ed28650316ac2e.provisionprofile", |
| "internal/Google_Chrome_Canary.765bb3620a0f7a33500da39b20122b1cec41140f.provisionprofile", |
| "internal/Google_Chrome_Canary.e809e0e54407d4f3914b7883b7ed28650316ac2e.provisionprofile", |
| "internal/Google_Chrome_Dev.765bb3620a0f7a33500da39b20122b1cec41140f.provisionprofile", |
| "internal/Google_Chrome_Dev.e809e0e54407d4f3914b7883b7ed28650316ac2e.provisionprofile", |
| "internal/chrome_beta_dmg_icon.icns", |
| "internal/chrome_canary_dmg_icon.icns", |
| "internal/chrome_dev_dmg_icon.icns", |
| "internal/chrome_dmg_background.png", |
| "internal/chrome_dmg_icon.icns", |
| "keystone_install.sh", |
| ] |
| } |
| |
| outputs = [ "$_packaging_dir/{{source_file_part}}" ] |
| } |
| |
| script_test("mac_signing_tests") { |
| script = "//testing/scripts/run_isolated_script_test.py" |
| |
| args = [ "@WrappedPath(" + rebase_path( |
| "//chrome/installer/mac/signing/run_mac_signing_tests.py", |
| root_build_dir) + ")" ] |
| |
| data = mac_signing_sources + [ |
| "signing/commands_test.py", |
| "signing/driver_test.py", |
| "signing/model_test.py", |
| "signing/modification_test.py", |
| "signing/notarize_test.py", |
| "signing/parts_test.py", |
| "signing/pipeline_test.py", |
| "signing/rebranding_test.py", |
| "signing/run_mac_signing_tests.py", |
| "signing/signing_test.py", |
| "signing/test_config.py", |
| "//third_party/catapult/third_party/typ/", |
| ] |
| |
| data_deps = [ |
| "//third_party/libdmg-hfsplus:dmg_tool", |
| "//third_party/libdmg-hfsplus:hfs_tool", |
| ] |
| |
| if (is_chrome_branded) { |
| data += [ "internal/internal_invoker_test.py" ] |
| } |
| } |
| |
| source_set("install_test_util") { |
| testonly = true |
| public = [ "install_test_util.h" ] |
| sources = [ "install_test_util.cc" ] |
| deps = [ |
| "//base", |
| "//testing/gtest", |
| ] |
| } |