blob: 841ab57b3fff69370ff0ccb270a35f8e0c423c2b [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',
[email protected]ee75b8992012-01-27 07:53:57214 ],
[email protected]81f30ce2012-01-18 22:10:33215 'variables': {
216 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
217 },
218 'actions': [
219 {
220 'action_name': 'repack_content_shell_pack',
221 'variables': {
222 'pak_inputs': [
223 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57224 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33225 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
[email protected]2a281332012-07-11 22:20:23226 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_standard.pak',
[email protected]ee75b8992012-01-27 07:53:57227 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33228 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
229 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
230 ],
[email protected]81f30ce2012-01-18 22:10:33231 },
232 'inputs': [
233 '<(repack_path)',
234 '<@(pak_inputs)',
235 ],
[email protected]81f30ce2012-01-18 22:10:33236 'action': ['python', '<(repack_path)', '<@(_outputs)',
237 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46238 'conditions': [
239 ['OS!="android"', {
240 'outputs': [
241 '<(PRODUCT_DIR)/content_shell.pak',
242 ],
243 }, {
244 'outputs': [
245 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
246 ],
247 }],
248 ],
[email protected]81f30ce2012-01-18 22:10:33249 },
250 ],
251 },
252 {
[email protected]c1f87b22011-10-05 21:59:33253 'target_name': 'content_shell',
254 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34255 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33256 'defines!': ['CONTENT_IMPLEMENTATION'],
257 'variables': {
258 'chromium_code': 1,
259 },
260 'dependencies': [
261 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33262 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33263 ],
264 'include_dirs': [
265 '..',
266 ],
267 'sources': [
[email protected]711f428e2012-06-22 02:18:23268 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33269 'shell/shell_main.cc',
270 ],
[email protected]85ff16042012-03-06 23:46:34271 'mac_bundle_resources': [
272 'shell/mac/app.icns',
273 'shell/mac/app-Info.plist',
274 ],
275 # TODO(mark): Come up with a fancier way to do this. It should only
276 # be necessary to list app-Info.plist once, not the three times it is
277 # listed here.
278 'mac_bundle_resources!': [
279 'shell/mac/app-Info.plist',
280 ],
281 'xcode_settings': {
282 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
283 },
[email protected]c1f87b22011-10-05 21:59:33284 'msvs_settings': {
285 'VCLinkerTool': {
286 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
287 },
288 },
289 'conditions': [
290 ['OS=="win" and win_use_allocator_shim==1', {
291 'dependencies': [
292 '../base/allocator/allocator.gyp:allocator',
293 ],
294 }],
295 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29296 'sources': [
297 'shell/shell.rc',
298 ],
[email protected]c1f87b22011-10-05 21:59:33299 'configurations': {
300 'Debug_Base': {
301 'msvs_settings': {
302 'VCLinkerTool': {
303 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
304 },
305 },
306 },
307 },
[email protected]85ff16042012-03-06 23:46:34308 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12309 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
310 'dependencies': [
311 '../sandbox/sandbox.gyp:sandbox',
312 ],
[email protected]85ff16042012-03-06 23:46:34313 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58314 ['toolkit_uses_gtk == 1', {
315 'dependencies': [
316 '<(DEPTH)/build/linux/system.gyp:gtk',
317 ],
[email protected]85ff16042012-03-06 23:46:34318 }], # toolkit_uses_gtk
319 ['OS=="mac"', {
320 'product_name': '<(content_shell_product_name)',
321 'dependencies!': [
322 'content_shell_lib',
323 ],
324 'dependencies': [
325 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10326 'content_shell_helper_app',
327 ],
328 'copies': [
329 {
330 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
331 'files': [
332 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
333 ],
334 },
[email protected]85ff16042012-03-06 23:46:34335 ],
336 'postbuilds': [
337 {
338 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
339 'action': [
340 '../build/mac/copy_framework_unversioned.sh',
341 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
342 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
343 ],
344 },
345 {
346 'postbuild_name': 'Fix Framework Link',
347 'action': [
348 'install_name_tool',
349 '-change',
350 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
351 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
352 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
353 ],
354 },
355 {
356 # Modify the Info.plist as needed.
357 'postbuild_name': 'Tweak Info.plist',
358 'action': ['../build/mac/tweak_info_plist.py',
[email protected]8fcde31f62012-03-07 06:25:17359 '--svn=1'],
[email protected]85ff16042012-03-06 23:46:34360 },
361 {
[email protected]180df8f2012-03-09 22:36:10362 # This postbuid step is responsible for creating the following
363 # helpers:
364 #
365 # Content Shell Helper EH.app and Content Shell Helper NP.app are
366 # created from Content Shell Helper.app.
367 #
368 # The EH helper is marked for an executable heap. The NP helper
369 # is marked for no PIE (ASLR).
370 'postbuild_name': 'Make More Helpers',
371 'action': [
372 '../build/mac/make_more_helpers.sh',
373 'Frameworks',
374 '<(content_shell_product_name)',
375 ],
376 },
377 {
[email protected]85ff16042012-03-06 23:46:34378 # Make sure there isn't any Objective-C in the shell's
379 # executable.
380 'postbuild_name': 'Verify No Objective-C',
381 'action': [
382 '../build/mac/verify_no_objc.sh',
383 ],
384 },
385 ],
386 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33387 ],
388 },
[email protected]5629e0c2011-09-12 22:07:36389 ],
[email protected]85ff16042012-03-06 23:46:34390 'conditions': [
391 ['OS=="mac"', {
392 'targets': [
393 {
394 'target_name': 'content_shell_framework',
395 'type': 'shared_library',
396 'product_name': '<(content_shell_product_name) Framework',
397 'mac_bundle': 1,
398 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36399 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34400 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42401 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34402 ],
403 'dependencies': [
404 'content_shell_lib',
405 ],
406 'include_dirs': [
407 '..',
408 ],
409 'sources': [
410 'shell/shell_content_main.cc',
411 'shell/shell_content_main.h',
412 ],
[email protected]180df8f2012-03-09 22:36:10413 }, # target content_shell_framework
414 {
415 'target_name': 'content_shell_helper_app',
416 'type': 'executable',
417 'variables': { 'enable_wexit_time_destructors': 1, },
418 'product_name': '<(content_shell_product_name) Helper',
419 'mac_bundle': 1,
420 'dependencies': [
421 'content_shell_framework',
422 ],
423 'sources': [
424 'shell/shell_main.cc',
425 'shell/mac/helper-Info.plist',
426 ],
427 # TODO(mark): Come up with a fancier way to do this. It should only
428 # be necessary to list helper-Info.plist once, not the three times it
429 # is listed here.
430 'mac_bundle_resources!': [
431 'shell/mac/helper-Info.plist',
432 ],
433 # TODO(mark): For now, don't put any resources into this app. Its
434 # resources directory will be a symbolic link to the browser app's
435 # resources directory.
436 'mac_bundle_resources/': [
437 ['exclude', '.*'],
438 ],
439 'xcode_settings': {
440 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
441 },
442 'postbuilds': [
443 {
444 # The framework defines its load-time path
445 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
446 # (chrome). A different relative path needs to be used in
447 # content_shell_helper_app.
448 'postbuild_name': 'Fix Framework Link',
449 'action': [
450 'install_name_tool',
451 '-change',
452 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
453 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
454 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
455 ],
456 },
457 {
458 # Modify the Info.plist as needed. The script explains why this
459 # is needed. This is also done in the chrome and chrome_dll
460 # targets. In this case, --breakpad=0, --keystone=0, and --svn=0
461 # are used because Breakpad, Keystone, and Subversion keys are
462 # never placed into the helper.
463 'postbuild_name': 'Tweak Info.plist',
464 'action': ['../build/mac/tweak_info_plist.py',
465 '--breakpad=0',
466 '--keystone=0',
467 '--svn=0'],
468 },
469 {
470 # Make sure there isn't any Objective-C in the helper app's
471 # executable.
472 'postbuild_name': 'Verify No Objective-C',
473 'action': [
474 '../build/mac/verify_no_objc.sh',
475 ],
476 },
477 ],
[email protected]ec40c38f2012-06-28 16:37:49478 'conditions': [
479 ['component=="shared_library"', {
480 'xcode_settings': {
481 'LD_RUNPATH_SEARCH_PATHS': [
482 # Get back from Content Shell.app/Contents/Frameworks/
483 # Helper.app/Contents/MacOS
484 '@loader_path/../../../../../..',
485 ],
486 },
487 }],
488 ],
[email protected]180df8f2012-03-09 22:36:10489 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34490 ],
491 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06492 ['OS=="android"', {
493 'targets': [
494 {
[email protected]a08029b42012-04-25 03:18:46495 # TODO(jrg): Update this action and other jni generators to only
496 # require specifying the java directory and generate the rest.
497 'target_name': 'content_shell_jni_headers',
498 'type': 'none',
499 'variables': {
500 'java_sources': [
[email protected]dccbbb12012-06-26 21:05:56501 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
502 'shell/android/java/src/org/chromium/content_shell/ShellView.java',
[email protected]a08029b42012-04-25 03:18:46503 ],
504 'jni_headers': [
505 '<(SHARED_INTERMEDIATE_DIR)/content/shell/jni/shell_manager_jni.h',
506 '<(SHARED_INTERMEDIATE_DIR)/content/shell/jni/shell_view_jni.h',
507 ],
508 },
509 'includes': [ '../build/jni_generator.gypi' ],
510 },
511 {
[email protected]c1101582012-06-25 17:07:18512 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46513 'type': 'shared_library',
514 'dependencies': [
515 'content_shell_jni_headers',
516 'content_shell_lib',
517 'content_shell_pak',
518 # Skia is necessary to ensure the dependencies needed by
519 # WebContents are included.
520 '../skia/skia.gyp:skia',
521 '<(DEPTH)/media/media.gyp:player_android',
522 ],
523 'include_dirs': [
524 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
525 ],
526 'sources': [
527 'shell/android/shell_library_loader.cc',
528 'shell/android/shell_library_loader.h',
529 'shell/android/shell_manager.cc',
530 'shell/android/shell_manager.h',
531 'shell/android/shell_view.cc',
532 'shell/android/shell_view.h',
533 ],
[email protected]f83a47392012-07-12 22:15:04534 'sources!': [
535 'shell/shell_main.cc',
536 'shell/shell_main.h',
537 ],
[email protected]7abcaa82012-06-27 17:09:48538 'conditions': [
539 ['android_build_type==1', {
540 'ldflags': [
541 '-lgabi++', # For rtti
542 ],
543 }],
544 ],
[email protected]a08029b42012-04-25 03:18:46545 },
546 {
[email protected]cc66d282012-03-30 11:44:06547 'target_name': 'content_shell_apk',
548 'type': 'none',
549 'actions': [
550 {
[email protected]a08029b42012-04-25 03:18:46551 'action_name': 'copy_base_jar',
[email protected]e0825562012-05-10 01:50:47552 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'],
[email protected]a08029b42012-04-25 03:18:46553 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar'],
554 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
555 },
556 {
[email protected]e0825562012-05-10 01:50:47557 'action_name': 'copy_net_jar',
558 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'],
559 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar'],
560 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
561 },
562 {
563 'action_name': 'copy_media_jar',
564 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'],
565 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar'],
566 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
567 },
568 {
[email protected]a08029b42012-04-25 03:18:46569 'action_name': 'copy_content_jar',
[email protected]e0825562012-05-10 01:50:47570 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'],
[email protected]a08029b42012-04-25 03:18:46571 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar'],
572 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
573 },
574 {
[email protected]9c320642012-05-07 16:25:57575 'action_name': 'copy_and_strip_so',
[email protected]73919ea2012-04-26 00:48:41576 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]de5b7a42012-05-16 06:18:41577 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'],
[email protected]9c320642012-05-07 16:25:57578 'action': [
579 '<!(/bin/echo -n $STRIP)',
580 '--strip-unneeded', # All symbols not needed for relocation.
581 '<@(_inputs)',
582 '-o',
[email protected]c9a433d2012-07-12 20:28:45583 '<@(_outputs)',
[email protected]9c320642012-05-07 16:25:57584 ],
[email protected]73919ea2012-04-26 00:48:41585 },
586 {
[email protected]cc66d282012-03-30 11:44:06587 'action_name': 'content_shell_apk',
588 'inputs': [
[email protected]19bbc472012-07-14 13:33:34589 'shell/android/java/content_shell_apk.xml',
590 'shell/android/java/AndroidManifest.xml',
[email protected]cc66d282012-03-30 11:44:06591 '<!@(find shell/android/java -name "*.java")',
[email protected]a08029b42012-04-25 03:18:46592 '<!@(find shell/android/res -name "*")',
593 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar',
[email protected]e0825562012-05-10 01:50:47594 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar',
595 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar',
[email protected]a08029b42012-04-25 03:18:46596 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar',
[email protected]f83a47392012-07-12 22:15:04597 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
[email protected]de5b7a42012-05-16 06:18:41598 '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so',
[email protected]cc66d282012-03-30 11:44:06599 ],
600 'outputs': [
601 # Awkwardly, we build a Debug APK even when gyp is in
602 # Release mode. I don't think it matters (e.g. we're
603 # probably happy to not codesign) but naming should be
604 # fixed.
[email protected]c9a433d2012-07-12 20:28:45605 '<(PRODUCT_DIR)/content_shell/ContentShell-debug.apk',
[email protected]cc66d282012-03-30 11:44:06606 ],
607 'action': [
[email protected]19bbc472012-07-14 13:33:34608 # Pass the build type to ant. Currently it only assumes
609 # debug mode in java. Release mode will break the current
610 # workflow.
611 # 'shell/content_shell_ant_helper.sh',
[email protected]cc66d282012-03-30 11:44:06612 'ant',
[email protected]ef7ed7a2012-05-29 23:19:13613 '-DPRODUCT_DIR=<(ant_build_out)',
[email protected]de5b7a42012-05-16 06:18:41614 '-DAPP_ABI=<(android_app_abi)',
[email protected]cc66d282012-03-30 11:44:06615 '-buildfile',
[email protected]19bbc472012-07-14 13:33:34616 'shell/android/java/content_shell_apk.xml',
617 # '<(CONFIGURATION_NAME)',
[email protected]cc66d282012-03-30 11:44:06618 ]
619 }
620 ],
621 },
[email protected]c9a433d2012-07-12 20:28:45622 {
623 'target_name': 'content_shell_test_apk',
624 'type': 'none',
625 'dependencies': [
626 'content_shell_apk',
627 ],
628 'actions': [
629 {
630 'action_name': 'content_shell_test_generate_apk',
631 'inputs': [
632 '<(DEPTH)/content/shell/android/javatests/content_shell_test_apk.xml',
633 '<(DEPTH)/content/shell/android/javatests/AndroidManifest.xml',
634 ],
635 'outputs': [
636 '<(PRODUCT_DIR)/content_shell_test/ContentShellTest-debug.apk',
637 ],
638 'action': [
639 'ant',
640 '-DPRODUCT_DIR=<(ant_build_out)',
641 '-DAPP_ABI=<(android_app_abi)',
642 '-buildfile',
643 '<(DEPTH)/content/shell/android/javatests/content_shell_test_apk.xml',
644 ]
645 }
646 ],
647 },
[email protected]cc66d282012-03-30 11:44:06648 ],
649 }], # OS=="android"
650 ]
[email protected]5629e0c2011-09-12 22:07:36651}