blob: f48b06880a28dd21593b026f048644ca54a4e910 [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]24f80692012-08-13 15:15:5035 '../net/net.gyp:net_resources',
[email protected]5629e0c2011-09-12 22:07:3636 '../skia/skia.gyp:skia',
37 '../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]24f80692012-08-13 15:15:5040 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
[email protected]5629e0c2011-09-12 22:07:3641 ],
42 'include_dirs': [
43 '..',
44 ],
45 'sources': [
[email protected]6cfccd12012-06-28 12:14:0546 'shell/geolocation/shell_access_token_store.cc',
47 'shell/geolocation/shell_access_token_store.h',
[email protected]e1aff172012-03-22 22:41:1748 'shell/paths_mac.h',
49 'shell/paths_mac.mm',
[email protected]9fbd3f862011-09-20 23:31:3450 'shell/shell.cc',
51 'shell/shell.h',
[email protected]a08029b42012-04-25 03:18:4652 'shell/shell_android.cc',
[email protected]fa4a45832012-04-12 21:32:4853 'shell/shell_aura.cc',
[email protected]9fbd3f862011-09-20 23:31:3454 'shell/shell_gtk.cc',
55 'shell/shell_mac.mm',
56 'shell/shell_win.cc',
[email protected]c4e78d72012-03-24 22:55:4157 'shell/shell_application_mac.h',
58 'shell/shell_application_mac.mm',
[email protected]b0f146f2011-09-15 22:14:2559 'shell/shell_browser_context.cc',
60 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3661 'shell/shell_browser_main.cc',
62 'shell/shell_browser_main.h',
[email protected]147f8092012-03-21 11:47:4563 'shell/shell_browser_main_parts.cc',
64 'shell/shell_browser_main_parts.h',
65 'shell/shell_browser_main_parts_mac.mm',
[email protected]5629e0c2011-09-12 22:07:3666 'shell/shell_content_browser_client.cc',
67 'shell/shell_content_browser_client.h',
68 'shell/shell_content_client.cc',
69 'shell/shell_content_client.h',
[email protected]5629e0c2011-09-12 22:07:3670 'shell/shell_content_renderer_client.cc',
71 'shell/shell_content_renderer_client.h',
[email protected]ee75b8992012-01-27 07:53:5772 'shell/shell_devtools_delegate.cc',
[email protected]689266d2012-08-07 12:52:2073 'shell/shell_devtools_delegate_android.cc',
[email protected]ee75b8992012-01-27 07:53:5774 'shell/shell_devtools_delegate.h',
[email protected]98d6f152011-09-29 19:35:5175 'shell/shell_download_manager_delegate.cc',
76 'shell/shell_download_manager_delegate.h',
[email protected]f2210022012-03-29 00:36:0877 'shell/shell_javascript_dialog_creator.cc',
78 'shell/shell_javascript_dialog_creator.h',
[email protected]fc4f4dd42012-07-30 20:52:4879 'shell/shell_javascript_dialog_gtk.cc',
[email protected]f2210022012-03-29 00:36:0880 'shell/shell_javascript_dialog_mac.mm',
[email protected]7fc83822012-03-30 19:53:2981 'shell/shell_javascript_dialog_win.cc',
[email protected]f2210022012-03-29 00:36:0882 'shell/shell_javascript_dialog.h',
[email protected]e6fbecf22012-08-01 10:11:0383 'shell/shell_login_dialog_gtk.cc',
[email protected]e3503ac2012-04-05 15:01:3684 'shell/shell_login_dialog_mac.mm',
85 'shell/shell_login_dialog.cc',
86 'shell/shell_login_dialog.h',
[email protected]c1f87b22011-10-05 21:59:3387 'shell/shell_main_delegate.cc',
88 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3389 'shell/shell_messages.cc',
90 'shell/shell_messages.h',
[email protected]33bc2832012-03-29 08:18:1791 'shell/shell_network_delegate.cc',
92 'shell/shell_network_delegate.h',
[email protected]74830f02012-01-30 22:27:0493 'shell/shell_render_process_observer.cc',
94 'shell/shell_render_process_observer.h',
[email protected]c5f1e332011-09-27 01:08:0395 'shell/shell_resource_context.cc',
96 'shell/shell_resource_context.h',
[email protected]e3503ac2012-04-05 15:01:3697 'shell/shell_resource_dispatcher_host_delegate.cc',
98 'shell/shell_resource_dispatcher_host_delegate.h',
[email protected]efb5f572012-01-29 10:57:3399 'shell/shell_switches.cc',
100 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:03101 'shell/shell_url_request_context_getter.cc',
102 'shell/shell_url_request_context_getter.h',
[email protected]4c2aa392012-09-03 01:29:42103 'shell/shell_web_contents_view_delegate_creator.h',
104 'shell/shell_web_contents_view_delegate_gtk.cc',
[email protected]dcbe5fe32012-09-10 10:18:32105 'shell/shell_web_contents_view_delegate_mac.mm',
[email protected]4c2aa392012-09-03 01:29:42106 'shell/shell_web_contents_view_delegate.h',
[email protected]9b4c6cd2012-08-20 10:47:45107 'shell/webkit_test_runner.cc',
108 'shell/webkit_test_runner.h',
109 'shell/webkit_test_runner_bindings.cc',
110 'shell/webkit_test_runner_bindings.h',
111 'shell/webkit_test_runner_host.cc',
112 'shell/webkit_test_runner_host.h',
[email protected]5629e0c2011-09-12 22:07:36113 ],
114 'msvs_settings': {
115 'VCLinkerTool': {
116 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
117 },
118 },
119 'conditions': [
120 ['OS=="win" and win_use_allocator_shim==1', {
121 'dependencies': [
122 '../base/allocator/allocator.gyp:allocator',
123 ],
124 }],
[email protected]9fbd3f862011-09-20 23:31:34125 ['OS=="win"', {
126 'resource_include_dirs': [
127 '<(SHARED_INTERMEDIATE_DIR)/webkit',
128 ],
[email protected]9fbd3f862011-09-20 23:31:34129 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34130 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
131 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
132 ],
133 'configurations': {
134 'Debug_Base': {
135 'msvs_settings': {
136 'VCLinkerTool': {
137 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
138 },
139 },
140 },
141 },
[email protected]85ff16042012-03-06 23:46:34142 }], # OS=="win"
[email protected]689266d2012-08-07 12:52:20143 ['OS=="android"', {
[email protected]82e9e2b12012-07-19 00:32:01144 'dependencies': [
145 'content_shell_jni_headers',
146 ],
147 'include_dirs': [
148 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
149 ],
[email protected]689266d2012-08-07 12:52:20150 'sources!': [
151 'shell/shell_devtools_delegate.cc',
152 ],
153 }, { # else: OS!="android"
154 'dependencies': [
155 # This dependency is for running DRT against the content shell, and
156 # this combination is not yet supported on Android.
157 '../webkit/support/webkit_support.gyp:webkit_support',
158 ],
[email protected]82e9e2b12012-07-19 00:32:01159 }], # OS=="android"
[email protected]c767d572012-07-27 10:55:58160 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
161 'dependencies': [
162 # This is needed by content/app/content_main_runner.cc
163 '../base/allocator/allocator.gyp:allocator',
164 ],
165 }],
[email protected]fa4a45832012-04-12 21:32:48166 ['use_aura==1', {
[email protected]c767d572012-07-27 10:55:58167 'dependencies': [
168 '../ui/aura/aura.gyp:aura',
169 '../ui/base/strings/ui_strings.gyp:ui_strings',
[email protected]9e7fca802012-09-01 18:53:05170 '../ui/views/controls/webview/webview.gyp:webview',
[email protected]c767d572012-07-27 10:55:58171 '../ui/views/views.gyp:views',
172 '../ui/ui.gyp:ui_resources',
173 ],
[email protected]fa4a45832012-04-12 21:32:48174 'sources/': [
175 ['exclude', 'shell/shell_gtk.cc'],
176 ['exclude', 'shell/shell_win.cc'],
177 ],
[email protected]96b80b472012-07-03 19:41:56178 }], # use_aura==1
[email protected]c767d572012-07-27 10:55:58179 ['chromeos==1', {
180 'dependencies': [
181 '../chromeos/chromeos.gyp:chromeos',
182 ],
183 }], # chromeos==1
[email protected]96b80b472012-07-03 19:41:56184 ['inside_chromium_build==0 or component!="shared_library"', {
185 'dependencies': [
186 '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
187 '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf',
188 ],
189 'include_dirs': [
190 # Required for WebTestingSupport.cpp to find our custom config.h.
191 'shell/',
192 '<(webkit_src_dir)/Source/WebKit/chromium/public',
193 # WARNING: Do not view this particular case as a precedent for
194 # including WebCore headers in the content shell.
195 '<(webkit_src_dir)/Source/WebCore/testing/v8', # for WebCoreTestSupport.h needed to link in window.internals code.
196 ],
197 'sources': [
198 'shell/config.h',
199 '<(webkit_src_dir)/Source/WebKit/chromium/src/WebTestingSupport.cpp',
200 '<(webkit_src_dir)/Source/WebKit/chromium/public/WebTestingSupport.h',
201 ],
[email protected]fa4a45832012-04-12 21:32:48202 }],
[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': [
246 'browser/debugger/devtools_resources.gyp:devtools_resources',
247 '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]c1f87b22011-10-05 21:59:33301 ],
302 'include_dirs': [
303 '..',
304 ],
305 'sources': [
[email protected]711f428e2012-06-22 02:18:23306 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33307 'shell/shell_main.cc',
308 ],
[email protected]85ff16042012-03-06 23:46:34309 'mac_bundle_resources': [
310 'shell/mac/app.icns',
311 'shell/mac/app-Info.plist',
312 ],
313 # TODO(mark): Come up with a fancier way to do this. It should only
314 # be necessary to list app-Info.plist once, not the three times it is
315 # listed here.
316 'mac_bundle_resources!': [
317 'shell/mac/app-Info.plist',
318 ],
319 'xcode_settings': {
320 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
321 },
[email protected]c1f87b22011-10-05 21:59:33322 'msvs_settings': {
323 'VCLinkerTool': {
324 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
325 },
326 },
327 'conditions': [
328 ['OS=="win" and win_use_allocator_shim==1', {
329 'dependencies': [
330 '../base/allocator/allocator.gyp:allocator',
331 ],
332 }],
333 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29334 'sources': [
335 'shell/shell.rc',
336 ],
[email protected]c1f87b22011-10-05 21:59:33337 'configurations': {
338 'Debug_Base': {
339 'msvs_settings': {
340 'VCLinkerTool': {
341 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
342 },
343 },
344 },
345 },
[email protected]85ff16042012-03-06 23:46:34346 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12347 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
348 'dependencies': [
349 '../sandbox/sandbox.gyp:sandbox',
350 ],
[email protected]85ff16042012-03-06 23:46:34351 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58352 ['toolkit_uses_gtk == 1', {
353 'dependencies': [
354 '<(DEPTH)/build/linux/system.gyp:gtk',
355 ],
[email protected]85ff16042012-03-06 23:46:34356 }], # toolkit_uses_gtk
357 ['OS=="mac"', {
358 'product_name': '<(content_shell_product_name)',
359 'dependencies!': [
360 'content_shell_lib',
361 ],
362 'dependencies': [
363 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10364 'content_shell_helper_app',
365 ],
366 'copies': [
367 {
368 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
369 'files': [
370 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
371 ],
372 },
[email protected]85ff16042012-03-06 23:46:34373 ],
374 'postbuilds': [
375 {
376 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
377 'action': [
378 '../build/mac/copy_framework_unversioned.sh',
379 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
380 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
381 ],
382 },
383 {
384 'postbuild_name': 'Fix Framework Link',
385 'action': [
386 'install_name_tool',
387 '-change',
388 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
389 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
390 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
391 ],
392 },
393 {
394 # Modify the Info.plist as needed.
395 'postbuild_name': 'Tweak Info.plist',
396 'action': ['../build/mac/tweak_info_plist.py',
[email protected]bbf52442012-08-23 22:53:18397 '--scm=1'],
[email protected]85ff16042012-03-06 23:46:34398 },
399 {
[email protected]180df8f2012-03-09 22:36:10400 # This postbuid step is responsible for creating the following
401 # helpers:
402 #
403 # Content Shell Helper EH.app and Content Shell Helper NP.app are
404 # created from Content Shell Helper.app.
405 #
406 # The EH helper is marked for an executable heap. The NP helper
407 # is marked for no PIE (ASLR).
408 'postbuild_name': 'Make More Helpers',
409 'action': [
410 '../build/mac/make_more_helpers.sh',
411 'Frameworks',
412 '<(content_shell_product_name)',
413 ],
414 },
415 {
[email protected]85ff16042012-03-06 23:46:34416 # Make sure there isn't any Objective-C in the shell's
417 # executable.
418 'postbuild_name': 'Verify No Objective-C',
419 'action': [
420 '../build/mac/verify_no_objc.sh',
421 ],
422 },
423 ],
424 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33425 ],
426 },
[email protected]fe2420d2012-08-21 07:28:33427 {
428 'target_name': 'content_shell_builder',
429 'type': 'none',
430 'dependencies': [
431 'content_shell',
432 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:DumpRenderTree',
433 ],
434 },
[email protected]5629e0c2011-09-12 22:07:36435 ],
[email protected]85ff16042012-03-06 23:46:34436 'conditions': [
437 ['OS=="mac"', {
438 'targets': [
439 {
440 'target_name': 'content_shell_framework',
441 'type': 'shared_library',
442 'product_name': '<(content_shell_product_name) Framework',
443 'mac_bundle': 1,
444 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36445 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34446 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42447 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34448 ],
449 'dependencies': [
450 'content_shell_lib',
451 ],
452 'include_dirs': [
453 '..',
454 ],
455 'sources': [
456 'shell/shell_content_main.cc',
457 'shell/shell_content_main.h',
458 ],
[email protected]5d96bbe2012-07-25 17:13:23459 'copies': [
460 {
461 # Copy FFmpeg binaries for audio/video support.
462 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
463 'files': [
464 '<(PRODUCT_DIR)/ffmpegsumo.so',
465 ],
466 },
467 ],
[email protected]180df8f2012-03-09 22:36:10468 }, # target content_shell_framework
469 {
470 'target_name': 'content_shell_helper_app',
471 'type': 'executable',
472 'variables': { 'enable_wexit_time_destructors': 1, },
473 'product_name': '<(content_shell_product_name) Helper',
474 'mac_bundle': 1,
475 'dependencies': [
476 'content_shell_framework',
477 ],
478 'sources': [
479 'shell/shell_main.cc',
480 'shell/mac/helper-Info.plist',
481 ],
482 # TODO(mark): Come up with a fancier way to do this. It should only
483 # be necessary to list helper-Info.plist once, not the three times it
484 # is listed here.
485 'mac_bundle_resources!': [
486 'shell/mac/helper-Info.plist',
487 ],
488 # TODO(mark): For now, don't put any resources into this app. Its
489 # resources directory will be a symbolic link to the browser app's
490 # resources directory.
491 'mac_bundle_resources/': [
492 ['exclude', '.*'],
493 ],
494 'xcode_settings': {
495 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
496 },
497 'postbuilds': [
498 {
499 # The framework defines its load-time path
500 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
501 # (chrome). A different relative path needs to be used in
502 # content_shell_helper_app.
503 'postbuild_name': 'Fix Framework Link',
504 'action': [
505 'install_name_tool',
506 '-change',
507 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
508 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
509 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
510 ],
511 },
512 {
513 # Modify the Info.plist as needed. The script explains why this
514 # is needed. This is also done in the chrome and chrome_dll
[email protected]bbf52442012-08-23 22:53:18515 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
516 # are used because Breakpad, Keystone, and SCM keys are
[email protected]180df8f2012-03-09 22:36:10517 # never placed into the helper.
518 'postbuild_name': 'Tweak Info.plist',
519 'action': ['../build/mac/tweak_info_plist.py',
520 '--breakpad=0',
521 '--keystone=0',
[email protected]bbf52442012-08-23 22:53:18522 '--scm=0'],
[email protected]180df8f2012-03-09 22:36:10523 },
524 {
525 # Make sure there isn't any Objective-C in the helper app's
526 # executable.
527 'postbuild_name': 'Verify No Objective-C',
528 'action': [
529 '../build/mac/verify_no_objc.sh',
530 ],
531 },
532 ],
[email protected]ec40c38f2012-06-28 16:37:49533 'conditions': [
534 ['component=="shared_library"', {
535 'xcode_settings': {
536 'LD_RUNPATH_SEARCH_PATHS': [
537 # Get back from Content Shell.app/Contents/Frameworks/
538 # Helper.app/Contents/MacOS
539 '@loader_path/../../../../../..',
540 ],
541 },
542 }],
543 ],
[email protected]180df8f2012-03-09 22:36:10544 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34545 ],
546 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06547 ['OS=="android"', {
548 'targets': [
549 {
[email protected]a08029b42012-04-25 03:18:46550 # TODO(jrg): Update this action and other jni generators to only
551 # require specifying the java directory and generate the rest.
552 'target_name': 'content_shell_jni_headers',
553 'type': 'none',
[email protected]e46f66152012-07-19 20:02:55554 'sources': [
555 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
556 'shell/android/java/src/org/chromium/content_shell/Shell.java',
557 ],
[email protected]a08029b42012-04-25 03:18:46558 'variables': {
[email protected]e46f66152012-07-19 20:02:55559 'jni_gen_dir': 'content/shell',
[email protected]a08029b42012-04-25 03:18:46560 },
561 'includes': [ '../build/jni_generator.gypi' ],
562 },
563 {
[email protected]c1101582012-06-25 17:07:18564 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46565 'type': 'shared_library',
566 'dependencies': [
567 'content_shell_jni_headers',
568 'content_shell_lib',
569 'content_shell_pak',
570 # Skia is necessary to ensure the dependencies needed by
571 # WebContents are included.
572 '../skia/skia.gyp:skia',
573 '<(DEPTH)/media/media.gyp:player_android',
574 ],
575 'include_dirs': [
576 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
577 ],
578 'sources': [
579 'shell/android/shell_library_loader.cc',
580 'shell/android/shell_library_loader.h',
581 'shell/android/shell_manager.cc',
582 'shell/android/shell_manager.h',
[email protected]a08029b42012-04-25 03:18:46583 ],
[email protected]f83a47392012-07-12 22:15:04584 'sources!': [
585 'shell/shell_main.cc',
586 'shell/shell_main.h',
587 ],
[email protected]7abcaa82012-06-27 17:09:48588 'conditions': [
589 ['android_build_type==1', {
590 'ldflags': [
591 '-lgabi++', # For rtti
592 ],
593 }],
594 ],
[email protected]a08029b42012-04-25 03:18:46595 },
596 {
[email protected]cc66d282012-03-30 11:44:06597 'target_name': 'content_shell_apk',
598 'type': 'none',
[email protected]de020e02012-09-11 02:03:08599 'dependencies': [
600 'content_java',
601 '../base/base.gyp:base_java',
602 '../media/media.gyp:media_java',
603 '../net/net.gyp:net_java',
604 ],
[email protected]cc66d282012-03-30 11:44:06605 'actions': [
606 {
[email protected]9c320642012-05-07 16:25:57607 'action_name': 'copy_and_strip_so',
[email protected]73919ea2012-04-26 00:48:41608 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]de5b7a42012-05-16 06:18:41609 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'],
[email protected]9c320642012-05-07 16:25:57610 'action': [
[email protected]c0f76312012-08-16 13:52:04611 '<(android_strip)',
[email protected]9c320642012-05-07 16:25:57612 '--strip-unneeded', # All symbols not needed for relocation.
613 '<@(_inputs)',
614 '-o',
[email protected]c9a433d2012-07-12 20:28:45615 '<@(_outputs)',
[email protected]9c320642012-05-07 16:25:57616 ],
[email protected]73919ea2012-04-26 00:48:41617 },
618 {
[email protected]cc66d282012-03-30 11:44:06619 'action_name': 'content_shell_apk',
620 'inputs': [
[email protected]19bbc472012-07-14 13:33:34621 'shell/android/java/content_shell_apk.xml',
622 'shell/android/java/AndroidManifest.xml',
[email protected]de020e02012-09-11 02:03:08623 '../build/android/ant/common.xml',
624 '../build/android/ant/sdk-targets.xml',
[email protected]cc66d282012-03-30 11:44:06625 '<!@(find shell/android/java -name "*.java")',
[email protected]a08029b42012-04-25 03:18:46626 '<!@(find shell/android/res -name "*")',
[email protected]de020e02012-09-11 02:03:08627 '>@(input_jars_paths)',
[email protected]f83a47392012-07-12 22:15:04628 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
[email protected]de5b7a42012-05-16 06:18:41629 '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so',
[email protected]cc66d282012-03-30 11:44:06630 ],
631 'outputs': [
632 # Awkwardly, we build a Debug APK even when gyp is in
633 # Release mode. I don't think it matters (e.g. we're
634 # probably happy to not codesign) but naming should be
635 # fixed.
[email protected]c9a433d2012-07-12 20:28:45636 '<(PRODUCT_DIR)/content_shell/ContentShell-debug.apk',
[email protected]cc66d282012-03-30 11:44:06637 ],
638 'action': [
[email protected]19bbc472012-07-14 13:33:34639 # Pass the build type to ant. Currently it only assumes
640 # debug mode in java. Release mode will break the current
641 # workflow.
[email protected]cc66d282012-03-30 11:44:06642 'ant',
[email protected]ef7ed7a2012-05-29 23:19:13643 '-DPRODUCT_DIR=<(ant_build_out)',
[email protected]de5b7a42012-05-16 06:18:41644 '-DAPP_ABI=<(android_app_abi)',
[email protected]300800482012-08-06 23:23:51645 '-DANDROID_SDK=<(android_sdk)',
646 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
647 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
648 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
[email protected]9ae5b9b2012-08-30 22:54:09649 '-DANDROID_GDBSERVER=<(android_gdbserver)',
[email protected]d510766b2012-09-05 21:21:24650 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
[email protected]de020e02012-09-11 02:03:08651 '-DINPUT_JARS_PATHS=>(input_jars_paths)',
[email protected]cc66d282012-03-30 11:44:06652 '-buildfile',
[email protected]19bbc472012-07-14 13:33:34653 'shell/android/java/content_shell_apk.xml',
[email protected]ad1a7382012-08-01 00:43:46654 ],
[email protected]cc66d282012-03-30 11:44:06655 }
656 ],
657 },
658 ],
659 }], # OS=="android"
660 ]
[email protected]5629e0c2011-09-12 22:07:36661}