blob: 309c075e727d385c26b6611c2bca4707df2d2404 [file] [log] [blame]
[email protected]81f30ce2012-01-18 22:10:331# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]5629e0c2011-09-12 22:07:362# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
[email protected]85ff16042012-03-06 23:46:346 'variables': {
7 'content_shell_product_name': 'Content Shell',
[email protected]6d302912012-11-05 21:57:288 # The "19" is so that sites that sniff for version think that this is
9 # something reasonably current; the "77.34.5" is a hint that this isn't a
10 # standard Chrome.
11 'content_shell_version': '19.77.34.5',
[email protected]85ff16042012-03-06 23:46:3412 },
[email protected]5629e0c2011-09-12 22:07:3613 'targets': [
14 {
[email protected]c1f87b22011-10-05 21:59:3315 'target_name': 'content_shell_lib',
16 'type': 'static_library',
[email protected]03ff5e52011-09-30 00:28:1417 'defines!': ['CONTENT_IMPLEMENTATION'],
[email protected]6d302912012-11-05 21:57:2818 'defines': ['CONTENT_SHELL_VERSION="<(content_shell_version)"'],
[email protected]9fbd3f862011-09-20 23:31:3419 'variables': {
20 'chromium_code': 1,
21 },
[email protected]5629e0c2011-09-12 22:07:3622 'dependencies': [
23 'content_app',
24 'content_browser',
25 'content_common',
26 'content_gpu',
27 'content_plugin',
28 'content_ppapi_plugin',
29 'content_renderer',
[email protected]ee75b8992012-01-27 07:53:5730 'content_shell_resources',
[email protected]5629e0c2011-09-12 22:07:3631 'content_utility',
32 'content_worker',
[email protected]8d41d7612012-11-14 20:32:1933 'test_support_content',
[email protected]0faa0a2b2011-11-15 18:03:1434 'content_resources.gyp:content_resources',
[email protected]aa6e79762011-09-29 20:53:5235 '../base/base.gyp:base',
36 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
37 '../build/temp_gyp/googleurl.gyp:googleurl',
38 '../ipc/ipc.gyp:ipc',
[email protected]433df472012-03-07 20:33:3939 '../media/media.gyp:media',
[email protected]aa6e79762011-09-29 20:53:5240 '../net/net.gyp:net',
[email protected]24f80692012-08-13 15:15:5041 '../net/net.gyp:net_resources',
[email protected]5629e0c2011-09-12 22:07:3642 '../skia/skia.gyp:skia',
[email protected]8350f16f2012-11-30 00:25:3243 '../ui/gl/gl.gyp:gl',
[email protected]5629e0c2011-09-12 22:07:3644 '../ui/ui.gyp:ui',
[email protected]12bc28fcb2011-09-21 15:53:5045 '../v8/tools/gyp/v8.gyp:v8',
[email protected]024b2f22013-01-17 13:56:1046 '../webkit/support/webkit_support.gyp:webkit_resources',
[email protected]01048712012-07-09 23:26:2747 '../webkit/support/webkit_support.gyp:webkit_support',
[email protected]24f80692012-08-13 15:15:5048 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
[email protected]901312472012-10-20 04:25:0249 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
[email protected]b2324b092012-11-01 10:34:1150 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:TestRunner',
[email protected]5629e0c2011-09-12 22:07:3651 ],
52 'include_dirs': [
53 '..',
54 ],
55 'sources': [
[email protected]6cfccd12012-06-28 12:14:0556 'shell/geolocation/shell_access_token_store.cc',
57 'shell/geolocation/shell_access_token_store.h',
[email protected]e1aff172012-03-22 22:41:1758 'shell/paths_mac.h',
59 'shell/paths_mac.mm',
[email protected]9fbd3f862011-09-20 23:31:3460 'shell/shell.cc',
61 'shell/shell.h',
[email protected]a08029b42012-04-25 03:18:4662 'shell/shell_android.cc',
[email protected]fa4a45832012-04-12 21:32:4863 'shell/shell_aura.cc',
[email protected]9fbd3f862011-09-20 23:31:3464 'shell/shell_gtk.cc',
65 'shell/shell_mac.mm',
66 'shell/shell_win.cc',
[email protected]c4e78d72012-03-24 22:55:4167 'shell/shell_application_mac.h',
68 'shell/shell_application_mac.mm',
[email protected]b0f146f2011-09-15 22:14:2569 'shell/shell_browser_context.cc',
70 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3671 'shell/shell_browser_main.cc',
72 'shell/shell_browser_main.h',
[email protected]147f8092012-03-21 11:47:4573 'shell/shell_browser_main_parts.cc',
74 'shell/shell_browser_main_parts.h',
75 'shell/shell_browser_main_parts_mac.mm',
[email protected]5629e0c2011-09-12 22:07:3676 'shell/shell_content_browser_client.cc',
77 'shell/shell_content_browser_client.h',
78 'shell/shell_content_client.cc',
79 'shell/shell_content_client.h',
[email protected]5629e0c2011-09-12 22:07:3680 'shell/shell_content_renderer_client.cc',
81 'shell/shell_content_renderer_client.h',
[email protected]ee75b8992012-01-27 07:53:5782 'shell/shell_devtools_delegate.cc',
83 'shell/shell_devtools_delegate.h',
[email protected]98d6f152011-09-29 19:35:5184 'shell/shell_download_manager_delegate.cc',
85 'shell/shell_download_manager_delegate.h',
[email protected]f2210022012-03-29 00:36:0886 'shell/shell_javascript_dialog_creator.cc',
87 'shell/shell_javascript_dialog_creator.h',
[email protected]fc4f4dd42012-07-30 20:52:4888 'shell/shell_javascript_dialog_gtk.cc',
[email protected]f2210022012-03-29 00:36:0889 'shell/shell_javascript_dialog_mac.mm',
[email protected]7fc83822012-03-30 19:53:2990 'shell/shell_javascript_dialog_win.cc',
[email protected]f2210022012-03-29 00:36:0891 'shell/shell_javascript_dialog.h',
[email protected]e6fbecf22012-08-01 10:11:0392 'shell/shell_login_dialog_gtk.cc',
[email protected]e3503ac2012-04-05 15:01:3693 'shell/shell_login_dialog_mac.mm',
94 'shell/shell_login_dialog.cc',
95 'shell/shell_login_dialog.h',
[email protected]c1f87b22011-10-05 21:59:3396 'shell/shell_main_delegate.cc',
97 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3398 'shell/shell_messages.cc',
99 'shell/shell_messages.h',
[email protected]33bc2832012-03-29 08:18:17100 'shell/shell_network_delegate.cc',
101 'shell/shell_network_delegate.h',
[email protected]74830f02012-01-30 22:27:04102 'shell/shell_render_process_observer.cc',
103 'shell/shell_render_process_observer.h',
[email protected]c5f1e332011-09-27 01:08:03104 'shell/shell_resource_context.cc',
105 'shell/shell_resource_context.h',
[email protected]e3503ac2012-04-05 15:01:36106 'shell/shell_resource_dispatcher_host_delegate.cc',
107 'shell/shell_resource_dispatcher_host_delegate.h',
[email protected]984522c2013-01-16 19:25:41108 'shell/shell_stacking_client_ash.cc',
109 'shell/shell_stacking_client_ash.h',
[email protected]efb5f572012-01-29 10:57:33110 'shell/shell_switches.cc',
111 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:03112 'shell/shell_url_request_context_getter.cc',
113 'shell/shell_url_request_context_getter.h',
[email protected]4c2aa392012-09-03 01:29:42114 'shell/shell_web_contents_view_delegate_creator.h',
115 'shell/shell_web_contents_view_delegate_gtk.cc',
[email protected]dcbe5fe32012-09-10 10:18:32116 'shell/shell_web_contents_view_delegate_mac.mm',
[email protected]4c9bf3482012-09-12 14:35:35117 'shell/shell_web_contents_view_delegate_win.cc',
[email protected]4c2aa392012-09-03 01:29:42118 'shell/shell_web_contents_view_delegate.h',
[email protected]8dafad32012-12-10 14:11:45119 'shell/webkit_test_controller.cc',
120 'shell/webkit_test_controller.h',
[email protected]55915a72012-12-18 11:55:25121 'shell/webkit_test_helpers.cc',
122 'shell/webkit_test_helpers.h',
[email protected]87715122012-10-11 15:53:06123 'shell/webkit_test_platform_support.h',
124 'shell/webkit_test_platform_support_android.cc',
125 'shell/webkit_test_platform_support_linux.cc',
126 'shell/webkit_test_platform_support_mac.mm',
127 'shell/webkit_test_platform_support_win.cc',
[email protected]9b4c6cd2012-08-20 10:47:45128 'shell/webkit_test_runner.cc',
129 'shell/webkit_test_runner.h',
130 'shell/webkit_test_runner_bindings.cc',
131 'shell/webkit_test_runner_bindings.h',
[email protected]5629e0c2011-09-12 22:07:36132 ],
133 'msvs_settings': {
134 'VCLinkerTool': {
135 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
136 },
137 },
138 'conditions': [
139 ['OS=="win" and win_use_allocator_shim==1', {
140 'dependencies': [
141 '../base/allocator/allocator.gyp:allocator',
142 ],
143 }],
[email protected]9fbd3f862011-09-20 23:31:34144 ['OS=="win"', {
145 'resource_include_dirs': [
146 '<(SHARED_INTERMEDIATE_DIR)/webkit',
147 ],
[email protected]9fbd3f862011-09-20 23:31:34148 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34149 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
150 ],
151 'configurations': {
152 'Debug_Base': {
153 'msvs_settings': {
154 'VCLinkerTool': {
155 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
156 },
157 },
158 },
159 },
[email protected]85ff16042012-03-06 23:46:34160 }], # OS=="win"
[email protected]6eb6bb62012-11-10 06:30:59161 ['OS=="linux"', {
162 'dependencies': [
163 '../build/linux/system.gyp:fontconfig',
164 ],
165 }],
[email protected]689266d2012-08-07 12:52:20166 ['OS=="android"', {
[email protected]82e9e2b12012-07-19 00:32:01167 'dependencies': [
168 'content_shell_jni_headers',
169 ],
[email protected]689266d2012-08-07 12:52:20170 }, { # else: OS!="android"
171 'dependencies': [
172 # This dependency is for running DRT against the content shell, and
173 # this combination is not yet supported on Android.
174 '../webkit/support/webkit_support.gyp:webkit_support',
175 ],
[email protected]82e9e2b12012-07-19 00:32:01176 }], # OS=="android"
[email protected]c767d572012-07-27 10:55:58177 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
178 'dependencies': [
179 # This is needed by content/app/content_main_runner.cc
180 '../base/allocator/allocator.gyp:allocator',
181 ],
182 }],
[email protected]fa4a45832012-04-12 21:32:48183 ['use_aura==1', {
[email protected]c767d572012-07-27 10:55:58184 'dependencies': [
185 '../ui/aura/aura.gyp:aura',
186 '../ui/base/strings/ui_strings.gyp:ui_strings',
[email protected]9e7fca802012-09-01 18:53:05187 '../ui/views/controls/webview/webview.gyp:webview',
[email protected]c767d572012-07-27 10:55:58188 '../ui/views/views.gyp:views',
[email protected]0aa76932012-10-14 19:11:10189 '../ui/views/views.gyp:views_test_support',
[email protected]c767d572012-07-27 10:55:58190 '../ui/ui.gyp:ui_resources',
191 ],
[email protected]fa4a45832012-04-12 21:32:48192 'sources/': [
193 ['exclude', 'shell/shell_gtk.cc'],
194 ['exclude', 'shell/shell_win.cc'],
195 ],
[email protected]96b80b472012-07-03 19:41:56196 }], # use_aura==1
[email protected]c767d572012-07-27 10:55:58197 ['chromeos==1', {
198 'dependencies': [
[email protected]48dea152012-11-02 20:26:46199 '../ash/ash.gyp:ash',
[email protected]c767d572012-07-27 10:55:58200 '../chromeos/chromeos.gyp:chromeos',
201 ],
202 }], # chromeos==1
[email protected]5629e0c2011-09-12 22:07:36203 ],
204 },
[email protected]c1f87b22011-10-05 21:59:33205 {
[email protected]ee75b8992012-01-27 07:53:57206 'target_name': 'content_shell_resources',
207 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46208 'dependencies': [
209 'generate_content_shell_resources',
210 ],
211 'variables': {
212 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
213 },
214 'includes': [ '../build/grit_target.gypi' ],
215 'copies': [
216 {
217 'destination': '<(PRODUCT_DIR)',
218 'files': [
219 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
220 ],
221 },
222 ],
[email protected]4cb792f42012-03-24 03:12:42223 },
224 {
[email protected]b581eb402012-03-09 01:31:46225 'target_name': 'generate_content_shell_resources',
226 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57227 'variables': {
228 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
229 },
230 'actions': [
231 {
232 'action_name': 'content_shell_resources',
233 'variables': {
234 'grit_grd_file': 'shell/shell_resources.grd',
235 },
236 'includes': [ '../build/grit_action.gypi' ],
237 },
238 ],
[email protected]ee75b8992012-01-27 07:53:57239 },
240 {
[email protected]81f30ce2012-01-18 22:10:33241 # We build a minimal set of resources so WebKit in content_shell has
242 # access to necessary resources.
243 'target_name': 'content_shell_pak',
244 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57245 'dependencies': [
[email protected]70019152012-12-19 11:44:19246 'browser/devtools/devtools_resources.gyp:devtools_resources',
[email protected]ee75b8992012-01-27 07:53:57247 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45248 '<(DEPTH)/ui/ui.gyp:ui_resources',
[email protected]ee75b8992012-01-27 07:53:57249 ],
[email protected]81f30ce2012-01-18 22:10:33250 'variables': {
251 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
252 },
253 'actions': [
254 {
255 'action_name': 'repack_content_shell_pack',
256 'variables': {
257 'pak_inputs': [
258 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57259 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33260 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
[email protected]c767d572012-07-27 10:55:58261 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
[email protected]a52c7312012-07-24 22:45:57262 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
[email protected]c767d572012-07-27 10:55:58263 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
[email protected]ee75b8992012-01-27 07:53:57264 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33265 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
[email protected]30c8f542012-09-01 01:02:29266 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
[email protected]af551a62012-07-31 16:44:03267 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
[email protected]81f30ce2012-01-18 22:10:33268 ],
[email protected]81f30ce2012-01-18 22:10:33269 },
270 'inputs': [
271 '<(repack_path)',
272 '<@(pak_inputs)',
273 ],
[email protected]81f30ce2012-01-18 22:10:33274 'action': ['python', '<(repack_path)', '<@(_outputs)',
275 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46276 'conditions': [
277 ['OS!="android"', {
278 'outputs': [
279 '<(PRODUCT_DIR)/content_shell.pak',
280 ],
281 }, {
282 'outputs': [
283 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
284 ],
285 }],
286 ],
[email protected]81f30ce2012-01-18 22:10:33287 },
288 ],
289 },
290 {
[email protected]c1f87b22011-10-05 21:59:33291 'target_name': 'content_shell',
292 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34293 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33294 'defines!': ['CONTENT_IMPLEMENTATION'],
295 'variables': {
296 'chromium_code': 1,
297 },
298 'dependencies': [
299 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33300 'content_shell_pak',
[email protected]bb5d2d92012-10-15 07:45:42301 '../third_party/mesa/mesa.gyp:osmesa',
[email protected]c1f87b22011-10-05 21:59:33302 ],
303 'include_dirs': [
304 '..',
305 ],
306 'sources': [
[email protected]711f428e2012-06-22 02:18:23307 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33308 'shell/shell_main.cc',
309 ],
[email protected]85ff16042012-03-06 23:46:34310 'mac_bundle_resources': [
311 'shell/mac/app.icns',
312 'shell/mac/app-Info.plist',
313 ],
314 # TODO(mark): Come up with a fancier way to do this. It should only
315 # be necessary to list app-Info.plist once, not the three times it is
316 # listed here.
317 'mac_bundle_resources!': [
318 'shell/mac/app-Info.plist',
319 ],
320 'xcode_settings': {
321 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
322 },
[email protected]c1f87b22011-10-05 21:59:33323 'msvs_settings': {
324 'VCLinkerTool': {
325 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
326 },
327 },
328 'conditions': [
329 ['OS=="win" and win_use_allocator_shim==1', {
330 'dependencies': [
331 '../base/allocator/allocator.gyp:allocator',
332 ],
333 }],
334 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29335 'sources': [
336 'shell/shell.rc',
337 ],
[email protected]c1f87b22011-10-05 21:59:33338 'configurations': {
339 'Debug_Base': {
340 'msvs_settings': {
341 'VCLinkerTool': {
342 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
343 },
344 },
345 },
346 },
[email protected]85ff16042012-03-06 23:46:34347 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12348 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
349 'dependencies': [
350 '../sandbox/sandbox.gyp:sandbox',
351 ],
[email protected]85ff16042012-03-06 23:46:34352 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58353 ['toolkit_uses_gtk == 1', {
354 'dependencies': [
355 '<(DEPTH)/build/linux/system.gyp:gtk',
356 ],
[email protected]85ff16042012-03-06 23:46:34357 }], # toolkit_uses_gtk
358 ['OS=="mac"', {
359 'product_name': '<(content_shell_product_name)',
360 'dependencies!': [
361 'content_shell_lib',
362 ],
363 'dependencies': [
364 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10365 'content_shell_helper_app',
366 ],
367 'copies': [
368 {
369 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
370 'files': [
371 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
372 ],
373 },
[email protected]85ff16042012-03-06 23:46:34374 ],
375 'postbuilds': [
376 {
377 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
378 'action': [
379 '../build/mac/copy_framework_unversioned.sh',
380 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
381 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
382 ],
383 },
384 {
385 'postbuild_name': 'Fix Framework Link',
386 'action': [
387 'install_name_tool',
388 '-change',
389 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
390 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
391 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
392 ],
393 },
394 {
395 # Modify the Info.plist as needed.
396 'postbuild_name': 'Tweak Info.plist',
397 'action': ['../build/mac/tweak_info_plist.py',
[email protected]6d302912012-11-05 21:57:28398 '--scm=1',
399 '--version=<(content_shell_version)'],
[email protected]85ff16042012-03-06 23:46:34400 },
401 {
[email protected]180df8f2012-03-09 22:36:10402 # This postbuid step is responsible for creating the following
403 # helpers:
404 #
405 # Content Shell Helper EH.app and Content Shell Helper NP.app are
406 # created from Content Shell Helper.app.
407 #
408 # The EH helper is marked for an executable heap. The NP helper
409 # is marked for no PIE (ASLR).
410 'postbuild_name': 'Make More Helpers',
411 'action': [
412 '../build/mac/make_more_helpers.sh',
413 'Frameworks',
414 '<(content_shell_product_name)',
415 ],
416 },
417 {
[email protected]85ff16042012-03-06 23:46:34418 # Make sure there isn't any Objective-C in the shell's
419 # executable.
420 'postbuild_name': 'Verify No Objective-C',
421 'action': [
422 '../build/mac/verify_no_objc.sh',
423 ],
424 },
425 ],
426 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33427 ],
428 },
[email protected]fe2420d2012-08-21 07:28:33429 {
430 'target_name': 'content_shell_builder',
431 'type': 'none',
432 'dependencies': [
433 'content_shell',
[email protected]fe2420d2012-08-21 07:28:33434 ],
435 },
[email protected]5629e0c2011-09-12 22:07:36436 ],
[email protected]85ff16042012-03-06 23:46:34437 'conditions': [
438 ['OS=="mac"', {
439 'targets': [
440 {
441 'target_name': 'content_shell_framework',
442 'type': 'shared_library',
443 'product_name': '<(content_shell_product_name) Framework',
444 'mac_bundle': 1,
445 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36446 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34447 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42448 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34449 ],
450 'dependencies': [
451 'content_shell_lib',
452 ],
453 'include_dirs': [
454 '..',
455 ],
456 'sources': [
457 'shell/shell_content_main.cc',
458 'shell/shell_content_main.h',
459 ],
[email protected]5d96bbe2012-07-25 17:13:23460 'copies': [
461 {
462 # Copy FFmpeg binaries for audio/video support.
463 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
464 'files': [
465 '<(PRODUCT_DIR)/ffmpegsumo.so',
466 ],
467 },
468 ],
[email protected]180df8f2012-03-09 22:36:10469 }, # target content_shell_framework
470 {
471 'target_name': 'content_shell_helper_app',
472 'type': 'executable',
473 'variables': { 'enable_wexit_time_destructors': 1, },
474 'product_name': '<(content_shell_product_name) Helper',
475 'mac_bundle': 1,
476 'dependencies': [
477 'content_shell_framework',
478 ],
479 'sources': [
480 'shell/shell_main.cc',
481 'shell/mac/helper-Info.plist',
482 ],
483 # TODO(mark): Come up with a fancier way to do this. It should only
484 # be necessary to list helper-Info.plist once, not the three times it
485 # is listed here.
486 'mac_bundle_resources!': [
487 'shell/mac/helper-Info.plist',
488 ],
489 # TODO(mark): For now, don't put any resources into this app. Its
490 # resources directory will be a symbolic link to the browser app's
491 # resources directory.
492 'mac_bundle_resources/': [
493 ['exclude', '.*'],
494 ],
495 'xcode_settings': {
496 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
497 },
498 'postbuilds': [
499 {
500 # The framework defines its load-time path
501 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
502 # (chrome). A different relative path needs to be used in
503 # content_shell_helper_app.
504 'postbuild_name': 'Fix Framework Link',
505 'action': [
506 'install_name_tool',
507 '-change',
508 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
509 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
510 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
511 ],
512 },
513 {
514 # Modify the Info.plist as needed. The script explains why this
515 # is needed. This is also done in the chrome and chrome_dll
[email protected]bbf52442012-08-23 22:53:18516 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
517 # are used because Breakpad, Keystone, and SCM keys are
[email protected]180df8f2012-03-09 22:36:10518 # never placed into the helper.
519 'postbuild_name': 'Tweak Info.plist',
520 'action': ['../build/mac/tweak_info_plist.py',
521 '--breakpad=0',
522 '--keystone=0',
[email protected]6d302912012-11-05 21:57:28523 '--scm=0',
524 '--version=<(content_shell_version)'],
[email protected]180df8f2012-03-09 22:36:10525 },
526 {
527 # Make sure there isn't any Objective-C in the helper app's
528 # executable.
529 'postbuild_name': 'Verify No Objective-C',
530 'action': [
531 '../build/mac/verify_no_objc.sh',
532 ],
533 },
534 ],
[email protected]ec40c38f2012-06-28 16:37:49535 'conditions': [
536 ['component=="shared_library"', {
537 'xcode_settings': {
538 'LD_RUNPATH_SEARCH_PATHS': [
539 # Get back from Content Shell.app/Contents/Frameworks/
540 # Helper.app/Contents/MacOS
541 '@loader_path/../../../../../..',
542 ],
543 },
544 }],
545 ],
[email protected]180df8f2012-03-09 22:36:10546 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34547 ],
548 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06549 ['OS=="android"', {
550 'targets': [
551 {
[email protected]a08029b42012-04-25 03:18:46552 # TODO(jrg): Update this action and other jni generators to only
553 # require specifying the java directory and generate the rest.
554 'target_name': 'content_shell_jni_headers',
555 'type': 'none',
[email protected]e46f66152012-07-19 20:02:55556 'sources': [
557 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
558 'shell/android/java/src/org/chromium/content_shell/Shell.java',
559 ],
[email protected]029a7712013-01-15 08:11:42560 'direct_dependent_settings': {
561 'include_dirs': [
562 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
563 ],
564 },
[email protected]a08029b42012-04-25 03:18:46565 'variables': {
[email protected]e46f66152012-07-19 20:02:55566 'jni_gen_dir': 'content/shell',
[email protected]a08029b42012-04-25 03:18:46567 },
568 'includes': [ '../build/jni_generator.gypi' ],
569 },
570 {
[email protected]c1101582012-06-25 17:07:18571 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46572 'type': 'shared_library',
573 'dependencies': [
574 'content_shell_jni_headers',
575 'content_shell_lib',
576 'content_shell_pak',
577 # Skia is necessary to ensure the dependencies needed by
578 # WebContents are included.
579 '../skia/skia.gyp:skia',
580 '<(DEPTH)/media/media.gyp:player_android',
581 ],
[email protected]a08029b42012-04-25 03:18:46582 'sources': [
583 'shell/android/shell_library_loader.cc',
584 'shell/android/shell_library_loader.h',
585 'shell/android/shell_manager.cc',
586 'shell/android/shell_manager.h',
[email protected]a08029b42012-04-25 03:18:46587 ],
[email protected]f83a47392012-07-12 22:15:04588 'sources!': [
589 'shell/shell_main.cc',
590 'shell/shell_main.h',
591 ],
[email protected]7abcaa82012-06-27 17:09:48592 'conditions': [
593 ['android_build_type==1', {
594 'ldflags': [
595 '-lgabi++', # For rtti
596 ],
597 }],
598 ],
[email protected]a08029b42012-04-25 03:18:46599 },
600 {
[email protected]319d6a82012-09-20 22:52:28601 # content_shell_apk creates a .jar as a side effect. Any java targets
602 # that need that .jar in their classpath should depend on this target,
[email protected]b74cf84e2012-11-16 07:31:49603 # content_shell_java. Dependents of content_shell_apk receive its jar
604 # path in the variable 'apk_output_jar_path'.
[email protected]319d6a82012-09-20 22:52:28605 'target_name': 'content_shell_java',
606 'type': 'none',
[email protected]319d6a82012-09-20 22:52:28607 'dependencies': [
[email protected]319d6a82012-09-20 22:52:28608 'content_shell_apk',
[email protected]319d6a82012-09-20 22:52:28609 ],
[email protected]04fe3782012-10-09 02:20:29610 # This all_dependent_settings is used for java targets only. This will
611 # add the content_shell jar to the classpath of dependent java
612 # targets.
613 'all_dependent_settings': {
[email protected]319d6a82012-09-20 22:52:28614 'variables': {
[email protected]b74cf84e2012-11-16 07:31:49615 'input_jars_paths': ['>(apk_output_jar_path)'],
[email protected]319d6a82012-09-20 22:52:28616 },
617 },
618 # Add an action with the appropriate output. This allows the generated
619 # buildfiles to determine which target the output corresponds to.
620 'actions': [
621 {
622 'action_name': 'fake_generate_jar',
623 'inputs': [],
[email protected]b74cf84e2012-11-16 07:31:49624 'outputs': ['>(apk_output_jar_path)'],
[email protected]319d6a82012-09-20 22:52:28625 'action': [],
626 },
627 ],
628 },
[email protected]75c86a22012-09-26 03:50:37629 {
630 'target_name': 'content_shell_apk',
631 'type': 'none',
632 'dependencies': [
633 'content_java',
634 '../base/base.gyp:base_java',
635 '../media/media.gyp:media_java',
636 '../net/net.gyp:net_java',
637 '../ui/ui.gyp:ui_java',
638 ],
639 'variables': {
640 'package_name': 'content_shell',
641 'apk_name': 'ContentShell',
[email protected]cbd76eb2012-10-11 23:23:49642 'manifest_package_name': 'org.chromium.content_shell',
[email protected]75c86a22012-09-26 03:50:37643 'java_in_dir': 'shell/android/java',
644 # TODO(cjhopman): The resource directory of all apks should be in
645 # <java_in_dir>/res.
646 'resource_dir': '../res',
[email protected]cbd76eb2012-10-11 23:23:49647 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]75c86a22012-09-26 03:50:37648 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
649 },
[email protected]75c86a22012-09-26 03:50:37650 'includes': [ '../build/java_apk.gypi' ],
651 },
[email protected]cc66d282012-03-30 11:44:06652 ],
653 }], # OS=="android"
654 ]
[email protected]5629e0c2011-09-12 22:07:36655}