1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6  'targets': [
7    {
8      # This is the part of the shim process compiled into Chrome. It runs only
9      # in the shim process, after the shim finds and loads the Chrome
10      # Framework bundle.
11      'target_name': 'app_shim',
12      'type': 'static_library',
13      'dependencies': [
14        # Since app_shim and browser depend on each other, we omit the
15        # dependency on browser here.
16        '../chrome/chrome_resources.gyp:chrome_strings',
17        'app_mode_app_support',
18      ],
19      'sources': [
20        'chrome_main_app_mode_mac.mm',
21      ],
22      'include_dirs': [
23        '<(INTERMEDIATE_DIR)',
24        '../..',
25      ],
26    },  # target app_shim
27    {
28      # This produces the template for app mode loader bundles. It's a template
29      # in the sense that parts of it need to be "filled in" by Chrome before it
30      # can be executed.
31      'target_name': 'app_mode_app',
32      'type': 'executable',
33      'mac_bundle' : 1,
34      'variables': {
35        'enable_wexit_time_destructors': 1,
36        'mac_real_dsym': 1,
37      },
38      'product_name': 'app_mode_loader',
39      'dependencies': [
40        'app_mode_app_support',
41        'infoplist_strings_tool',
42      ],
43      'sources': [
44        'app_mode_loader_mac.mm',
45        'app_mode-Info.plist',
46      ],
47      'include_dirs': [
48        '../..',
49      ],
50      'link_settings': {
51        'libraries': [
52          '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
53          '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
54        ],
55      },
56      'mac_bundle_resources!': [
57        'app_shim/app_mode-Info.plist',
58      ],
59      'mac_bundle_resources/': [
60        ['exclude', '.*'],
61      ],
62      'xcode_settings': {
63        'INFOPLIST_FILE': 'app_shim/app_mode-Info.plist',
64        'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
65      },
66      'postbuilds' : [
67        {
68          # Modify the Info.plist as needed.  The script explains why this
69          # is needed.  This is also done in the chrome and chrome_dll
70          # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
71          # are used because Breakpad, Keystone, and SCM keys are
72          # never placed into the app mode loader.
73          'postbuild_name': 'Tweak Info.plist',
74          'action': ['<(tweak_info_plist_path)',
75                     '--breakpad=0',
76                     '--keystone=0',
77                     '--scm=0'],
78        },
79      ],
80    },  # target app_mode_app
81  ],  # targets
82}
83