blob: 4f202e8673dcd0f9838c434e7036ce3a8c7329a6 [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',
8 },
[email protected]5629e0c2011-09-12 22:07:369 'targets': [
10 {
[email protected]c1f87b22011-10-05 21:59:3311 'target_name': 'content_shell_lib',
12 'type': 'static_library',
[email protected]03ff5e52011-09-30 00:28:1413 'defines!': ['CONTENT_IMPLEMENTATION'],
[email protected]9fbd3f862011-09-20 23:31:3414 'variables': {
15 'chromium_code': 1,
16 },
[email protected]5629e0c2011-09-12 22:07:3617 'dependencies': [
18 'content_app',
19 'content_browser',
20 'content_common',
21 'content_gpu',
22 'content_plugin',
23 'content_ppapi_plugin',
24 'content_renderer',
[email protected]ee75b8992012-01-27 07:53:5725 'content_shell_resources',
[email protected]5629e0c2011-09-12 22:07:3626 'content_utility',
27 'content_worker',
[email protected]0faa0a2b2011-11-15 18:03:1428 'content_resources.gyp:content_resources',
[email protected]aa6e79762011-09-29 20:53:5229 '../base/base.gyp:base',
30 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
31 '../build/temp_gyp/googleurl.gyp:googleurl',
32 '../ipc/ipc.gyp:ipc',
[email protected]433df472012-03-07 20:33:3933 '../media/media.gyp:media',
[email protected]aa6e79762011-09-29 20:53:5234 '../net/net.gyp:net',
[email protected]5629e0c2011-09-12 22:07:3635 '../skia/skia.gyp:skia',
[email protected]ee582a52012-05-22 07:38:5236 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
[email protected]5629e0c2011-09-12 22:07:3637 '../ui/ui.gyp:ui',
[email protected]12bc28fcb2011-09-21 15:53:5038 '../v8/tools/gyp/v8.gyp:v8',
[email protected]01048712012-07-09 23:26:2739 '../webkit/support/webkit_support.gyp:webkit_support',
[email protected]5629e0c2011-09-12 22:07:3640 ],
41 'include_dirs': [
42 '..',
43 ],
44 'sources': [
[email protected]6cfccd12012-06-28 12:14:0545 'shell/geolocation/shell_access_token_store.cc',
46 'shell/geolocation/shell_access_token_store.h',
[email protected]cccb5cf2012-06-06 22:20:0447 'shell/layout_test_controller.cc',
48 'shell/layout_test_controller.h',
[email protected]74830f02012-01-30 22:27:0449 'shell/layout_test_controller_bindings.cc',
50 'shell/layout_test_controller_bindings.h',
[email protected]cccb5cf2012-06-06 22:20:0451 'shell/layout_test_controller_host.cc',
52 'shell/layout_test_controller_host.h',
[email protected]e1aff172012-03-22 22:41:1753 'shell/paths_mac.h',
54 'shell/paths_mac.mm',
[email protected]9fbd3f862011-09-20 23:31:3455 'shell/shell.cc',
56 'shell/shell.h',
[email protected]a08029b42012-04-25 03:18:4657 'shell/shell_android.cc',
[email protected]fa4a45832012-04-12 21:32:4858 'shell/shell_aura.cc',
[email protected]9fbd3f862011-09-20 23:31:3459 'shell/shell_gtk.cc',
60 'shell/shell_mac.mm',
61 'shell/shell_win.cc',
[email protected]c4e78d72012-03-24 22:55:4162 'shell/shell_application_mac.h',
63 'shell/shell_application_mac.mm',
[email protected]b0f146f2011-09-15 22:14:2564 'shell/shell_browser_context.cc',
65 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3666 'shell/shell_browser_main.cc',
67 'shell/shell_browser_main.h',
[email protected]147f8092012-03-21 11:47:4568 'shell/shell_browser_main_parts.cc',
69 'shell/shell_browser_main_parts.h',
70 'shell/shell_browser_main_parts_mac.mm',
[email protected]5629e0c2011-09-12 22:07:3671 'shell/shell_content_browser_client.cc',
72 'shell/shell_content_browser_client.h',
73 'shell/shell_content_client.cc',
74 'shell/shell_content_client.h',
[email protected]5629e0c2011-09-12 22:07:3675 'shell/shell_content_renderer_client.cc',
76 'shell/shell_content_renderer_client.h',
[email protected]ee75b8992012-01-27 07:53:5777 'shell/shell_devtools_delegate.cc',
78 'shell/shell_devtools_delegate.h',
[email protected]98d6f152011-09-29 19:35:5179 'shell/shell_download_manager_delegate.cc',
80 'shell/shell_download_manager_delegate.h',
[email protected]f2210022012-03-29 00:36:0881 'shell/shell_javascript_dialog_creator.cc',
82 'shell/shell_javascript_dialog_creator.h',
83 'shell/shell_javascript_dialog_mac.mm',
[email protected]7fc83822012-03-30 19:53:2984 'shell/shell_javascript_dialog_win.cc',
[email protected]f2210022012-03-29 00:36:0885 'shell/shell_javascript_dialog.h',
[email protected]e3503ac2012-04-05 15:01:3686 'shell/shell_login_dialog_mac.mm',
87 'shell/shell_login_dialog.cc',
88 'shell/shell_login_dialog.h',
[email protected]c1f87b22011-10-05 21:59:3389 'shell/shell_main_delegate.cc',
90 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3391 'shell/shell_messages.cc',
92 'shell/shell_messages.h',
[email protected]33bc2832012-03-29 08:18:1793 'shell/shell_network_delegate.cc',
94 'shell/shell_network_delegate.h',
[email protected]74830f02012-01-30 22:27:0495 'shell/shell_render_process_observer.cc',
96 'shell/shell_render_process_observer.h',
[email protected]c5f1e332011-09-27 01:08:0397 'shell/shell_resource_context.cc',
98 'shell/shell_resource_context.h',
[email protected]e3503ac2012-04-05 15:01:3699 'shell/shell_resource_dispatcher_host_delegate.cc',
100 'shell/shell_resource_dispatcher_host_delegate.h',
[email protected]efb5f572012-01-29 10:57:33101 'shell/shell_switches.cc',
102 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:03103 'shell/shell_url_request_context_getter.cc',
104 'shell/shell_url_request_context_getter.h',
[email protected]5629e0c2011-09-12 22:07:36105 ],
106 'msvs_settings': {
107 'VCLinkerTool': {
108 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
109 },
110 },
111 'conditions': [
112 ['OS=="win" and win_use_allocator_shim==1', {
113 'dependencies': [
114 '../base/allocator/allocator.gyp:allocator',
115 ],
116 }],
[email protected]9fbd3f862011-09-20 23:31:34117 ['OS=="win"', {
118 'resource_include_dirs': [
119 '<(SHARED_INTERMEDIATE_DIR)/webkit',
120 ],
[email protected]9fbd3f862011-09-20 23:31:34121 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34122 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
123 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
124 ],
125 'configurations': {
126 'Debug_Base': {
127 'msvs_settings': {
128 'VCLinkerTool': {
129 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
130 },
131 },
132 },
133 },
[email protected]85ff16042012-03-06 23:46:34134 }], # OS=="win"
[email protected]a08029b42012-04-25 03:18:46135 ['OS!="android"', {
136 'dependencies': [
137 # This dependency is for running DRT against the content shell, and
138 # this combination is not yet supported on Android.
139 '../webkit/support/webkit_support.gyp:webkit_support',
140 ],
141 }], # OS!="android"
[email protected]fa4a45832012-04-12 21:32:48142 ['use_aura==1', {
143 'sources/': [
144 ['exclude', 'shell/shell_gtk.cc'],
145 ['exclude', 'shell/shell_win.cc'],
146 ],
[email protected]96b80b472012-07-03 19:41:56147 }], # use_aura==1
148 ['inside_chromium_build==0 or component!="shared_library"', {
149 'dependencies': [
150 '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
151 '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf',
152 ],
153 'include_dirs': [
154 # Required for WebTestingSupport.cpp to find our custom config.h.
155 'shell/',
156 '<(webkit_src_dir)/Source/WebKit/chromium/public',
157 # WARNING: Do not view this particular case as a precedent for
158 # including WebCore headers in the content shell.
159 '<(webkit_src_dir)/Source/WebCore/testing/v8', # for WebCoreTestSupport.h needed to link in window.internals code.
160 ],
161 'sources': [
162 'shell/config.h',
163 '<(webkit_src_dir)/Source/WebKit/chromium/src/WebTestingSupport.cpp',
164 '<(webkit_src_dir)/Source/WebKit/chromium/public/WebTestingSupport.h',
165 ],
[email protected]fa4a45832012-04-12 21:32:48166 }],
[email protected]5629e0c2011-09-12 22:07:36167 ],
168 },
[email protected]c1f87b22011-10-05 21:59:33169 {
[email protected]ee75b8992012-01-27 07:53:57170 'target_name': 'content_shell_resources',
171 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46172 'dependencies': [
173 'generate_content_shell_resources',
174 ],
175 'variables': {
176 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
177 },
178 'includes': [ '../build/grit_target.gypi' ],
179 'copies': [
180 {
181 'destination': '<(PRODUCT_DIR)',
182 'files': [
183 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
184 ],
185 },
186 ],
[email protected]4cb792f42012-03-24 03:12:42187 },
188 {
[email protected]b581eb402012-03-09 01:31:46189 'target_name': 'generate_content_shell_resources',
190 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57191 'variables': {
192 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
193 },
194 'actions': [
195 {
196 'action_name': 'content_shell_resources',
197 'variables': {
198 'grit_grd_file': 'shell/shell_resources.grd',
199 },
200 'includes': [ '../build/grit_action.gypi' ],
201 },
202 ],
[email protected]ee75b8992012-01-27 07:53:57203 },
204 {
[email protected]81f30ce2012-01-18 22:10:33205 # We build a minimal set of resources so WebKit in content_shell has
206 # access to necessary resources.
207 'target_name': 'content_shell_pak',
208 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57209 'dependencies': [
210 'browser/debugger/devtools_resources.gyp:devtools_resources',
211 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45212 '<(DEPTH)/net/net.gyp:net_resources',
213 '<(DEPTH)/ui/ui.gyp:ui_resources',
214 '<(DEPTH)/ui/ui.gyp:ui_resources_standard',
[email protected]ee75b8992012-01-27 07:53:57215 ],
[email protected]81f30ce2012-01-18 22:10:33216 'variables': {
217 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
218 },
219 'actions': [
220 {
221 'action_name': 'repack_content_shell_pack',
222 'variables': {
223 'pak_inputs': [
224 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57225 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33226 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
227 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak',
228 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
[email protected]ee75b8992012-01-27 07:53:57229 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33230 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
231 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
232 ],
[email protected]81f30ce2012-01-18 22:10:33233 },
234 'inputs': [
235 '<(repack_path)',
236 '<@(pak_inputs)',
237 ],
[email protected]81f30ce2012-01-18 22:10:33238 'action': ['python', '<(repack_path)', '<@(_outputs)',
239 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46240 'conditions': [
241 ['OS!="android"', {
242 'outputs': [
243 '<(PRODUCT_DIR)/content_shell.pak',
244 ],
245 }, {
246 'outputs': [
247 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
248 ],
249 }],
250 ],
[email protected]81f30ce2012-01-18 22:10:33251 },
252 ],
253 },
254 {
[email protected]c1f87b22011-10-05 21:59:33255 'target_name': 'content_shell',
256 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34257 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33258 'defines!': ['CONTENT_IMPLEMENTATION'],
259 'variables': {
260 'chromium_code': 1,
261 },
262 'dependencies': [
263 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33264 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33265 ],
266 'include_dirs': [
267 '..',
268 ],
269 'sources': [
[email protected]711f428e2012-06-22 02:18:23270 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33271 'shell/shell_main.cc',
272 ],
[email protected]85ff16042012-03-06 23:46:34273 'mac_bundle_resources': [
274 'shell/mac/app.icns',
275 'shell/mac/app-Info.plist',
276 ],
277 # TODO(mark): Come up with a fancier way to do this. It should only
278 # be necessary to list app-Info.plist once, not the three times it is
279 # listed here.
280 'mac_bundle_resources!': [
281 'shell/mac/app-Info.plist',
282 ],
283 'xcode_settings': {
284 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
285 },
[email protected]c1f87b22011-10-05 21:59:33286 'msvs_settings': {
287 'VCLinkerTool': {
288 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
289 },
290 },
291 'conditions': [
292 ['OS=="win" and win_use_allocator_shim==1', {
293 'dependencies': [
294 '../base/allocator/allocator.gyp:allocator',
295 ],
296 }],
297 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29298 'sources': [
299 'shell/shell.rc',
300 ],
[email protected]c1f87b22011-10-05 21:59:33301 'configurations': {
302 'Debug_Base': {
303 'msvs_settings': {
304 'VCLinkerTool': {
305 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
306 },
307 },
308 },
309 },
[email protected]85ff16042012-03-06 23:46:34310 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12311 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
312 'dependencies': [
313 '../sandbox/sandbox.gyp:sandbox',
314 ],
[email protected]85ff16042012-03-06 23:46:34315 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58316 ['toolkit_uses_gtk == 1', {
317 'dependencies': [
318 '<(DEPTH)/build/linux/system.gyp:gtk',
319 ],
[email protected]85ff16042012-03-06 23:46:34320 }], # toolkit_uses_gtk
321 ['OS=="mac"', {
322 'product_name': '<(content_shell_product_name)',
323 'dependencies!': [
324 'content_shell_lib',
325 ],
326 'dependencies': [
327 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10328 'content_shell_helper_app',
329 ],
330 'copies': [
331 {
332 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
333 'files': [
334 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
335 ],
336 },
[email protected]85ff16042012-03-06 23:46:34337 ],
338 'postbuilds': [
339 {
340 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
341 'action': [
342 '../build/mac/copy_framework_unversioned.sh',
343 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
344 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
345 ],
346 },
347 {
348 'postbuild_name': 'Fix Framework Link',
349 'action': [
350 'install_name_tool',
351 '-change',
352 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
353 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
354 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
355 ],
356 },
357 {
358 # Modify the Info.plist as needed.
359 'postbuild_name': 'Tweak Info.plist',
360 'action': ['../build/mac/tweak_info_plist.py',
[email protected]8fcde31f62012-03-07 06:25:17361 '--svn=1'],
[email protected]85ff16042012-03-06 23:46:34362 },
363 {
[email protected]180df8f2012-03-09 22:36:10364 # This postbuid step is responsible for creating the following
365 # helpers:
366 #
367 # Content Shell Helper EH.app and Content Shell Helper NP.app are
368 # created from Content Shell Helper.app.
369 #
370 # The EH helper is marked for an executable heap. The NP helper
371 # is marked for no PIE (ASLR).
372 'postbuild_name': 'Make More Helpers',
373 'action': [
374 '../build/mac/make_more_helpers.sh',
375 'Frameworks',
376 '<(content_shell_product_name)',
377 ],
378 },
379 {
[email protected]85ff16042012-03-06 23:46:34380 # Make sure there isn't any Objective-C in the shell's
381 # executable.
382 'postbuild_name': 'Verify No Objective-C',
383 'action': [
384 '../build/mac/verify_no_objc.sh',
385 ],
386 },
387 ],
388 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33389 ],
390 },
[email protected]5629e0c2011-09-12 22:07:36391 ],
[email protected]85ff16042012-03-06 23:46:34392 'conditions': [
393 ['OS=="mac"', {
394 'targets': [
395 {
396 'target_name': 'content_shell_framework',
397 'type': 'shared_library',
398 'product_name': '<(content_shell_product_name) Framework',
399 'mac_bundle': 1,
400 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36401 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34402 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42403 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34404 ],
405 'dependencies': [
406 'content_shell_lib',
407 ],
408 'include_dirs': [
409 '..',
410 ],
411 'sources': [
412 'shell/shell_content_main.cc',
413 'shell/shell_content_main.h',
414 ],
[email protected]180df8f2012-03-09 22:36:10415 }, # target content_shell_framework
416 {
417 'target_name': 'content_shell_helper_app',
418 'type': 'executable',
419 'variables': { 'enable_wexit_time_destructors': 1, },
420 'product_name': '<(content_shell_product_name) Helper',
421 'mac_bundle': 1,
422 'dependencies': [
423 'content_shell_framework',
424 ],
425 'sources': [
426 'shell/shell_main.cc',
427 'shell/mac/helper-Info.plist',
428 ],
429 # TODO(mark): Come up with a fancier way to do this. It should only
430 # be necessary to list helper-Info.plist once, not the three times it
431 # is listed here.
432 'mac_bundle_resources!': [
433 'shell/mac/helper-Info.plist',
434 ],
435 # TODO(mark): For now, don't put any resources into this app. Its
436 # resources directory will be a symbolic link to the browser app's
437 # resources directory.
438 'mac_bundle_resources/': [
439 ['exclude', '.*'],
440 ],
441 'xcode_settings': {
442 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
443 },
444 'postbuilds': [
445 {
446 # The framework defines its load-time path
447 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
448 # (chrome). A different relative path needs to be used in
449 # content_shell_helper_app.
450 'postbuild_name': 'Fix Framework Link',
451 'action': [
452 'install_name_tool',
453 '-change',
454 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
455 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
456 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
457 ],
458 },
459 {
460 # Modify the Info.plist as needed. The script explains why this
461 # is needed. This is also done in the chrome and chrome_dll
462 # targets. In this case, --breakpad=0, --keystone=0, and --svn=0
463 # are used because Breakpad, Keystone, and Subversion keys are
464 # never placed into the helper.
465 'postbuild_name': 'Tweak Info.plist',
466 'action': ['../build/mac/tweak_info_plist.py',
467 '--breakpad=0',
468 '--keystone=0',
469 '--svn=0'],
470 },
471 {
472 # Make sure there isn't any Objective-C in the helper app's
473 # executable.
474 'postbuild_name': 'Verify No Objective-C',
475 'action': [
476 '../build/mac/verify_no_objc.sh',
477 ],
478 },
479 ],
[email protected]ec40c38f2012-06-28 16:37:49480 'conditions': [
481 ['component=="shared_library"', {
482 'xcode_settings': {
483 'LD_RUNPATH_SEARCH_PATHS': [
484 # Get back from Content Shell.app/Contents/Frameworks/
485 # Helper.app/Contents/MacOS
486 '@loader_path/../../../../../..',
487 ],
488 },
489 }],
490 ],
[email protected]180df8f2012-03-09 22:36:10491 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34492 ],
493 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06494 ['OS=="android"', {
495 'targets': [
496 {
[email protected]a08029b42012-04-25 03:18:46497 # TODO(jrg): Update this action and other jni generators to only
498 # require specifying the java directory and generate the rest.
499 'target_name': 'content_shell_jni_headers',
500 'type': 'none',
501 'variables': {
502 'java_sources': [
[email protected]dccbbb12012-06-26 21:05:56503 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
504 'shell/android/java/src/org/chromium/content_shell/ShellView.java',
[email protected]a08029b42012-04-25 03:18:46505 ],
506 'jni_headers': [
507 '<(SHARED_INTERMEDIATE_DIR)/content/shell/jni/shell_manager_jni.h',
508 '<(SHARED_INTERMEDIATE_DIR)/content/shell/jni/shell_view_jni.h',
509 ],
510 },
511 'includes': [ '../build/jni_generator.gypi' ],
512 },
513 {
[email protected]c1101582012-06-25 17:07:18514 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46515 'type': 'shared_library',
516 'dependencies': [
517 'content_shell_jni_headers',
518 'content_shell_lib',
519 'content_shell_pak',
520 # Skia is necessary to ensure the dependencies needed by
521 # WebContents are included.
522 '../skia/skia.gyp:skia',
523 '<(DEPTH)/media/media.gyp:player_android',
524 ],
525 'include_dirs': [
526 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
527 ],
528 'sources': [
529 'shell/android/shell_library_loader.cc',
530 'shell/android/shell_library_loader.h',
531 'shell/android/shell_manager.cc',
532 'shell/android/shell_manager.h',
533 'shell/android/shell_view.cc',
534 'shell/android/shell_view.h',
535 ],
[email protected]7abcaa82012-06-27 17:09:48536 'conditions': [
537 ['android_build_type==1', {
538 'ldflags': [
539 '-lgabi++', # For rtti
540 ],
541 }],
542 ],
[email protected]a08029b42012-04-25 03:18:46543 },
544 {
[email protected]cc66d282012-03-30 11:44:06545 'target_name': 'content_shell_apk',
546 'type': 'none',
547 'actions': [
548 {
[email protected]a08029b42012-04-25 03:18:46549 'action_name': 'copy_base_jar',
[email protected]e0825562012-05-10 01:50:47550 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'],
[email protected]a08029b42012-04-25 03:18:46551 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar'],
552 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
553 },
554 {
[email protected]e0825562012-05-10 01:50:47555 'action_name': 'copy_net_jar',
556 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'],
557 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar'],
558 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
559 },
560 {
561 'action_name': 'copy_media_jar',
562 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'],
563 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar'],
564 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
565 },
566 {
[email protected]a08029b42012-04-25 03:18:46567 'action_name': 'copy_content_jar',
[email protected]e0825562012-05-10 01:50:47568 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'],
[email protected]a08029b42012-04-25 03:18:46569 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar'],
570 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
571 },
572 {
[email protected]9c320642012-05-07 16:25:57573 'action_name': 'copy_and_strip_so',
[email protected]73919ea2012-04-26 00:48:41574 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]de5b7a42012-05-16 06:18:41575 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'],
[email protected]9c320642012-05-07 16:25:57576 'action': [
577 '<!(/bin/echo -n $STRIP)',
578 '--strip-unneeded', # All symbols not needed for relocation.
579 '<@(_inputs)',
580 '-o',
581 '<@(_outputs)'
582 ],
[email protected]73919ea2012-04-26 00:48:41583 },
584 {
[email protected]cc66d282012-03-30 11:44:06585 'action_name': 'content_shell_apk',
586 'inputs': [
[email protected]dccbbb12012-06-26 21:05:56587 '<(DEPTH)/content/shell/android/java/content_shell_apk.xml',
[email protected]a08029b42012-04-25 03:18:46588 '<(DEPTH)/content/shell/android/AndroidManifest.xml',
[email protected]cc66d282012-03-30 11:44:06589 '<!@(find shell/android/java -name "*.java")',
[email protected]a08029b42012-04-25 03:18:46590 '<!@(find shell/android/res -name "*")',
591 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar',
[email protected]e0825562012-05-10 01:50:47592 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar',
593 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar',
[email protected]a08029b42012-04-25 03:18:46594 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar',
[email protected]de5b7a42012-05-16 06:18:41595 '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so',
[email protected]cc66d282012-03-30 11:44:06596 ],
597 'outputs': [
598 # Awkwardly, we build a Debug APK even when gyp is in
599 # Release mode. I don't think it matters (e.g. we're
600 # probably happy to not codesign) but naming should be
601 # fixed.
602 '<(PRODUCT_DIR)/ContentShell-debug.apk',
603 ],
604 'action': [
605 'ant',
[email protected]ef7ed7a2012-05-29 23:19:13606 '-DPRODUCT_DIR=<(ant_build_out)',
[email protected]de5b7a42012-05-16 06:18:41607 '-DAPP_ABI=<(android_app_abi)',
[email protected]cc66d282012-03-30 11:44:06608 '-buildfile',
[email protected]dccbbb12012-06-26 21:05:56609 '<(DEPTH)/content/shell/android/java/content_shell_apk.xml',
[email protected]cc66d282012-03-30 11:44:06610 ]
611 }
612 ],
613 },
614 ],
615 }], # OS=="android"
616 ]
[email protected]5629e0c2011-09-12 22:07:36617}