blob: 5a905d227a934102d1e19b1c05b89ee3a95134e5 [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]01048712012-07-09 23:26:2746 '../webkit/support/webkit_support.gyp:webkit_support',
[email protected]24f80692012-08-13 15:15:5047 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
[email protected]901312472012-10-20 04:25:0248 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
[email protected]b2324b092012-11-01 10:34:1149 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:TestRunner',
[email protected]5629e0c2011-09-12 22:07:3650 ],
51 'include_dirs': [
52 '..',
53 ],
54 'sources': [
[email protected]6cfccd12012-06-28 12:14:0555 'shell/geolocation/shell_access_token_store.cc',
56 'shell/geolocation/shell_access_token_store.h',
[email protected]e1aff172012-03-22 22:41:1757 'shell/paths_mac.h',
58 'shell/paths_mac.mm',
[email protected]9fbd3f862011-09-20 23:31:3459 'shell/shell.cc',
60 'shell/shell.h',
[email protected]a08029b42012-04-25 03:18:4661 'shell/shell_android.cc',
[email protected]fa4a45832012-04-12 21:32:4862 'shell/shell_aura.cc',
[email protected]9fbd3f862011-09-20 23:31:3463 'shell/shell_gtk.cc',
64 'shell/shell_mac.mm',
65 'shell/shell_win.cc',
[email protected]c4e78d72012-03-24 22:55:4166 'shell/shell_application_mac.h',
67 'shell/shell_application_mac.mm',
[email protected]b0f146f2011-09-15 22:14:2568 'shell/shell_browser_context.cc',
69 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3670 'shell/shell_browser_main.cc',
71 'shell/shell_browser_main.h',
[email protected]147f8092012-03-21 11:47:4572 'shell/shell_browser_main_parts.cc',
73 'shell/shell_browser_main_parts.h',
74 'shell/shell_browser_main_parts_mac.mm',
[email protected]5629e0c2011-09-12 22:07:3675 'shell/shell_content_browser_client.cc',
76 'shell/shell_content_browser_client.h',
77 'shell/shell_content_client.cc',
78 'shell/shell_content_client.h',
[email protected]5629e0c2011-09-12 22:07:3679 'shell/shell_content_renderer_client.cc',
80 'shell/shell_content_renderer_client.h',
[email protected]ee75b8992012-01-27 07:53:5781 'shell/shell_devtools_delegate.cc',
82 'shell/shell_devtools_delegate.h',
[email protected]98d6f152011-09-29 19:35:5183 'shell/shell_download_manager_delegate.cc',
84 'shell/shell_download_manager_delegate.h',
[email protected]f2210022012-03-29 00:36:0885 'shell/shell_javascript_dialog_creator.cc',
86 'shell/shell_javascript_dialog_creator.h',
[email protected]fc4f4dd42012-07-30 20:52:4887 'shell/shell_javascript_dialog_gtk.cc',
[email protected]f2210022012-03-29 00:36:0888 'shell/shell_javascript_dialog_mac.mm',
[email protected]7fc83822012-03-30 19:53:2989 'shell/shell_javascript_dialog_win.cc',
[email protected]f2210022012-03-29 00:36:0890 'shell/shell_javascript_dialog.h',
[email protected]e6fbecf22012-08-01 10:11:0391 'shell/shell_login_dialog_gtk.cc',
[email protected]e3503ac2012-04-05 15:01:3692 'shell/shell_login_dialog_mac.mm',
93 'shell/shell_login_dialog.cc',
94 'shell/shell_login_dialog.h',
[email protected]c1f87b22011-10-05 21:59:3395 'shell/shell_main_delegate.cc',
96 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3397 'shell/shell_messages.cc',
98 'shell/shell_messages.h',
[email protected]33bc2832012-03-29 08:18:1799 'shell/shell_network_delegate.cc',
100 'shell/shell_network_delegate.h',
[email protected]74830f02012-01-30 22:27:04101 'shell/shell_render_process_observer.cc',
102 'shell/shell_render_process_observer.h',
[email protected]c5f1e332011-09-27 01:08:03103 'shell/shell_resource_context.cc',
104 'shell/shell_resource_context.h',
[email protected]e3503ac2012-04-05 15:01:36105 'shell/shell_resource_dispatcher_host_delegate.cc',
106 'shell/shell_resource_dispatcher_host_delegate.h',
[email protected]950dcc72012-10-29 21:30:57107 'shell/shell_stacking_client_ash.cc',
108 'shell/shell_stacking_client_ash.h',
[email protected]efb5f572012-01-29 10:57:33109 'shell/shell_switches.cc',
110 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:03111 'shell/shell_url_request_context_getter.cc',
112 'shell/shell_url_request_context_getter.h',
[email protected]324825d2012-11-30 12:37:15113 'shell/shell_webpreferences.cc',
114 'shell/shell_webpreferences.h',
[email protected]4c2aa392012-09-03 01:29:42115 'shell/shell_web_contents_view_delegate_creator.h',
116 'shell/shell_web_contents_view_delegate_gtk.cc',
[email protected]dcbe5fe32012-09-10 10:18:32117 'shell/shell_web_contents_view_delegate_mac.mm',
[email protected]4c9bf3482012-09-12 14:35:35118 'shell/shell_web_contents_view_delegate_win.cc',
[email protected]4c2aa392012-09-03 01:29:42119 'shell/shell_web_contents_view_delegate.h',
[email protected]8dafad32012-12-10 14:11:45120 'shell/webkit_test_controller.cc',
121 'shell/webkit_test_controller.h',
[email protected]87715122012-10-11 15:53:06122 'shell/webkit_test_platform_support.h',
123 'shell/webkit_test_platform_support_android.cc',
124 'shell/webkit_test_platform_support_linux.cc',
125 'shell/webkit_test_platform_support_mac.mm',
126 'shell/webkit_test_platform_support_win.cc',
[email protected]9b4c6cd2012-08-20 10:47:45127 'shell/webkit_test_runner.cc',
128 'shell/webkit_test_runner.h',
129 'shell/webkit_test_runner_bindings.cc',
130 'shell/webkit_test_runner_bindings.h',
[email protected]5629e0c2011-09-12 22:07:36131 ],
132 'msvs_settings': {
133 'VCLinkerTool': {
134 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
135 },
136 },
137 'conditions': [
138 ['OS=="win" and win_use_allocator_shim==1', {
139 'dependencies': [
140 '../base/allocator/allocator.gyp:allocator',
141 ],
142 }],
[email protected]9fbd3f862011-09-20 23:31:34143 ['OS=="win"', {
144 'resource_include_dirs': [
145 '<(SHARED_INTERMEDIATE_DIR)/webkit',
146 ],
[email protected]9fbd3f862011-09-20 23:31:34147 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34148 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
149 '<(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 ],
170 'include_dirs': [
171 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
172 ],
[email protected]689266d2012-08-07 12:52:20173 }, { # else: OS!="android"
174 'dependencies': [
175 # This dependency is for running DRT against the content shell, and
176 # this combination is not yet supported on Android.
177 '../webkit/support/webkit_support.gyp:webkit_support',
178 ],
[email protected]82e9e2b12012-07-19 00:32:01179 }], # OS=="android"
[email protected]c767d572012-07-27 10:55:58180 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
181 'dependencies': [
182 # This is needed by content/app/content_main_runner.cc
183 '../base/allocator/allocator.gyp:allocator',
184 ],
185 }],
[email protected]fa4a45832012-04-12 21:32:48186 ['use_aura==1', {
[email protected]c767d572012-07-27 10:55:58187 'dependencies': [
188 '../ui/aura/aura.gyp:aura',
189 '../ui/base/strings/ui_strings.gyp:ui_strings',
[email protected]9e7fca802012-09-01 18:53:05190 '../ui/views/controls/webview/webview.gyp:webview',
[email protected]c767d572012-07-27 10:55:58191 '../ui/views/views.gyp:views',
[email protected]0aa76932012-10-14 19:11:10192 '../ui/views/views.gyp:views_test_support',
[email protected]c767d572012-07-27 10:55:58193 '../ui/ui.gyp:ui_resources',
194 ],
[email protected]fa4a45832012-04-12 21:32:48195 'sources/': [
196 ['exclude', 'shell/shell_gtk.cc'],
197 ['exclude', 'shell/shell_win.cc'],
198 ],
[email protected]96b80b472012-07-03 19:41:56199 }], # use_aura==1
[email protected]c767d572012-07-27 10:55:58200 ['chromeos==1', {
201 'dependencies': [
[email protected]48dea152012-11-02 20:26:46202 '../ash/ash.gyp:ash',
[email protected]c767d572012-07-27 10:55:58203 '../chromeos/chromeos.gyp:chromeos',
204 ],
205 }], # chromeos==1
[email protected]5629e0c2011-09-12 22:07:36206 ],
207 },
[email protected]c1f87b22011-10-05 21:59:33208 {
[email protected]ee75b8992012-01-27 07:53:57209 'target_name': 'content_shell_resources',
210 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46211 'dependencies': [
212 'generate_content_shell_resources',
213 ],
214 'variables': {
215 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
216 },
217 'includes': [ '../build/grit_target.gypi' ],
218 'copies': [
219 {
220 'destination': '<(PRODUCT_DIR)',
221 'files': [
222 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
223 ],
224 },
225 ],
[email protected]4cb792f42012-03-24 03:12:42226 },
227 {
[email protected]b581eb402012-03-09 01:31:46228 'target_name': 'generate_content_shell_resources',
229 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57230 'variables': {
231 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
232 },
233 'actions': [
234 {
235 'action_name': 'content_shell_resources',
236 'variables': {
237 'grit_grd_file': 'shell/shell_resources.grd',
238 },
239 'includes': [ '../build/grit_action.gypi' ],
240 },
241 ],
[email protected]ee75b8992012-01-27 07:53:57242 },
243 {
[email protected]81f30ce2012-01-18 22:10:33244 # We build a minimal set of resources so WebKit in content_shell has
245 # access to necessary resources.
246 'target_name': 'content_shell_pak',
247 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57248 'dependencies': [
249 'browser/debugger/devtools_resources.gyp:devtools_resources',
250 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45251 '<(DEPTH)/ui/ui.gyp:ui_resources',
[email protected]ee75b8992012-01-27 07:53:57252 ],
[email protected]81f30ce2012-01-18 22:10:33253 'variables': {
254 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
255 },
256 'actions': [
257 {
258 'action_name': 'repack_content_shell_pack',
259 'variables': {
260 'pak_inputs': [
261 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57262 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33263 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
[email protected]c767d572012-07-27 10:55:58264 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
[email protected]a52c7312012-07-24 22:45:57265 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
[email protected]c767d572012-07-27 10:55:58266 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
[email protected]ee75b8992012-01-27 07:53:57267 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33268 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
[email protected]30c8f542012-09-01 01:02:29269 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
[email protected]af551a62012-07-31 16:44:03270 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
[email protected]81f30ce2012-01-18 22:10:33271 ],
[email protected]81f30ce2012-01-18 22:10:33272 },
273 'inputs': [
274 '<(repack_path)',
275 '<@(pak_inputs)',
276 ],
[email protected]81f30ce2012-01-18 22:10:33277 'action': ['python', '<(repack_path)', '<@(_outputs)',
278 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46279 'conditions': [
280 ['OS!="android"', {
281 'outputs': [
282 '<(PRODUCT_DIR)/content_shell.pak',
283 ],
284 }, {
285 'outputs': [
286 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
287 ],
288 }],
289 ],
[email protected]81f30ce2012-01-18 22:10:33290 },
291 ],
292 },
293 {
[email protected]c1f87b22011-10-05 21:59:33294 'target_name': 'content_shell',
295 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34296 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33297 'defines!': ['CONTENT_IMPLEMENTATION'],
298 'variables': {
299 'chromium_code': 1,
300 },
301 'dependencies': [
302 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33303 'content_shell_pak',
[email protected]bb5d2d92012-10-15 07:45:42304 '../third_party/mesa/mesa.gyp:osmesa',
[email protected]c1f87b22011-10-05 21:59:33305 ],
306 'include_dirs': [
307 '..',
308 ],
309 'sources': [
[email protected]711f428e2012-06-22 02:18:23310 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33311 'shell/shell_main.cc',
312 ],
[email protected]85ff16042012-03-06 23:46:34313 'mac_bundle_resources': [
314 'shell/mac/app.icns',
315 'shell/mac/app-Info.plist',
316 ],
317 # TODO(mark): Come up with a fancier way to do this. It should only
318 # be necessary to list app-Info.plist once, not the three times it is
319 # listed here.
320 'mac_bundle_resources!': [
321 'shell/mac/app-Info.plist',
322 ],
323 'xcode_settings': {
324 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
325 },
[email protected]c1f87b22011-10-05 21:59:33326 'msvs_settings': {
327 'VCLinkerTool': {
328 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
329 },
330 },
331 'conditions': [
332 ['OS=="win" and win_use_allocator_shim==1', {
333 'dependencies': [
334 '../base/allocator/allocator.gyp:allocator',
335 ],
336 }],
337 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29338 'sources': [
339 'shell/shell.rc',
340 ],
[email protected]c1f87b22011-10-05 21:59:33341 'configurations': {
342 'Debug_Base': {
343 'msvs_settings': {
344 'VCLinkerTool': {
345 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
346 },
347 },
348 },
349 },
[email protected]85ff16042012-03-06 23:46:34350 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12351 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
352 'dependencies': [
353 '../sandbox/sandbox.gyp:sandbox',
354 ],
[email protected]85ff16042012-03-06 23:46:34355 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58356 ['toolkit_uses_gtk == 1', {
357 'dependencies': [
358 '<(DEPTH)/build/linux/system.gyp:gtk',
359 ],
[email protected]85ff16042012-03-06 23:46:34360 }], # toolkit_uses_gtk
361 ['OS=="mac"', {
362 'product_name': '<(content_shell_product_name)',
363 'dependencies!': [
364 'content_shell_lib',
365 ],
366 'dependencies': [
367 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10368 'content_shell_helper_app',
369 ],
370 'copies': [
371 {
372 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
373 'files': [
374 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
375 ],
376 },
[email protected]85ff16042012-03-06 23:46:34377 ],
378 'postbuilds': [
379 {
380 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
381 'action': [
382 '../build/mac/copy_framework_unversioned.sh',
383 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
384 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
385 ],
386 },
387 {
388 'postbuild_name': 'Fix Framework Link',
389 'action': [
390 'install_name_tool',
391 '-change',
392 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
393 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
394 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
395 ],
396 },
397 {
398 # Modify the Info.plist as needed.
399 'postbuild_name': 'Tweak Info.plist',
400 'action': ['../build/mac/tweak_info_plist.py',
[email protected]6d302912012-11-05 21:57:28401 '--scm=1',
402 '--version=<(content_shell_version)'],
[email protected]85ff16042012-03-06 23:46:34403 },
404 {
[email protected]180df8f2012-03-09 22:36:10405 # This postbuid step is responsible for creating the following
406 # helpers:
407 #
408 # Content Shell Helper EH.app and Content Shell Helper NP.app are
409 # created from Content Shell Helper.app.
410 #
411 # The EH helper is marked for an executable heap. The NP helper
412 # is marked for no PIE (ASLR).
413 'postbuild_name': 'Make More Helpers',
414 'action': [
415 '../build/mac/make_more_helpers.sh',
416 'Frameworks',
417 '<(content_shell_product_name)',
418 ],
419 },
420 {
[email protected]85ff16042012-03-06 23:46:34421 # Make sure there isn't any Objective-C in the shell's
422 # executable.
423 'postbuild_name': 'Verify No Objective-C',
424 'action': [
425 '../build/mac/verify_no_objc.sh',
426 ],
427 },
428 ],
429 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33430 ],
431 },
[email protected]fe2420d2012-08-21 07:28:33432 {
433 'target_name': 'content_shell_builder',
434 'type': 'none',
435 'dependencies': [
436 'content_shell',
[email protected]fe2420d2012-08-21 07:28:33437 ],
438 },
[email protected]5629e0c2011-09-12 22:07:36439 ],
[email protected]85ff16042012-03-06 23:46:34440 'conditions': [
441 ['OS=="mac"', {
442 'targets': [
443 {
444 'target_name': 'content_shell_framework',
445 'type': 'shared_library',
446 'product_name': '<(content_shell_product_name) Framework',
447 'mac_bundle': 1,
448 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36449 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34450 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42451 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34452 ],
453 'dependencies': [
454 'content_shell_lib',
455 ],
456 'include_dirs': [
457 '..',
458 ],
459 'sources': [
460 'shell/shell_content_main.cc',
461 'shell/shell_content_main.h',
462 ],
[email protected]5d96bbe2012-07-25 17:13:23463 'copies': [
464 {
465 # Copy FFmpeg binaries for audio/video support.
466 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
467 'files': [
468 '<(PRODUCT_DIR)/ffmpegsumo.so',
469 ],
470 },
471 ],
[email protected]180df8f2012-03-09 22:36:10472 }, # target content_shell_framework
473 {
474 'target_name': 'content_shell_helper_app',
475 'type': 'executable',
476 'variables': { 'enable_wexit_time_destructors': 1, },
477 'product_name': '<(content_shell_product_name) Helper',
478 'mac_bundle': 1,
479 'dependencies': [
480 'content_shell_framework',
481 ],
482 'sources': [
483 'shell/shell_main.cc',
484 'shell/mac/helper-Info.plist',
485 ],
486 # TODO(mark): Come up with a fancier way to do this. It should only
487 # be necessary to list helper-Info.plist once, not the three times it
488 # is listed here.
489 'mac_bundle_resources!': [
490 'shell/mac/helper-Info.plist',
491 ],
492 # TODO(mark): For now, don't put any resources into this app. Its
493 # resources directory will be a symbolic link to the browser app's
494 # resources directory.
495 'mac_bundle_resources/': [
496 ['exclude', '.*'],
497 ],
498 'xcode_settings': {
499 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
500 },
501 'postbuilds': [
502 {
503 # The framework defines its load-time path
504 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
505 # (chrome). A different relative path needs to be used in
506 # content_shell_helper_app.
507 'postbuild_name': 'Fix Framework Link',
508 'action': [
509 'install_name_tool',
510 '-change',
511 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
512 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
513 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
514 ],
515 },
516 {
517 # Modify the Info.plist as needed. The script explains why this
518 # is needed. This is also done in the chrome and chrome_dll
[email protected]bbf52442012-08-23 22:53:18519 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
520 # are used because Breakpad, Keystone, and SCM keys are
[email protected]180df8f2012-03-09 22:36:10521 # never placed into the helper.
522 'postbuild_name': 'Tweak Info.plist',
523 'action': ['../build/mac/tweak_info_plist.py',
524 '--breakpad=0',
525 '--keystone=0',
[email protected]6d302912012-11-05 21:57:28526 '--scm=0',
527 '--version=<(content_shell_version)'],
[email protected]180df8f2012-03-09 22:36:10528 },
529 {
530 # Make sure there isn't any Objective-C in the helper app's
531 # executable.
532 'postbuild_name': 'Verify No Objective-C',
533 'action': [
534 '../build/mac/verify_no_objc.sh',
535 ],
536 },
537 ],
[email protected]ec40c38f2012-06-28 16:37:49538 'conditions': [
539 ['component=="shared_library"', {
540 'xcode_settings': {
541 'LD_RUNPATH_SEARCH_PATHS': [
542 # Get back from Content Shell.app/Contents/Frameworks/
543 # Helper.app/Contents/MacOS
544 '@loader_path/../../../../../..',
545 ],
546 },
547 }],
548 ],
[email protected]180df8f2012-03-09 22:36:10549 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34550 ],
551 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06552 ['OS=="android"', {
553 'targets': [
554 {
[email protected]a08029b42012-04-25 03:18:46555 # TODO(jrg): Update this action and other jni generators to only
556 # require specifying the java directory and generate the rest.
557 'target_name': 'content_shell_jni_headers',
558 'type': 'none',
[email protected]e46f66152012-07-19 20:02:55559 'sources': [
560 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
561 'shell/android/java/src/org/chromium/content_shell/Shell.java',
562 ],
[email protected]a08029b42012-04-25 03:18:46563 'variables': {
[email protected]e46f66152012-07-19 20:02:55564 'jni_gen_dir': 'content/shell',
[email protected]a08029b42012-04-25 03:18:46565 },
566 'includes': [ '../build/jni_generator.gypi' ],
567 },
568 {
[email protected]c1101582012-06-25 17:07:18569 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46570 'type': 'shared_library',
571 'dependencies': [
572 'content_shell_jni_headers',
573 'content_shell_lib',
574 'content_shell_pak',
575 # Skia is necessary to ensure the dependencies needed by
576 # WebContents are included.
577 '../skia/skia.gyp:skia',
578 '<(DEPTH)/media/media.gyp:player_android',
579 ],
580 'include_dirs': [
581 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
582 ],
583 'sources': [
584 'shell/android/shell_library_loader.cc',
585 'shell/android/shell_library_loader.h',
586 'shell/android/shell_manager.cc',
587 'shell/android/shell_manager.h',
[email protected]a08029b42012-04-25 03:18:46588 ],
[email protected]f83a47392012-07-12 22:15:04589 'sources!': [
590 'shell/shell_main.cc',
591 'shell/shell_main.h',
592 ],
[email protected]7abcaa82012-06-27 17:09:48593 'conditions': [
594 ['android_build_type==1', {
595 'ldflags': [
596 '-lgabi++', # For rtti
597 ],
598 }],
599 ],
[email protected]a08029b42012-04-25 03:18:46600 },
601 {
[email protected]319d6a82012-09-20 22:52:28602 # content_shell_apk creates a .jar as a side effect. Any java targets
603 # that need that .jar in their classpath should depend on this target,
[email protected]b74cf84e2012-11-16 07:31:49604 # content_shell_java. Dependents of content_shell_apk receive its jar
605 # path in the variable 'apk_output_jar_path'.
[email protected]319d6a82012-09-20 22:52:28606 'target_name': 'content_shell_java',
607 'type': 'none',
[email protected]319d6a82012-09-20 22:52:28608 'dependencies': [
[email protected]319d6a82012-09-20 22:52:28609 'content_shell_apk',
[email protected]319d6a82012-09-20 22:52:28610 ],
[email protected]04fe3782012-10-09 02:20:29611 # This all_dependent_settings is used for java targets only. This will
612 # add the content_shell jar to the classpath of dependent java
613 # targets.
614 'all_dependent_settings': {
[email protected]319d6a82012-09-20 22:52:28615 'variables': {
[email protected]b74cf84e2012-11-16 07:31:49616 'input_jars_paths': ['>(apk_output_jar_path)'],
[email protected]319d6a82012-09-20 22:52:28617 },
618 },
619 # Add an action with the appropriate output. This allows the generated
620 # buildfiles to determine which target the output corresponds to.
621 'actions': [
622 {
623 'action_name': 'fake_generate_jar',
624 'inputs': [],
[email protected]b74cf84e2012-11-16 07:31:49625 'outputs': ['>(apk_output_jar_path)'],
[email protected]319d6a82012-09-20 22:52:28626 'action': [],
627 },
628 ],
629 },
[email protected]75c86a22012-09-26 03:50:37630 {
631 'target_name': 'content_shell_apk',
632 'type': 'none',
633 'dependencies': [
634 'content_java',
635 '../base/base.gyp:base_java',
636 '../media/media.gyp:media_java',
637 '../net/net.gyp:net_java',
638 '../ui/ui.gyp:ui_java',
639 ],
640 'variables': {
641 'package_name': 'content_shell',
642 'apk_name': 'ContentShell',
[email protected]cbd76eb2012-10-11 23:23:49643 'manifest_package_name': 'org.chromium.content_shell',
[email protected]75c86a22012-09-26 03:50:37644 'java_in_dir': 'shell/android/java',
645 # TODO(cjhopman): The resource directory of all apks should be in
646 # <java_in_dir>/res.
647 'resource_dir': '../res',
[email protected]cbd76eb2012-10-11 23:23:49648 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]75c86a22012-09-26 03:50:37649 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
650 },
[email protected]75c86a22012-09-26 03:50:37651 'includes': [ '../build/java_apk.gypi' ],
652 },
[email protected]cc66d282012-03-30 11:44:06653 ],
654 }], # OS=="android"
655 ]
[email protected]5629e0c2011-09-12 22:07:36656}