summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/installer/mac/BUILD.gn
blob: 8b293d46ed1fc01edcac8e7d3bc1ebd1cc3aa4a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# 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)

  extra_args = [
    "-e",
    "GEN_HEADER=\"THIS FILE IS AUTOMATICALLY GENERATED BY $_full_target_name.\n# The original copy is at $_file_path.\n\"",
  ]
}

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",
    "sign_chrome.py",
  ]

  if (is_chrome_branded) {
    sources += [ "keystone_install.sh" ]
  }

  if (is_chrome_branded) {
    sources += [
      "//chrome/app/theme/google_chrome/mac/app_canary.icns",
      "//chrome/app/theme/google_chrome/mac/document_canary.icns",
      "internal/Google_Chrome.provisionprofile",
      "internal/Google_Chrome_Canary.provisionprofile",
      "internal/chrome_canary_dmg_dsstore",
      "internal/chrome_canary_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/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/",
         ]
}