chrome: bluetooth: hook up the AdapterAdded signal
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob7964ed5c8d9f2df5180b2a97ee35c5e18b4f7447
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   'conditions': [
6     ['OS=="mac" or OS=="win"', {
7       'targets': [
8         {
9           'target_name': 'chrome_dll',
10           'type': 'none',
11           'dependencies': [
12             'chrome_main_dll',
13           ],
14           'conditions': [
15             ['incremental_chrome_dll==1', {
16               # Linking to a different directory and then hardlinking back
17               # to OutDir is a workaround to avoid having the .ilk for
18               # chrome.exe and chrome.dll conflicting. See crbug.com/92528
19               # for more information. Done on the dll instead of the exe so
20               # that people launching from VS don't need to modify
21               # $(TargetPath) for the exe.
22               'actions': [
23                 {
24                   'action_name': 'hardlink_to_output',
25                   'inputs': [
26                     '$(OutDir)\\initial\\chrome.dll',
27                   ],
28                   'outputs': [
29                     '$(OutDir)\\chrome.dll',
30                   ],
31                   'action': ['tools\\build\\win\\hardlink_failsafe.bat',
32                              '$(OutDir)\\initial\\chrome.dll',
33                              '$(OutDir)\\chrome.dll'],
34                   'msvs_cygwin_shell': 0,
35                 }
36               ],
37             }],
38           ]
39         },
40         {
41           'target_name': 'chrome_main_dll',
42           'type': 'shared_library',
43           'variables': {
44             'enable_wexit_time_destructors': 1,
45           },
46           'dependencies': [
47             '<@(chromium_dependencies)',
48             'app/policy/cloud_policy_codegen.gyp:policy',
49           ],
50           'conditions': [
51             ['use_aura==1', {
52               'dependencies': [
53                 '../ui/gfx/compositor/compositor.gyp:compositor',
54               ],
55             }],
56             ['OS=="win"', {
57               'product_name': 'chrome',
58               'dependencies': [
59                 # On Windows, link the dependencies (libraries) that make
60                 # up actual Chromium functionality into this .dll.
61                 'chrome_resources.gyp:chrome_resources',
62                 'chrome_version_resources',
63                 'installer_util_strings',
64                 '../content/content.gyp:content_worker',
65                 '../crypto/crypto.gyp:crypto',
66                 '../printing/printing.gyp:printing',
67                 '../net/net.gyp:net_resources',
68                 '../third_party/cld/cld.gyp:cld',
69                 '../ui/views/views.gyp:views',
70                 '../webkit/support/webkit_support.gyp:webkit_resources',
71               ],
72               'sources': [
73                 'app/chrome_command_ids.h',
74                 'app/chrome_dll.rc',
75                 'app/chrome_dll_resource.h',
76                 'app/chrome_main.cc',
77                 'app/chrome_main_delegate.cc',
78                 'app/chrome_main_delegate.h',
80                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
81                 '../base/win/dllmain.cc',
83                 '../webkit/glue/resources/aliasb.cur',
84                 '../webkit/glue/resources/cell.cur',
85                 '../webkit/glue/resources/col_resize.cur',
86                 '../webkit/glue/resources/copy.cur',
87                 '../webkit/glue/resources/none.cur',
88                 '../webkit/glue/resources/row_resize.cur',
89                 '../webkit/glue/resources/vertical_text.cur',
90                 '../webkit/glue/resources/zoom_in.cur',
91                 '../webkit/glue/resources/zoom_out.cur',
93                 # TODO:  It would be nice to have these pulled in
94                 # automatically from direct_dependent_settings in
95                 # their various targets (net.gyp:net_resources, etc.),
96                 # but that causes errors in other targets when
97                 # resulting .res files get referenced multiple times.
98                 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
99                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
100                 '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
101                 '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.rc',
102                 '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources_standard.rc',
103                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
104                 '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc',
105                 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc',
106                 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.rc',
107                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
108                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
110                 # TODO(sgk):  left-over from pre-gyp build, figure out
111                 # if we still need them and/or how to update to gyp.
112                 #'app/check_dependents.bat',
113                 #'app/chrome.dll.deps',
114               ],
115               'include_dirs': [
116                 '<(DEPTH)/third_party/wtl/include',
117               ],
118               'defines': [
119                 'CHROME_DLL',
120                 'BROWSER_DLL',
121                 'RENDERER_DLL',
122                 'PLUGIN_DLL',
123               ],
124               'configurations': {
125                 'Debug_Base': {
126                   'msvs_settings': {
127                     'VCLinkerTool': {
128                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
129                     },
130                   },
131                 },
132               },
133               'msvs_settings': {
134                 'VCLinkerTool': {
135                   'BaseAddress': '0x01c30000',
136                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
137                   'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb',
138                   # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
139                   'SubSystem': '2',
140                   'conditions': [
141                     ['incremental_chrome_dll==1', {
142                       'OutputFile': '$(OutDir)\\initial\\chrome.dll',
143                       'UseLibraryDependencyInputs': "true",
144                     }],
145                   ],
146                   'DelayLoadDLLs': [
147                     'comdlg32.dll',
148                     'crypt32.dll',
149                     'cryptui.dll',
150                     'dhcpcsvc.dll',
151                     'imagehlp.dll',
152                     'imm32.dll',
153                     'iphlpapi.dll',
154                     'setupapi.dll',
155                     'urlmon.dll',
156                     'winhttp.dll',
157                     'wininet.dll',
158                     'winspool.drv',
159                     'ws2_32.dll',
160                     'wsock32.dll',
161                   ],
162                 },
163                 'VCManifestTool': {
164                   'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
165                 },
166               },
167             }],  # OS=="win"
168             ['OS=="mac"', {
169               # The main browser executable's name is <(mac_product_name).
170               # Certain things will get confused if two modules in the
171               # executable share the same name, so append " Framework" to the
172               # product_name used for the framework.  This will result in
173               # a name like "Chromium Framework.framework".
174               'product_name': '<(mac_product_name) Framework',
175               'mac_bundle': 1,
176               'xcode_settings': {
177                 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
179                 # The dylib versions are of the form a[.b[.c]], where a is a
180                 # 16-bit unsigned integer, and b and c are 8-bit unsigned
181                 # integers.  Any missing component is taken to be 0.  The
182                 # best mapping from product version numbers into this scheme
183                 # is to just use a=BUILD, b=(PATCH/256), c=(PATCH%256). There
184                 # is no ambiguity in this scheme because the build and patch
185                 # numbers are guaranteed unique even across distinct major
186                 # and minor version numbers.  These settings correspond to
187                 # -compatibility_version and -current_version.
188                 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
189                 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
191                 # The framework is placed within the .app's versioned
192                 # directory.  DYLIB_INSTALL_NAME_BASE and
193                 # LD_DYLIB_INSTALL_NAME affect -install_name.
194                 'DYLIB_INSTALL_NAME_BASE':
195                     '@executable_path/../Versions/<(version_full)',
196                 # See tools/build/mac/copy_framework_unversioned for
197                 # information on LD_DYLIB_INSTALL_NAME.
198                 'LD_DYLIB_INSTALL_NAME':
199                     '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
201                 'INFOPLIST_FILE': 'app/framework-Info.plist',
203                 # Define the order of symbols within the framework.  This
204                 # sets -order_file.
205                 'ORDER_FILE': 'app/framework.order',
206               },
207               'sources': [
208                 'app/chrome_command_ids.h',
209                 'app/chrome_dll_resource.h',
210                 'app/chrome_main.cc',
211                 'app/chrome_main_delegate.cc',
212                 'app/chrome_main_delegate.h',
213                 'app/chrome_main_app_mode_mac.mm',
214                 'app/chrome_main_mac.mm',
215                 'app/chrome_main_mac.h',
216               ],
217               'include_dirs': [
218                 '<(grit_out_dir)',
219               ],
220               # TODO(mark): Come up with a fancier way to do this.  It should
221               # only be necessary to list framework-Info.plist once, not the
222               # three times it is listed here.
223               'mac_bundle_resources': [
224                 # This image is used to badge the lock icon in the
225                 # authentication dialogs, such as those used for installation
226                 # from disk image and Keystone promotion (if so enabled).  It
227                 # needs to exist as a file on disk and not just something in a
228                 # resource bundle because that's the interface that
229                 # Authorization Services uses.  Also, Authorization Services
230                 # can't deal with .icns files.
231                 'app/theme/<(theme_dir_name)/product_logo_32.png',
233                 'app/framework-Info.plist',
234                 'app/nibs/About.xib',
235                 'app/nibs/AboutIPC.xib',
236                 'app/nibs/AvatarMenuItem.xib',
237                 'app/nibs/BookmarkAllTabs.xib',
238                 'app/nibs/BookmarkBar.xib',
239                 'app/nibs/BookmarkBarFolderWindow.xib',
240                 'app/nibs/BookmarkBubble.xib',
241                 'app/nibs/BookmarkEditor.xib',
242                 'app/nibs/BookmarkNameFolder.xib',
243                 'app/nibs/BrowserWindow.xib',
244                 'app/nibs/CollectedCookies.xib',
245                 'app/nibs/CookieDetailsView.xib',
246                 'app/nibs/ContentBlockedCookies.xib',
247                 'app/nibs/ContentBlockedImages.xib',
248                 'app/nibs/ContentBlockedJavaScript.xib',
249                 'app/nibs/ContentBlockedPlugins.xib',
250                 'app/nibs/ContentBlockedPopups.xib',
251                 'app/nibs/ContentBlockedGeolocation.xib',
252                 'app/nibs/DownloadItem.xib',
253                 'app/nibs/DownloadShelf.xib',
254                 'app/nibs/EditSearchEngine.xib',
255                 'app/nibs/ExtensionInstalledBubble.xib',
256                 'app/nibs/ExtensionInstallPrompt.xib',
257                 'app/nibs/ExtensionInstallPromptInline.xib',
258                 'app/nibs/ExtensionInstallPromptNoWarnings.xib',
259                 'app/nibs/FindBar.xib',
260                 'app/nibs/FirstRunBubble.xib',
261                 'app/nibs/FirstRunDialog.xib',
262                 'app/nibs/FullscreenExitBubble.xib',
263                 'app/nibs/GlobalErrorBubble.xib',
264                 'app/nibs/HungRendererDialog.xib',
265                 'app/nibs/HttpAuthLoginSheet.xib',
266                 'app/nibs/ImportProgressDialog.xib',
267                 'app/nibs/InfoBar.xib',
268                 'app/nibs/InfoBarContainer.xib',
269                 'app/nibs/InstantOptIn.xib',
270                 'app/nibs/MainMenu.xib',
271                 'app/nibs/Notification.xib',
272                 'app/nibs/Panel.xib',
273                 'app/nibs/PreviewableContents.xib',
274                 'app/nibs/SaveAccessoryView.xib',
275                 'app/nibs/SadTab.xib',
276                 'app/nibs/SpeechInputBubble.xib',
277                 'app/nibs/TabView.xib',
278                 'app/nibs/TaskManager.xib',
279                 'app/nibs/Toolbar.xib',
280                 'app/nibs/WrenchMenu.xib',
281                 'app/theme/balloon_wrench.pdf',
282                 'app/theme/chevron.pdf',
283                 'app/theme/find_next_Template.pdf',
284                 'app/theme/find_prev_Template.pdf',
285                 'app/theme/menu_hierarchy_arrow.pdf',
286                 'app/theme/menu_overflow_down.pdf',
287                 'app/theme/menu_overflow_up.pdf',
288                 'app/theme/nav.pdf',
289                 'app/theme/omnibox_extension_app.pdf',
290                 'app/theme/omnibox_history.pdf',
291                 'app/theme/omnibox_http.pdf',
292                 'app/theme/omnibox_https_invalid.pdf',
293                 'app/theme/omnibox_https_valid.pdf',
294                 'app/theme/omnibox_https_warning.pdf',
295                 'app/theme/omnibox_search.pdf',
296                 'app/theme/omnibox_tts.pdf',
297                 'app/theme/otr_icon.pdf',
298                 'app/theme/star.pdf',
299                 'app/theme/star_lit.pdf',
300                 'browser/mac/install.sh',
301                  '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak',
302                  '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
303                 '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))',
304                 # Note: pseudo_locales are generated via the packed_resources
305                 # dependency but not copied to the final target.  See
306                 # common.gypi for more info.
307               ],
308               'mac_bundle_resources!': [
309                 'app/framework-Info.plist',
310               ],
311               'dependencies': [
312                 # Bring in pdfsqueeze and run it on all pdfs
313                 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
314                 '../crypto/crypto.gyp:crypto',
315                 # On Mac, Flash gets put into the framework, so we need this
316                 # dependency here. flash_player.gyp will copy the Flash bundle
317                 # into PRODUCT_DIR.
318                 '../third_party/adobe/flash/flash_player.gyp:flash_player',
319                 'chrome_resources.gyp:packed_extra_resources',
320                 'chrome_resources.gyp:packed_resources',
321               ],
322               'rules': [
323                 {
324                   'rule_name': 'pdfsqueeze',
325                   'extension': 'pdf',
326                   'inputs': [
327                     '<(PRODUCT_DIR)/pdfsqueeze',
328                   ],
329                   'outputs': [
330                     '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
331                   ],
332                   'action': ['<(PRODUCT_DIR)/pdfsqueeze',
333                              '<(RULE_INPUT_PATH)', '<@(_outputs)'],
334                   'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
335                 },
336               ],
337               'variables': {
338                 'conditions': [
339                   ['branding=="Chrome"', {
340                     'theme_dir_name': 'google_chrome',
341                   }, {  # else: 'branding!="Chrome"
342                     'theme_dir_name': 'chromium',
343                   }],
344                 ],
345                 'repack_path': '../tools/grit/grit/format/repack.py',
346               },
347               'actions': [
348                 {
349                   'includes': ['chrome_repack_theme_resources_large.gypi']
350                 },
351               ],
352               'postbuilds': [
353                 {
354                   # This step causes an error to be raised if the .order file
355                   # does not account for all global text symbols.  It
356                   # validates the completeness of the .order file.
357                   'postbuild_name': 'Verify global text symbol order',
358                   'variables': {
359                     'verify_order_path': 'tools/build/mac/verify_order',
360                   },
361                   'action': [
362                     '<(verify_order_path)',
363                     '_ChromeMain',
364                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
365                   ],
366                 },
367                 {
368                   # Modify the Info.plist as needed.  The script explains why
369                   # this is needed.  This is also done in the chrome target.
370                   # The framework needs the Breakpad keys if this feature is
371                   # enabled.  It does not need the Keystone keys; these always
372                   # come from the outer application bundle.  The framework
373                   # doesn't currently use the Subversion keys for anything,
374                   # but this seems like a really good place to store them.
375                   'postbuild_name': 'Tweak Info.plist',
376                   'action': ['<(tweak_info_plist_path)',
377                              '--breakpad=<(mac_breakpad_compiled_in)',
378                              '--breakpad_uploads=<(mac_breakpad_uploads)',
379                              '-k0',
380                              '-s1',
381                              '<(branding)',
382                              '<(mac_bundle_id)'],
383                 },
384                 {
385                   'postbuild_name': 'Symlink Libraries',
386                   'action': [
387                     'ln',
388                     '-fhs',
389                     'Versions/Current/Libraries',
390                     '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
391                   ],
392                 },
393               ],
394               'copies': [
395                 {
396                   # Copy FFmpeg binaries for audio/video support.
397                   'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
398                   'files': [
399                     '<(PRODUCT_DIR)/ffmpegsumo.so',
400                   ],
401                 },
402                 {
403                   'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins',
404                   'files': [],
405                   'conditions': [
406                     ['branding == "Chrome"', {
407                       'files': [
408                         '<(PRODUCT_DIR)/Flash Player Plugin for Chrome.plugin',
409                         '<(PRODUCT_DIR)/plugin.vch',
410                       ],
411                     }],
412                     ['internal_pdf', {
413                       'files': [
414                         '<(PRODUCT_DIR)/PDF.plugin',
415                       ],
416                     }],
417                     ['disable_nacl!=1', {
418                       'files': [
419                         '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.plugin',
420                         # We leave out nacl_irt_x86_64.nexe because we only
421                         # support x86-32 NaCl on Mac OS X.
422                         '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
423                       ],
424                     }],
425                   ],
426                 },
427                 {
428                   # Copy of resources used by tests.
429                   'destination': '<(PRODUCT_DIR)',
430                   'files': [
431                       '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
432                   ],
433                 },
434                 {
435                   # Copy of resources used by tests.
436                   'destination': '<(PRODUCT_DIR)/pseudo_locales',
437                   'files': [
438                       '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak'
439                   ],
440                 },
441                 {
442                   'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/resources',
443                   'files': [],
444                   'conditions': [
445                     ['debug_devtools!=0', {
446                       'files': [
447                          '<(PRODUCT_DIR)/resources/inspector',
448                       ],
449                     }],
450                   ],
451                 },
452               ],
453               'conditions': [
454                 ['branding=="Chrome"', {
455                   'copies': [
456                     {
457                       # This location is for the Mac build. Note that the
458                       # copying of these files for Windows and Linux is handled
459                       # in chrome.gyp, as Mac needs to be dropped inside the
460                       # framework.
461                       'destination':
462                           '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps',
463                       'files': ['<@(default_apps_list)'],
464                     },
465                   ],
466                 }],
467                 ['mac_breakpad==1', {
468                   'variables': {
469                     # A real .dSYM is needed for dump_syms to operate on.
470                     'mac_real_dsym': 1,
471                   },
472                 }],
473                 ['mac_breakpad_compiled_in==1', {
474                   'sources': [
475                     'app/breakpad_mac.mm',
476                     'app/breakpad_mac.h',
477                   ],
478                   'dependencies': [
479                     '../breakpad/breakpad.gyp:breakpad',
480                     'app/policy/cloud_policy_codegen.gyp:policy',
481                   ],
482                   'copies': [
483                     {
484                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
485                       'files': [
486                         '<(PRODUCT_DIR)/crash_inspector',
487                         '<(PRODUCT_DIR)/crash_report_sender.app'
488                       ],
489                     },
490                   ],
491                 }, {  # else: mac_breakpad_compiled_in!=1
492                   # No Breakpad, put in the stubs.
493                   'sources': [
494                     'app/breakpad_mac_stubs.mm',
495                     'app/breakpad_mac.h',
496                   ],
497                 }],  # mac_breakpad_compiled_in
498                 ['mac_keystone==1', {
499                   'mac_bundle_resources': [
500                     'browser/mac/keystone_promote_preflight.sh',
501                     'browser/mac/keystone_promote_postflight.sh',
502                   ],
503                   'postbuilds': [
504                     {
505                       'postbuild_name': 'Copy KeystoneRegistration.framework',
506                       'action': [
507                         'tools/build/mac/copy_framework_unversioned',
508                         '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
509                         '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
510                       ],
511                     },
512                     {
513                       'postbuild_name': 'Symlink Frameworks',
514                       'action': [
515                         'ln',
516                         '-fhs',
517                         'Versions/Current/Frameworks',
518                         '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
519                       ],
520                     },
521                   ],
522                 }],  # mac_keystone
523                 ['internal_pdf', {
524                   'dependencies': [
525                     '../pdf/pdf.gyp:pdf',
526                   ],
527                 }],
528               ],  # conditions
529             }],  # OS=="mac"
530           ],  # conditions
531         },  # target chrome_dll
532       ],  # targets
533     }],  # OS=="mac" or OS=="win"
534   ],