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