summaryrefslogtreecommitdiffstats
path: root/chrome/app_shim/app_shim.gypi
blob: 242b660cc7bd79d00da6655085f78dbae09ebfad (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
# Copyright 2014 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.

{
  'targets': [
    {
      # This is the part of the shim process compiled into Chrome. It runs only
      # in the shim process, after the shim finds and loads the Chrome
      # Framework bundle.
      #
      # GN version: //chrome/app_shim
      'target_name': 'app_shim',
      'type': 'static_library',
      'dependencies': [
        # Since app_shim and browser depend on each other, we omit the
        # dependency on browser here.
        '../chrome/chrome_resources.gyp:chrome_strings',
        'app_mode_app_support',
      ],
      'sources': [
        'chrome_main_app_mode_mac.mm',
      ],
      'include_dirs': [
        '<(INTERMEDIATE_DIR)',
        '../..',
      ],
    },  # target app_shim
    {
      # This produces the template for app mode loader bundles. It's a template
      # in the sense that parts of it need to be "filled in" by Chrome before it
      # can be executed.
      'target_name': 'app_mode_app',
      'type': 'executable',
      'mac_bundle' : 1,
      'variables': {
        'enable_wexit_time_destructors': 1,
        'mac_real_dsym': 1,
      },
      'product_name': 'app_mode_loader',
      'dependencies': [
        'app_mode_app_support',
        'infoplist_strings_tool',
      ],
      'sources': [
        'app_mode_loader_mac.mm',
        'app_mode-Info.plist',
      ],
      'include_dirs': [
        '../..',
      ],
      'link_settings': {
        'libraries': [
          '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
          '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
        ],
      },
      'mac_bundle_resources!': [
        'app_shim/app_mode-Info.plist',
      ],
      'mac_bundle_resources/': [
        ['exclude', '.*'],
      ],
      'xcode_settings': {
        'INFOPLIST_FILE': 'app_shim/app_mode-Info.plist',
        'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
      },
      'postbuilds' : [
        {
          # Modify the Info.plist as needed.  The script explains why this
          # is needed.  This is also done in the chrome and chrome_dll
          # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
          # are used because Breakpad, Keystone, and SCM keys are
          # never placed into the app mode loader.
          'postbuild_name': 'Tweak Info.plist',
          'action': ['<(tweak_info_plist_path)',
                     '--breakpad=0',
                     '--keystone=0',
                     '--scm=0'],
        },
      ],
    },  # target app_mode_app
  ],  # targets
}