Tweak bug ids to group Apache-needing bugs.
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob29edb9e3d4e51b2449c50b70ab519ab23308c48d
1 # Copyright (c) 2009 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   'target_defaults': {
6     'variables': {
7       'chrome_dll_target': 0,
8     },
9     'target_conditions': [
10       ['chrome_dll_target==1', {
11         'conditions': [
12           ['OS=="win"', {
13             'include_dirs': [
14               'third_party/wtl/include',
15             ],
16             'defines': [
17               'CHROME_DLL',
18               'BROWSER_DLL',
19               'RENDERER_DLL',
20               'PLUGIN_DLL',
21             ],
22             'msvs_settings': {
23               'VCLinkerTool': {
24                 'BaseAddress': '0x01c30000',
25                 'DelayLoadDLLs': [
26                   'crypt32.dll',
27                   'cryptui.dll',
28                   'winhttp.dll',
29                   'wininet.dll',
30                   'wsock32.dll',
31                   'ws2_32.dll',
32                   'winspool.drv',
33                   'comdlg32.dll',
34                   'imagehlp.dll',
35                   'urlmon.dll',
36                   'imm32.dll',
37                   'iphlpapi.dll',
38                 ],
39                 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
40                 'SubSystem': '2',
41               },
42               'VCManifestTool': {
43                 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
44               },
45             },
46             'configurations': {
47               'Debug_Base': {
48                 'msvs_settings': {
49                   'VCLinkerTool': {
50                     'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
51                   },
52                 },
53               },
54             },
55           }],  # OS=="win"
56         ],  # conditions
57       }],
58     ],
59   },
60   'conditions': [
61     ['OS=="mac" or OS=="win"', {
62       'targets': [
63         {
64           'target_name': 'chrome_dll',
65           'type': 'shared_library',
66           'variables': {
67             'chrome_dll_target': 1,
68           },
69           'dependencies': [
70             '<@(chromium_dependencies)',
71           ],
72           'conditions': [
73             ['OS=="win"', {
74               'product_name': 'chrome',
75               'msvs_guid': 'C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9',
76               'dependencies': [
77                 # On Windows, link the dependencies (libraries) that make
78                 # up actual Chromium functionality into this .dll.
79                 'chrome_dll_version',
80                 'chrome_resources',
81                 'installer/installer.gyp:installer_util_strings',
82                 'worker',
83                 '../printing/printing.gyp:printing',
84                 '../net/net.gyp:net_resources',
85                 '../build/util/support/support.gyp:*',
86                 '../third_party/cld/cld.gyp:cld',
87                 '../views/views.gyp:views',
88                 '../webkit/webkit.gyp:webkit_resources',
89                 '../gears/gears.gyp:gears',
90               ],
91               'sources': [
92                 'app/chrome_dll.rc',
93                 'app/chrome_dll_main.cc',
94                 'app/chrome_dll_resource.h',
95                 '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
97                 '../webkit/glue/resources/aliasb.cur',
98                 '../webkit/glue/resources/cell.cur',
99                 '../webkit/glue/resources/col_resize.cur',
100                 '../webkit/glue/resources/copy.cur',
101                 '../webkit/glue/resources/row_resize.cur',
102                 '../webkit/glue/resources/vertical_text.cur',
103                 '../webkit/glue/resources/zoom_in.cur',
104                 '../webkit/glue/resources/zoom_out.cur',
106                 # TODO:  It would be nice to have these pulled in
107                 # automatically from direct_dependent_settings in
108                 # their various targets (net.gyp:net_resources, etc.),
109                 # but that causes errors in other targets when
110                 # resulting .res files get referenced multiple times.
111                 '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.rc',
112                 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
113                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
114                 '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
115                 '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.rc',
116                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
117                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
119                 # TODO(sgk):  left-over from pre-gyp build, figure out
120                 # if we still need them and/or how to update to gyp.
121                 #'app/check_dependents.bat',
122                 #'app/chrome.dll.deps',
123               ],
124               'msvs_settings': {
125                 'VCLinkerTool': {
126                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
127                   'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb',
128                 },
129               },
130             }],  # OS=="win"
131             ['OS=="mac"', {
132               # The main browser executable's name is <(mac_product_name).
133               # Certain things will get confused if two modules in the
134               # executable share the same name, so append " Framework" to the
135               # product_name used for the framework.  This will result in
136               # a name like "Chromium Framework.framework".
137               'product_name': '<(mac_product_name) Framework',
138               'mac_bundle': 1,
139               'xcode_settings': {
140                 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
142                 # The dylib versions are of the form a[.b[.c]], where a is a
143                 # 16-bit unsigned integer, and b and c are 8-bit unsigned
144                 # integers.  Any missing component is taken to be 0.  The
145                 # best mapping from product version numbers into this scheme
146                 # is to just use the build and patch numbers.  There is no
147                 # ambiguity in this scheme because the build number is
148                 # guaranteed unique even across distinct major and minor
149                 # version numbers.  These settings correspond to
150                 # -compatibility_version and -current_version.
151                 'DYLIB_COMPATIBILITY_VERSION': '<(version_build_patch)',
152                 'DYLIB_CURRENT_VERSION': '<(version_build_patch)',
154                 # The framework is placed within the .app's versioned
155                 # directory.  DYLIB_INSTALL_NAME_BASE and
156                 # LD_DYLIB_INSTALL_NAME affect -install_name.
157                 'DYLIB_INSTALL_NAME_BASE':
158                     '@executable_path/../Versions/<(version_full)',
159                 # See tools/build/mac/copy_framework_unversioned for
160                 # information on LD_DYLIB_INSTALL_NAME.
161                 'LD_DYLIB_INSTALL_NAME':
162                     '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
164                 'INFOPLIST_FILE': 'app/framework-Info.plist',
166                 # Define the order of symbols within the framework.  This
167                 # sets -order_file.
168                 'ORDER_FILE': 'app/framework.order',
169               },
170               'sources': [
171                 'app/chrome_dll_main.cc',
172                 'app/chrome_dll_resource.h',
173                 'app/chrome_exe_main.mm',
174               ],
175               # TODO(mark): Come up with a fancier way to do this.  It should
176               # only be necessary to list framework-Info.plist once, not the
177               # three times it is listed here.
178               'mac_bundle_resources': [
179                 'app/framework-Info.plist',
180                 'app/nibs/About.xib',
181                 'app/nibs/AboutIPC.xib',
182                 'app/nibs/BookmarkAllTabs.xib',
183                 'app/nibs/BookmarkBar.xib',
184                 'app/nibs/BookmarkBubble.xib',
185                 'app/nibs/BookmarkEditor.xib',
186                 'app/nibs/BookmarkManager.xib',
187                 'app/nibs/BookmarkNameFolder.xib',
188                 'app/nibs/BrowserWindow.xib',
189                 'app/nibs/ClearBrowsingData.xib',
190                 'app/nibs/Cookies.xib',
191                 'app/nibs/DownloadItem.xib',
192                 'app/nibs/DownloadShelf.xib',
193                 'app/nibs/EditSearchEngine.xib',
194                 'app/nibs/FindBar.xib',
195                 'app/nibs/FirstRunDialog.xib',
196                 'app/nibs/FontLanguageSettings.xib',
197                 'app/nibs/HungRendererDialog.xib',
198                 'app/nibs/HttpAuthLoginSheet.xib',
199                 'app/nibs/ImportSettingsDialog.xib',
200                 'app/nibs/InfoBar.xib',
201                 'app/nibs/InfoBarContainer.xib',
202                 'app/nibs/ImportProgressDialog.xib',
203                 'app/nibs/KeywordEditor.xib',
204                 'app/nibs/MainMenu.xib',
205                 'app/nibs/PageInfo.xib',
206                 'app/nibs/Preferences.xib',
207                 'app/nibs/ReportBug.xib',
208                 'app/nibs/SaveAccessoryView.xib',
209                 'app/nibs/SadTab.xib',
210                 'app/nibs/TabContents.xib',
211                 'app/nibs/TabView.xib',
212                 'app/nibs/TaskManager.xib',
213                 'app/nibs/Toolbar.xib',
214                 'app/theme/back_Template.pdf',
215                 'app/theme/chevron.png',  # TODO(jrg): get and use a pdf version
216                 'app/theme/close_bar.pdf',
217                 'app/theme/close_bar_h.pdf',
218                 'app/theme/close_bar_p.pdf',
219                 'app/theme/find_next_Template.pdf',
220                 'app/theme/find_prev_Template.pdf',
221                 'app/theme/forward_Template.pdf',
222                 'app/theme/go_Template.pdf',
223                 'app/theme/home_Template.pdf',
224                 'app/theme/menu_chrome_rtl_Template.pdf',
225                 'app/theme/menu_chrome_Template.pdf',
226                 'app/theme/menu_page_rtl_Template.pdf',
227                 'app/theme/menu_page_Template.pdf',
228                 'app/theme/nav.pdf',
229                 'app/theme/newtab.pdf',
230                 'app/theme/newtab_h.pdf',
231                 'app/theme/newtab_p.pdf',
232                 'app/theme/otr_icon.pdf',
233                 'app/theme/reload_Template.pdf',
234                 'app/theme/star_Template.pdf',
235                 'app/theme/starred.pdf',
236                 'app/theme/stop_Template.pdf',
237               ],
238               'mac_bundle_resources!': [
239                 'app/framework-Info.plist',
240               ],
241               'dependencies': [
242                 # Bring in pdfsqueeze and run it on all pdfs
243                 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
244                 '../build/util/support/support.gyp:*',
245               ],
246               'rules': [
247                 {
248                   'rule_name': 'pdfsqueeze',
249                   'extension': 'pdf',
250                   'inputs': [
251                     '<(PRODUCT_DIR)/pdfsqueeze',
252                   ],
253                   'outputs': [
254                     '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
255                   ],
256                   'action': ['<(PRODUCT_DIR)/pdfsqueeze',
257                              '<(RULE_INPUT_PATH)', '<@(_outputs)'],
258                   'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
259                 },
260               ],
261               'variables': {
262                 'repack_path': '../tools/data_pack/repack.py',
263               },
264               'actions': [
265                 # TODO(mark): These actions are duplicated for Linux and
266                 # FreeBSD in the chrome target.  Can they be unified?
267                 {
268                   'action_name': 'repack_chrome',
269                   'variables': {
270                     'pak_inputs': [
271                       '<(grit_out_dir)/browser_resources.pak',
272                       '<(grit_out_dir)/common_resources.pak',
273                       '<(grit_out_dir)/renderer_resources.pak',
274                       '<(grit_out_dir)/theme_resources.pak',
275                       '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.pak',
276                       '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
277                       '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
278                     ],
279                   },
280                   'inputs': [
281                     '<(repack_path)',
282                     '<@(pak_inputs)',
283                   ],
284                   'outputs': [
285                     '<(INTERMEDIATE_DIR)/repack/chrome.pak',
286                   ],
287                   'action': ['python', '<(repack_path)', '<@(_outputs)',
288                              '<@(pak_inputs)'],
289                   'process_outputs_as_mac_bundle_resources': 1,
290                 },
291                 {
292                   'action_name': 'repack_locales',
293                   'process_outputs_as_mac_bundle_resources': 1,
294                   'variables': {
295                     'conditions': [
296                       ['branding=="Chrome"', {
297                         'branding_flag': ['-b', 'google_chrome',],
298                       }, {  # else: branding!="Chrome"
299                         'branding_flag': ['-b', 'chromium',],
300                       }],
301                     ],
302                   },
303                   'inputs': [
304                     'tools/build/repack_locales.py',
305                     # NOTE: Ideally the common command args would be shared
306                     # amongst inputs/outputs/action, but the args include shell
307                     # variables which need to be passed intact, and command
308                     # expansion wants to expand the shell variables. Adding the
309                     # explicit quoting here was the only way it seemed to work.
310                     '>!@(<(repack_locales_cmd) -i <(branding_flag) -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
311                   ],
312                   'outputs': [
313                     '>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
314                   ],
315                   'action': [
316                     '<@(repack_locales_cmd)',
317                     '<@(branding_flag)',
318                     '-g', '<(grit_out_dir)',
319                     '-s', '<(SHARED_INTERMEDIATE_DIR)',
320                     '-x', '<(INTERMEDIATE_DIR)',
321                     '<@(locales)',
322                   ],
323                 },
324               ],
325               'postbuilds': [
326                 {
327                   # This step causes an error to be raised if the .order file
328                   # does not account for all global text symbols.  It
329                   # validates the completeness of the .order file.
330                   'postbuild_name': 'Verify global text symbol order',
331                   'variables': {
332                     'verify_order_path': 'tools/build/mac/verify_order',
333                   },
334                   'action': [
335                     '<(verify_order_path)',
336                     '_ChromeMain',
337                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
338                   ],
339                 },
340                 {
341                   # Modify the Info.plist as needed.  The script explains why
342                   # this is needed.  This is also done in the chrome target.
343                   # The framework needs the Breakpad and Keystone keys if
344                   # those features are enabled.  It doesn't currently use the
345                   # Subversion keys for anything, but this seems like a really
346                   # good place to store them.
347                   'postbuild_name': 'Tweak Info.plist',
348                   'action': ['<(tweak_info_plist_path)',
349                              '-b<(mac_breakpad)',
350                              '-k<(mac_keystone)',
351                              '-s1',
352                              '<(branding)',
353                              '<(mac_bundle_id)'],
354                 },
355                 {
356                   'postbuild_name': 'Symlink Libraries',
357                   'action': [
358                     'ln',
359                     '-fhs',
360                     'Versions/Current/Libraries',
361                     '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
362                   ],
363                 },
364               ],
365               'copies': [
366                 {
367                   'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
368                   'files': [
369                     '<(PRODUCT_DIR)/resources/inspector/'
370                   ],
371                   'conditions': [
372                     ['mac_breakpad==1', {
373                       'files': [
374                         '<(PRODUCT_DIR)/crash_inspector',
375                         '<(PRODUCT_DIR)/crash_report_sender.app'
376                       ],
377                     }],
378                   ],
379                 },
380                 {
381                   'destination':
382                       '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
383                   'files': [
384                     # TODO(ajwong): Find a way to share this path with
385                     # ffmpeg.gyp so they don't diverge. (BUG=23602)
386                     '<(PRODUCT_DIR)/libffmpegsumo.dylib',
387                   ],
388                 },
389               ],
390               'conditions': [
391                 ['mac_breakpad==1', {
392                   'variables': {
393                     # A real .dSYM is needed for dump_syms to operate on.
394                     'mac_real_dsym': 1,
395                   },
396                   'sources': [
397                     'app/breakpad_mac.mm',
398                     'app/breakpad_mac.h',
399                   ],
400                   'dependencies': [
401                     '../breakpad/breakpad.gyp:breakpad',
402                   ],
403                 }, {  # else: mac_breakpad!=1
404                   # No Breakpad, put in the stubs.
405                   'sources': [
406                     'app/breakpad_mac_stubs.mm',
407                     'app/breakpad_mac.h',
408                   ],
409                 }],  # mac_breakpad
410                 ['mac_keystone==1', {
411                   'variables': {
412                     'conditions': [
413                       ['branding=="Chrome"', {
414                         'theme_dir_name': 'google_chrome',
415                       }, {  # else: 'branding!="Chrome"
416                         'theme_dir_name': 'chromium',
417                       }],
418                     ],
419                   },
420                   'mac_bundle_resources': [
421                     # This image is used to badge the lock icon in the
422                     # promotion authentication dialog.  It needs to exist as
423                     # a file on disk and not just something in a resource
424                     # bundle because that's the interface that Authorization
425                     # Services uses.  Also, Authorization Services can't deal
426                     # with .icns files.
427                     'app/theme/<(theme_dir_name)/product_logo_32.png',
429                     'browser/cocoa/keystone_promote_preflight.sh',
430                     'browser/cocoa/keystone_promote_postflight.sh',
431                   ],
432                   'postbuilds': [
433                     {
434                       'postbuild_name': 'Copy KeystoneRegistration.framework',
435                       'action': [
436                         'tools/build/mac/copy_framework_unversioned',
437                         '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
438                         '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
439                       ],
440                     },
441                     {
442                       'postbuild_name': 'Symlink Frameworks',
443                       'action': [
444                         'ln',
445                         '-fhs',
446                         'Versions/Current/Frameworks',
447                         '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
448                       ],
449                     },
450                   ],
451                 }],  # mac_keystone
452               ],  # conditions
453             }],  # OS=="mac"
454           ],  # conditions
455         },  # target chrome_dll
456       ],  # targets
457     }],  # OS=="mac" or OS=="win"
458     [ 'OS=="win"', {
459       'targets': [
460         {
461           'target_name': 'chrome_dll_nacl_win64',
462           'type': 'shared_library',
463           'product_name': 'chrome_nacl_win64',
464           'msvs_guid': 'F5B2D851-1279-4CE1-9386-AB7C6433551B',
465           'variables': {
466             'chrome_dll_target': 1,
467           },
468           'include_dirs': [
469             '..',
470           ],
471           'dependencies': [
472             '<@(nacl_win64_dependencies)',
473             'chrome_dll_version',
474             'nacl_win64',
475           ],
476           'defines': [
477             '<@(nacl_win64_defines)',
478           ],
479           'sources': [
480             'app/chrome_dll_main.cc',
481             'app/chrome_dll_resource.h',
482             'browser/renderer_host/render_process_host_dummy.cc',
483             '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
485             # TODO:  It would be nice to have these pulled in
486             # automatically from direct_dependent_settings in
487             # their various targets (net.gyp:net_resources, etc.),
488             # but that causes errors in other targets when
489             # resulting .res files get referenced multiple times.
490             '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.rc',
491             '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
493             # TODO(sgk):  left-over from pre-gyp build, figure out
494             # if we still need them and/or how to update to gyp.
495             #'app/check_dependents.bat',
496             #'app/chrome.dll.deps',
497             
498             # Stub entry points for process types that are not supported
499             # by NaCl Win64 executable
500             'app/dummy_main_functions.cc',
501           ],
502           'msvs_settings': {
503             'VCLinkerTool': {
504               'ImportLibrary': '$(OutDir)\\lib\\chrome_dll_nacl_win64.lib',
505               'ProgramDatabaseFile': '$(OutDir)\\chrome_dll_nacl_win64.pdb',
506             },
507           },
508           'configurations': {
509             'Common_Base': {
510               'msvs_target_platform': 'x64',
511             },
512           },
513         },  # target chrome_dll
514       ],
515     }],
516   ],