summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_dll_bundle.gypi
blob: e307c3b3246c549c69bc3e0bcf5bd72efdc8e4b9 (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# Copyright (c) 2012 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.

# This file contains resources for the main Mac chromium bundle.
{
  # The main browser executable's name is <(mac_product_name).
  # Certain things will get confused if two modules in the
  # executable share the same name, so append " Framework" to the
  # product_name used for the framework.  This will result in
  # a name like "Chromium Framework.framework".
  'product_name': '<(mac_product_name) Framework',
  'mac_bundle': 1,
  'xcode_settings': {
    'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',

    # The dylib versions are of the form a[.b[.c]], where a is a
    # 16-bit unsigned integer, and b and c are 8-bit unsigned
    # integers.  Any missing component is taken to be 0.  The
    # best mapping from product version numbers into this scheme
    # is to just use a=BUILD, b=(PATCH/256), c=(PATCH%256). There
    # is no ambiguity in this scheme because the build and patch
    # numbers are guaranteed unique even across distinct major
    # and minor version numbers.  These settings correspond to
    # -compatibility_version and -current_version.
    'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
    'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',

    # The framework is placed within the .app's versioned
    # directory.  DYLIB_INSTALL_NAME_BASE and
    # LD_DYLIB_INSTALL_NAME affect -install_name.
    'DYLIB_INSTALL_NAME_BASE':
        '@executable_path/../Versions/<(version_full)',
    # See /build/mac/copy_framework_unversioned.sh for
    # information on LD_DYLIB_INSTALL_NAME.
    'LD_DYLIB_INSTALL_NAME':
        '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',

    'INFOPLIST_FILE': 'app/framework-Info.plist',
  },
  'includes': [
    'chrome_nibs.gypi',
  ],
  # TODO(mark): Come up with a fancier way to do this.  It should
  # only be necessary to list framework-Info.plist once, not the
  # three times it is listed here.
  'mac_bundle_resources': [
    # This image is used to badge the lock icon in the
    # authentication dialogs, such as those used for installation
    # from disk image and Keystone promotion (if so enabled).  It
    # needs to exist as a file on disk and not just something in a
    # resource bundle because that's the interface that
    # Authorization Services uses.  Also, Authorization Services
    # can't deal with .icns files.
    'app/theme/default_100_percent/<(theme_dir_name)/product_logo_32.png',

    'app/framework-Info.plist',
    '<@(mac_all_xibs)',
    'app/theme/find_next_Template.pdf',
    'app/theme/find_prev_Template.pdf',
    'app/theme/menu_overflow_down.pdf',
    'app/theme/menu_overflow_up.pdf',
    'browser/mac/install.sh',
    '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak',
    '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
    '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))',
    # Note: pseudo_locales are generated via the packed_resources
    # dependency but not copied to the final target.  See
    # common.gypi for more info.
  ],
  'mac_bundle_resources!': [
    'app/framework-Info.plist',
  ],
  'dependencies': [
    'app_mode_app',
    # Bring in pdfsqueeze and run it on all pdfs
    '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
    '../crypto/crypto.gyp:crypto',
    '../pdf/pdf.gyp:pdf',
    # On Mac, Flash gets put into the framework, so we need this
    # dependency here. flash_player.gyp will copy the Flash bundle
    # into PRODUCT_DIR.
    '../third_party/adobe/flash/flash_player.gyp:flapper_binaries',
    '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter',
    'chrome_resources.gyp:packed_extra_resources',
    'chrome_resources.gyp:packed_resources',
  ],
  'rules': [
    {
      'rule_name': 'pdfsqueeze',
      'extension': 'pdf',
      'inputs': [
        '<(PRODUCT_DIR)/pdfsqueeze',
      ],
      'outputs': [
        '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
      ],
      'action': ['<(PRODUCT_DIR)/pdfsqueeze',
                 '<(RULE_INPUT_PATH)', '<@(_outputs)'],
      'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
    },
  ],
  'variables': {
    'conditions': [
      ['branding=="Chrome"', {
        'theme_dir_name': 'google_chrome',
      }, {  # else: 'branding!="Chrome"
        'theme_dir_name': 'chromium',
      }],
    ],
    'libpeer_target_type%': 'static_library',
  },
  'postbuilds': [
    {
      # Modify the Info.plist as needed.  The script explains why
      # this is needed.  This is also done in the chrome target.
      # The framework needs the Breakpad keys if this feature is
      # enabled.  It does not need the Keystone keys; these always
      # come from the outer application bundle.  The framework
      # doesn't currently use the SCM keys for anything,
      # but this seems like a really good place to store them.
      'postbuild_name': 'Tweak Info.plist',
      'action': ['<(tweak_info_plist_path)',
                 '--breakpad=<(mac_breakpad_compiled_in)',
                 '--breakpad_uploads=<(mac_breakpad_uploads)',
                 '--keystone=0',
                 '--scm=1',
                 '--branding=<(branding)'],
    },
    {
      'postbuild_name': 'Symlink Libraries',
      'action': [
        'ln',
        '-fns',
        'Versions/Current/Libraries',
        '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
      ],
    },
  ],
  'copies': [
    {
      'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
      'files': [
        '<(PRODUCT_DIR)/exif.so',
        '<(PRODUCT_DIR)/ffmpegsumo.so',
      ],
    },
    {
      'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins',
      'files': [
        '<(PRODUCT_DIR)/PDF.plugin',
      ],
      'conditions': [
        ['disable_nacl!=1', {
          'conditions': [
            ['target_arch=="x64"', {
              'files': [
                '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
              ],
            }, {
              'files': [
                '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
              ],
            }],
          ],
        }],
      ],
    },
    {
      'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/PepperFlash',
      'files': [],
      'conditions': [
        ['branding == "Chrome"', {
          'files': [
            '<(PRODUCT_DIR)/PepperFlash/PepperFlashPlayer.plugin',
          ],
        }],
      ],
    },
    {
      # This file is used by the component installer.
      # It is not a complete plug-in on its own.
      'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/',
      'files': [],
      'conditions': [
        ['branding == "Chrome"', {
          'files': [
            '<(PRODUCT_DIR)/widevinecdmadapter.plugin',
          ],
        }],
      ],
    },
    {
      # Copy of resources used by tests.
      'destination': '<(PRODUCT_DIR)',
      'files': [
          '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
      ],
    },
    {
      # Copy of resources used by tests.
      'destination': '<(PRODUCT_DIR)/pseudo_locales',
      'files': [
          '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak'
      ],
    },
    {
      'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/resources',
      'files': [
        # Loader bundle for platform apps.
        '<(PRODUCT_DIR)/app_mode_loader.app',
      ],
    },
  ],
  'conditions': [
    ['branding=="Chrome"', {
      'copies': [
        {
          # This location is for the Mac build. Note that the
          # copying of these files for Windows and Linux is handled
          # in chrome.gyp, as Mac needs to be dropped inside the
          # framework.
          'destination':
              '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps',
          'files': ['<@(default_apps_list)'],
        },
      ],
    }],
    ['mac_breakpad==1', {
      'variables': {
        # A real .dSYM is needed for dump_syms to operate on.
        'mac_real_dsym': 1,
      },
    }],
    ['mac_breakpad_compiled_in==1', {
      'dependencies': [
        '../breakpad/breakpad.gyp:breakpad',
        '../components/components.gyp:policy',
      ],
      'copies': [
        {
          'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
          'files': [
            '<(PRODUCT_DIR)/crash_inspector',
            '<(PRODUCT_DIR)/crash_report_sender.app'
          ],
        },
      ],
    }],  # mac_breakpad_compiled_in
    ['mac_keystone==1', {
      'mac_bundle_resources': [
        'browser/mac/keystone_promote_preflight.sh',
        'browser/mac/keystone_promote_postflight.sh',
      ],
      'postbuilds': [
        {
          'postbuild_name': 'Copy KeystoneRegistration.framework',
          'action': [
            '../build/mac/copy_framework_unversioned.sh',
            '-I',
            '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
            '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
          ],
        },
        {
          'postbuild_name': 'Symlink Frameworks',
          'action': [
            'ln',
            '-fns',
            'Versions/Current/Frameworks',
            '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
          ],
        },
      ],
    }],  # mac_keystone
    ['debug_devtools==1', {
      'postbuilds': [{
        'postbuild_name': 'Copy inspector files',
        'action': [
          'ln',
          '-fs',
          '${BUILT_PRODUCTS_DIR}/resources/inspector',
          '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources',
        ],
      }],
    }],
    ['enable_hidpi==1', {
      'mac_bundle_resources': [
        '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
      ],
    }],
    ['enable_webrtc==1 and libpeer_target_type!="static_library"', {
      'copies': [{
       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
       'files': [
          '<(PRODUCT_DIR)/libpeerconnection.so',
        ],
      }],
    }],
    ['icu_use_data_file_flag==1', {
      'mac_bundle_resources': [
        '<(PRODUCT_DIR)/icudtl.dat',
      ],
    }],
  ],  # conditions
}