Allowing size increase of nacl_helper.
[chromium-blink-merge.git] / chrome / chrome_dll_bundle.gypi
blob719d6c4b9ff8bdf5af1da2548fa53824eb09c174
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/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter',
84     'chrome_resources.gyp:packed_extra_resources',
85     'chrome_resources.gyp:packed_resources',
86   ],
87   'rules': [
88     {
89       'rule_name': 'pdfsqueeze',
90       'extension': 'pdf',
91       'inputs': [
92         '<(PRODUCT_DIR)/pdfsqueeze',
93       ],
94       'outputs': [
95         '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
96       ],
97       'action': ['<(PRODUCT_DIR)/pdfsqueeze',
98                  '<(RULE_INPUT_PATH)', '<@(_outputs)'],
99       'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
100     },
101   ],
102   'variables': {
103     'conditions': [
104       ['branding=="Chrome"', {
105         'theme_dir_name': 'google_chrome',
106       }, {  # else: 'branding!="Chrome"
107         'theme_dir_name': 'chromium',
108       }],
109     ],
110     'libpeer_target_type%': 'static_library',
111   },
112   'postbuilds': [
113     {
114       # Modify the Info.plist as needed.  The script explains why
115       # this is needed.  This is also done in the chrome target.
116       # The framework needs the Breakpad keys if this feature is
117       # enabled.  It does not need the Keystone keys; these always
118       # come from the outer application bundle.  The framework
119       # doesn't currently use the SCM keys for anything,
120       # but this seems like a really good place to store them.
121       'postbuild_name': 'Tweak Info.plist',
122       'action': ['<(tweak_info_plist_path)',
123                  '--breakpad=<(mac_breakpad_compiled_in)',
124                  '--breakpad_uploads=<(mac_breakpad_uploads)',
125                  '--keystone=0',
126                  '--scm=1',
127                  '--branding=<(branding)'],
128     },
129     {
130       'postbuild_name': 'Symlink Libraries',
131       'action': [
132         'ln',
133         '-fns',
134         'Versions/Current/Libraries',
135         '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
136       ],
137     },
138   ],
139   'copies': [
140     {
141       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
142       'files': [
143         '<(PRODUCT_DIR)/exif.so',
144         '<(PRODUCT_DIR)/ffmpegsumo.so',
145       ],
146     },
147     {
148       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins',
149       'files': [],
150       'conditions': [
151         ['disable_nacl!=1', {
152           'conditions': [
153             ['target_arch=="x64"', {
154               'files': [
155                 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
156               ],
157             }, {
158               'files': [
159                 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
160               ],
161             }],
162           ],
163         }],
164       ],
165     },
166     {
167       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/PepperFlash',
168       'files': [],
169       'conditions': [
170         ['branding == "Chrome"', {
171           'files': [
172             '<(PRODUCT_DIR)/PepperFlash/PepperFlashPlayer.plugin',
173           ],
174         }],
175       ],
176     },
177     {
178       # This file is used by the component installer.
179       # It is not a complete plug-in on its own.
180       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/',
181       'files': [],
182       'conditions': [
183         ['branding == "Chrome"', {
184           'files': [
185             '<(PRODUCT_DIR)/widevinecdmadapter.plugin',
186           ],
187         }],
188       ],
189     },
190     {
191       # Copy of resources used by tests.
192       'destination': '<(PRODUCT_DIR)',
193       'files': [
194           '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
195       ],
196     },
197     {
198       # Copy of resources used by tests.
199       'destination': '<(PRODUCT_DIR)/pseudo_locales',
200       'files': [
201           '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak'
202       ],
203     },
204     {
205       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
206       'files': [
207         # Loader bundle for platform apps.
208         '<(PRODUCT_DIR)/app_mode_loader.app',
209       ],
210     },
211   ],
212   'conditions': [
213     ['branding=="Chrome"', {
214       'copies': [
215         {
216           # This location is for the Mac build. Note that the
217           # copying of these files for Windows and Linux is handled
218           # in chrome.gyp, as Mac needs to be dropped inside the
219           # framework.
220           'destination':
221               '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps',
222           'files': ['<@(default_apps_list)'],
223         },
224       ],
225     }],
226     ['mac_breakpad==1', {
227       'variables': {
228         # A real .dSYM is needed for dump_syms to operate on.
229         'mac_real_dsym': 1,
230       },
231     }],
232     ['mac_breakpad_compiled_in==1', {
233       'dependencies': [
234         '../breakpad/breakpad.gyp:breakpad',
235         '../components/components.gyp:policy',
236       ],
237       'copies': [
238         {
239           'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
240           'files': [
241             '<(PRODUCT_DIR)/crash_inspector',
242             '<(PRODUCT_DIR)/crash_report_sender.app'
243           ],
244         },
245       ],
246     }],  # mac_breakpad_compiled_in
247     ['mac_keystone==1', {
248       'mac_bundle_resources': [
249         'browser/mac/keystone_promote_preflight.sh',
250         'browser/mac/keystone_promote_postflight.sh',
251       ],
252       'postbuilds': [
253         {
254           'postbuild_name': 'Copy KeystoneRegistration.framework',
255           'action': [
256             '../build/mac/copy_framework_unversioned.sh',
257             '-I',
258             '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
259             '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
260           ],
261         },
262         {
263           'postbuild_name': 'Symlink Frameworks',
264           'action': [
265             'ln',
266             '-fns',
267             'Versions/Current/Frameworks',
268             '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
269           ],
270         },
271       ],
272     }],  # mac_keystone
273     ['debug_devtools==1', {
274       'postbuilds': [{
275         'postbuild_name': 'Copy inspector files',
276         'action': [
277           'ln',
278           '-fs',
279           '${BUILT_PRODUCTS_DIR}/resources/inspector',
280           '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources',
281         ],
282       }],
283     }],
284     ['enable_hidpi==1', {
285       'mac_bundle_resources': [
286         '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
287       ],
288     }],
289     ['enable_webrtc==1 and libpeer_target_type!="static_library"', {
290       'copies': [{
291        'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
292        'files': [
293           '<(PRODUCT_DIR)/libpeerconnection.so',
294         ],
295       }],
296     }],
297     ['icu_use_data_file_flag==1', {
298       'mac_bundle_resources': [
299         '<(PRODUCT_DIR)/icudtl.dat',
300       ],
301     }],
302     ['v8_use_external_startup_data==1', {
303       'mac_bundle_resources': [
304         '<(PRODUCT_DIR)/natives_blob.bin',
305         '<(PRODUCT_DIR)/snapshot_blob.bin',
306       ],
307     }],
308   ],  # conditions