Partially fix compilation of media_unittests with Xcode 7 (OS X 10.11 SDK).
[chromium-blink-merge.git] / chrome / chrome_dll_bundle.gypi
blobb494b89431ee12f44c810c64c45e08e0205e5fab
1 # Copyright (c) 2012 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.
5 # This file contains resources for the main Mac chromium bundle.
7   # The main browser executable's name is <(mac_product_name).
8   # Certain things will get confused if two modules in the
9   # executable share the same name, so append " Framework" to the
10   # product_name used for the framework.  This will result in
11   # a name like "Chromium Framework.framework".
12   'product_name': '<(mac_product_name) Framework',
13   'mac_bundle': 1,
14   'xcode_settings': {
15     'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
17     # The dylib versions are of the form a[.b[.c]], where a is a
18     # 16-bit unsigned integer, and b and c are 8-bit unsigned
19     # integers.  Any missing component is taken to be 0.  The
20     # best mapping from product version numbers into this scheme
21     # is to just use a=BUILD, b=(PATCH/256), c=(PATCH%256). There
22     # is no ambiguity in this scheme because the build and patch
23     # numbers are guaranteed unique even across distinct major
24     # and minor version numbers.  These settings correspond to
25     # -compatibility_version and -current_version.
26     'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
27     'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
29     # The framework is placed within the .app's versioned
30     # directory.  DYLIB_INSTALL_NAME_BASE and
31     # LD_DYLIB_INSTALL_NAME affect -install_name.
32     'DYLIB_INSTALL_NAME_BASE':
33         '@executable_path/../Versions/<(version_full)',
34     # See /build/mac/copy_framework_unversioned.sh for
35     # information on LD_DYLIB_INSTALL_NAME.
36     'LD_DYLIB_INSTALL_NAME':
37         '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
39     'INFOPLIST_FILE': 'app/framework-Info.plist',
40   },
41   'includes': [
42     'chrome_nibs.gypi',
43   ],
44   # TODO(mark): Come up with a fancier way to do this.  It should
45   # only be necessary to list framework-Info.plist once, not the
46   # three times it is listed here.
47   'mac_bundle_resources': [
48     # This image is used to badge the lock icon in the
49     # authentication dialogs, such as those used for installation
50     # from disk image and Keystone promotion (if so enabled).  It
51     # needs to exist as a file on disk and not just something in a
52     # resource bundle because that's the interface that
53     # Authorization Services uses.  Also, Authorization Services
54     # can't deal with .icns files.
55     'app/theme/default_100_percent/<(theme_dir_name)/product_logo_32.png',
57     'app/framework-Info.plist',
58     '<@(mac_all_xibs)',
59     'app/theme/find_next_Template.pdf',
60     'app/theme/find_prev_Template.pdf',
61     'app/theme/menu_overflow_down.pdf',
62     'app/theme/menu_overflow_up.pdf',
63     'browser/mac/install.sh',
64     '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak',
65     '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
66     '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))',
67     # Note: pseudo_locales are generated via the packed_resources
68     # dependency but not copied to the final target.  See
69     # common.gypi for more info.
70   ],
71   'mac_bundle_resources!': [
72     'app/framework-Info.plist',
73   ],
74   'dependencies': [
75     'app_mode_app',
76     # Bring in pdfsqueeze and run it on all pdfs
77     '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
78     '../crypto/crypto.gyp:crypto',
79     # On Mac, Flash gets put into the framework, so we need this
80     # dependency here. flash_player.gyp will copy the Flash bundle
81     # into PRODUCT_DIR.
82     '../third_party/adobe/flash/flash_player.gyp:flapper_binaries',
83     '../third_party/crashpad/crashpad/handler/handler.gyp:crashpad_handler',
84     '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter',
85     'chrome_resources.gyp:packed_extra_resources',
86     'chrome_resources.gyp:packed_resources',
87   ],
88   'rules': [
89     {
90       'rule_name': 'pdfsqueeze',
91       'extension': 'pdf',
92       'inputs': [
93         '<(PRODUCT_DIR)/pdfsqueeze',
94       ],
95       'outputs': [
96         '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
97       ],
98       'action': ['<(PRODUCT_DIR)/pdfsqueeze',
99                  '<(RULE_INPUT_PATH)', '<@(_outputs)'],
100       'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
101     },
102   ],
103   'variables': {
104     'theme_dir_name': '<(branding_path_component)',
105   },
106   'postbuilds': [
107     {
108       # Modify the Info.plist as needed.  The script explains why
109       # this is needed.  This is also done in the chrome target.
110       # The framework needs the Breakpad keys if this feature is
111       # enabled.  It does not need the Keystone keys; these always
112       # come from the outer application bundle.  The framework
113       # doesn't currently use the SCM keys for anything,
114       # but this seems like a really good place to store them.
115       'postbuild_name': 'Tweak Info.plist',
116       'action': ['<(tweak_info_plist_path)',
117                  '--breakpad=<(mac_breakpad_compiled_in)',
118                  '--breakpad_uploads=<(mac_breakpad_uploads)',
119                  '--keystone=0',
120                  '--scm=1',
121                  '--branding=<(branding)'],
122     },
123     {
124       'postbuild_name': 'Symlink Libraries',
125       'action': [
126         'ln',
127         '-fns',
128         'Versions/Current/Libraries',
129         '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
130       ],
131     },
132   ],
133   'copies': [
134     {
135       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
136       'files': [
137         '<(PRODUCT_DIR)/exif.so',
138       ],
139     },
140     {
141       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Helpers',
142       'files': [
143         '<(PRODUCT_DIR)/crashpad_handler',
144       ],
145     },
146     {
147       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins',
148       'files': [],
149       'conditions': [
150         ['disable_nacl!=1', {
151           'conditions': [
152             ['target_arch=="x64"', {
153               'files': [
154                 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
155               ],
156             }, {
157               'files': [
158                 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
159               ],
160             }],
161           ],
162         }],
163       ],
164     },
165     {
166       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/PepperFlash',
167       'files': [],
168       'conditions': [
169         ['branding == "Chrome"', {
170           'files': [
171             '<(PRODUCT_DIR)/PepperFlash/PepperFlashPlayer.plugin',
172           ],
173         }],
174       ],
175     },
176     {
177       # This file is used by the component installer.
178       # It is not a complete plugin on its own.
179       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/',
180       'files': [],
181       'conditions': [
182         ['branding == "Chrome"', {
183           'files': [
184             '<(PRODUCT_DIR)/widevinecdmadapter.plugin',
185           ],
186         }],
187       ],
188     },
189     {
190       # Copy of resources used by tests.
191       'destination': '<(PRODUCT_DIR)',
192       'files': [
193           '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
194       ],
195     },
196     {
197       # Copy of resources used by tests.
198       'destination': '<(PRODUCT_DIR)/pseudo_locales',
199       'files': [
200           '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak'
201       ],
202     },
203     {
204       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
205       'files': [
206         # Loader bundle for platform apps.
207         '<(PRODUCT_DIR)/app_mode_loader.app',
208       ],
209     },
210   ],
211   'conditions': [
212     ['branding=="Chrome"', {
213       'copies': [
214         {
215           # This location is for the Mac build. Note that the
216           # copying of these files for Windows and Linux is handled
217           # in chrome.gyp, as Mac needs to be dropped inside the
218           # framework.
219           'destination':
220               '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps',
221           'files': ['<@(default_apps_list)'],
222         },
223       ],
224     }],
225     ['mac_breakpad==1', {
226       'variables': {
227         # A real .dSYM is needed for dump_syms to operate on.
228         'mac_real_dsym': 1,
229       },
230     }],
231     ['mac_keystone==1', {
232       'mac_bundle_resources': [
233         'browser/mac/keystone_promote_preflight.sh',
234         'browser/mac/keystone_promote_postflight.sh',
235       ],
236       'postbuilds': [
237         {
238           'postbuild_name': 'Copy KeystoneRegistration.framework',
239           'action': [
240             '../build/mac/copy_framework_unversioned.sh',
241             '-I',
242             '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
243             '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
244           ],
245         },
246         {
247           'postbuild_name': 'Symlink Frameworks',
248           'action': [
249             'ln',
250             '-fns',
251             'Versions/Current/Frameworks',
252             '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
253           ],
254         },
255       ],
256     }],  # mac_keystone
257     ['debug_devtools==1', {
258       'postbuilds': [{
259         'postbuild_name': 'Copy inspector files',
260         'action': [
261           'ln',
262           '-fs',
263           '${BUILT_PRODUCTS_DIR}/resources/inspector',
264           '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources',
265         ],
266       }],
267     }],
268     ['enable_hidpi==1', {
269       'mac_bundle_resources': [
270         '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
271       ],
272     }],
273     ['icu_use_data_file_flag==1', {
274       'mac_bundle_resources': [
275         '<(PRODUCT_DIR)/icudtl.dat',
276       ],
277     }],
278     ['v8_use_external_startup_data==1', {
279       'mac_bundle_resources': [
280         '<(PRODUCT_DIR)/natives_blob.bin',
281         '<(PRODUCT_DIR)/snapshot_blob.bin',
282       ],
283     }],
284   ],  # conditions