blob: 17d96981443cf499f8ac9d3a86fcca6c033ede2a [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]4c9bf3482012-09-12 14:35:35106 'shell/shell_web_contents_view_delegate_win.cc',
[email protected]4c2aa392012-09-03 01:29:42107 'shell/shell_web_contents_view_delegate.h',
[email protected]9b4c6cd2012-08-20 10:47:45108 'shell/webkit_test_runner.cc',
109 'shell/webkit_test_runner.h',
110 'shell/webkit_test_runner_bindings.cc',
111 'shell/webkit_test_runner_bindings.h',
112 'shell/webkit_test_runner_host.cc',
113 'shell/webkit_test_runner_host.h',
[email protected]5629e0c2011-09-12 22:07:36114 ],
115 'msvs_settings': {
116 'VCLinkerTool': {
117 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
118 },
119 },
120 'conditions': [
121 ['OS=="win" and win_use_allocator_shim==1', {
122 'dependencies': [
123 '../base/allocator/allocator.gyp:allocator',
124 ],
125 }],
[email protected]9fbd3f862011-09-20 23:31:34126 ['OS=="win"', {
127 'resource_include_dirs': [
128 '<(SHARED_INTERMEDIATE_DIR)/webkit',
129 ],
[email protected]9fbd3f862011-09-20 23:31:34130 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34131 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
132 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
133 ],
134 'configurations': {
135 'Debug_Base': {
136 'msvs_settings': {
137 'VCLinkerTool': {
138 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
139 },
140 },
141 },
142 },
[email protected]85ff16042012-03-06 23:46:34143 }], # OS=="win"
[email protected]689266d2012-08-07 12:52:20144 ['OS=="android"', {
[email protected]82e9e2b12012-07-19 00:32:01145 'dependencies': [
146 'content_shell_jni_headers',
147 ],
148 'include_dirs': [
149 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
150 ],
[email protected]689266d2012-08-07 12:52:20151 'sources!': [
152 'shell/shell_devtools_delegate.cc',
153 ],
154 }, { # else: OS!="android"
155 'dependencies': [
156 # This dependency is for running DRT against the content shell, and
157 # this combination is not yet supported on Android.
158 '../webkit/support/webkit_support.gyp:webkit_support',
159 ],
[email protected]82e9e2b12012-07-19 00:32:01160 }], # OS=="android"
[email protected]c767d572012-07-27 10:55:58161 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
162 'dependencies': [
163 # This is needed by content/app/content_main_runner.cc
164 '../base/allocator/allocator.gyp:allocator',
165 ],
166 }],
[email protected]fa4a45832012-04-12 21:32:48167 ['use_aura==1', {
[email protected]c767d572012-07-27 10:55:58168 'dependencies': [
169 '../ui/aura/aura.gyp:aura',
170 '../ui/base/strings/ui_strings.gyp:ui_strings',
[email protected]9e7fca802012-09-01 18:53:05171 '../ui/views/controls/webview/webview.gyp:webview',
[email protected]c767d572012-07-27 10:55:58172 '../ui/views/views.gyp:views',
[email protected]2f0dcb62012-09-13 22:49:51173 '../ui/views/views.gyp:test_support_views',
[email protected]c767d572012-07-27 10:55:58174 '../ui/ui.gyp:ui_resources',
175 ],
[email protected]fa4a45832012-04-12 21:32:48176 'sources/': [
177 ['exclude', 'shell/shell_gtk.cc'],
178 ['exclude', 'shell/shell_win.cc'],
179 ],
[email protected]96b80b472012-07-03 19:41:56180 }], # use_aura==1
[email protected]c767d572012-07-27 10:55:58181 ['chromeos==1', {
182 'dependencies': [
183 '../chromeos/chromeos.gyp:chromeos',
184 ],
185 }], # chromeos==1
[email protected]96b80b472012-07-03 19:41:56186 ['inside_chromium_build==0 or component!="shared_library"', {
187 'dependencies': [
188 '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
189 '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf',
190 ],
191 'include_dirs': [
192 # Required for WebTestingSupport.cpp to find our custom config.h.
193 'shell/',
194 '<(webkit_src_dir)/Source/WebKit/chromium/public',
195 # WARNING: Do not view this particular case as a precedent for
196 # including WebCore headers in the content shell.
197 '<(webkit_src_dir)/Source/WebCore/testing/v8', # for WebCoreTestSupport.h needed to link in window.internals code.
198 ],
199 'sources': [
200 'shell/config.h',
201 '<(webkit_src_dir)/Source/WebKit/chromium/src/WebTestingSupport.cpp',
202 '<(webkit_src_dir)/Source/WebKit/chromium/public/WebTestingSupport.h',
203 ],
[email protected]fa4a45832012-04-12 21:32:48204 }],
[email protected]5629e0c2011-09-12 22:07:36205 ],
206 },
[email protected]c1f87b22011-10-05 21:59:33207 {
[email protected]ee75b8992012-01-27 07:53:57208 'target_name': 'content_shell_resources',
209 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46210 'dependencies': [
211 'generate_content_shell_resources',
212 ],
213 'variables': {
214 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
215 },
216 'includes': [ '../build/grit_target.gypi' ],
217 'copies': [
218 {
219 'destination': '<(PRODUCT_DIR)',
220 'files': [
221 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
222 ],
223 },
224 ],
[email protected]4cb792f42012-03-24 03:12:42225 },
226 {
[email protected]b581eb402012-03-09 01:31:46227 'target_name': 'generate_content_shell_resources',
228 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57229 'variables': {
230 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
231 },
232 'actions': [
233 {
234 'action_name': 'content_shell_resources',
235 'variables': {
236 'grit_grd_file': 'shell/shell_resources.grd',
237 },
238 'includes': [ '../build/grit_action.gypi' ],
239 },
240 ],
[email protected]ee75b8992012-01-27 07:53:57241 },
242 {
[email protected]81f30ce2012-01-18 22:10:33243 # We build a minimal set of resources so WebKit in content_shell has
244 # access to necessary resources.
245 'target_name': 'content_shell_pak',
246 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57247 'dependencies': [
248 'browser/debugger/devtools_resources.gyp:devtools_resources',
249 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45250 '<(DEPTH)/ui/ui.gyp:ui_resources',
[email protected]ee75b8992012-01-27 07:53:57251 ],
[email protected]81f30ce2012-01-18 22:10:33252 'variables': {
253 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
254 },
255 'actions': [
256 {
257 'action_name': 'repack_content_shell_pack',
258 'variables': {
259 'pak_inputs': [
260 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57261 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33262 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
[email protected]c767d572012-07-27 10:55:58263 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
[email protected]a52c7312012-07-24 22:45:57264 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
[email protected]c767d572012-07-27 10:55:58265 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
[email protected]ee75b8992012-01-27 07:53:57266 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33267 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
[email protected]30c8f542012-09-01 01:02:29268 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
[email protected]af551a62012-07-31 16:44:03269 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
[email protected]81f30ce2012-01-18 22:10:33270 ],
[email protected]81f30ce2012-01-18 22:10:33271 },
272 'inputs': [
273 '<(repack_path)',
274 '<@(pak_inputs)',
275 ],
[email protected]81f30ce2012-01-18 22:10:33276 'action': ['python', '<(repack_path)', '<@(_outputs)',
277 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46278 'conditions': [
279 ['OS!="android"', {
280 'outputs': [
281 '<(PRODUCT_DIR)/content_shell.pak',
282 ],
283 }, {
284 'outputs': [
285 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
286 ],
287 }],
288 ],
[email protected]81f30ce2012-01-18 22:10:33289 },
290 ],
291 },
292 {
[email protected]c1f87b22011-10-05 21:59:33293 'target_name': 'content_shell',
294 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34295 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33296 'defines!': ['CONTENT_IMPLEMENTATION'],
297 'variables': {
298 'chromium_code': 1,
299 },
300 'dependencies': [
301 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33302 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33303 ],
304 'include_dirs': [
305 '..',
306 ],
307 'sources': [
[email protected]711f428e2012-06-22 02:18:23308 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33309 'shell/shell_main.cc',
310 ],
[email protected]85ff16042012-03-06 23:46:34311 'mac_bundle_resources': [
312 'shell/mac/app.icns',
313 'shell/mac/app-Info.plist',
314 ],
315 # TODO(mark): Come up with a fancier way to do this. It should only
316 # be necessary to list app-Info.plist once, not the three times it is
317 # listed here.
318 'mac_bundle_resources!': [
319 'shell/mac/app-Info.plist',
320 ],
321 'xcode_settings': {
322 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
323 },
[email protected]c1f87b22011-10-05 21:59:33324 'msvs_settings': {
325 'VCLinkerTool': {
326 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
327 },
328 },
329 'conditions': [
330 ['OS=="win" and win_use_allocator_shim==1', {
331 'dependencies': [
332 '../base/allocator/allocator.gyp:allocator',
333 ],
334 }],
335 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29336 'sources': [
337 'shell/shell.rc',
338 ],
[email protected]c1f87b22011-10-05 21:59:33339 'configurations': {
340 'Debug_Base': {
341 'msvs_settings': {
342 'VCLinkerTool': {
343 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
344 },
345 },
346 },
347 },
[email protected]85ff16042012-03-06 23:46:34348 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12349 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
350 'dependencies': [
351 '../sandbox/sandbox.gyp:sandbox',
352 ],
[email protected]85ff16042012-03-06 23:46:34353 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58354 ['toolkit_uses_gtk == 1', {
355 'dependencies': [
356 '<(DEPTH)/build/linux/system.gyp:gtk',
357 ],
[email protected]85ff16042012-03-06 23:46:34358 }], # toolkit_uses_gtk
359 ['OS=="mac"', {
360 'product_name': '<(content_shell_product_name)',
361 'dependencies!': [
362 'content_shell_lib',
363 ],
364 'dependencies': [
365 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10366 'content_shell_helper_app',
367 ],
368 'copies': [
369 {
370 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
371 'files': [
372 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
373 ],
374 },
[email protected]85ff16042012-03-06 23:46:34375 ],
376 'postbuilds': [
377 {
378 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
379 'action': [
380 '../build/mac/copy_framework_unversioned.sh',
381 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
382 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
383 ],
384 },
385 {
386 'postbuild_name': 'Fix Framework Link',
387 'action': [
388 'install_name_tool',
389 '-change',
390 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
391 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
392 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
393 ],
394 },
395 {
396 # Modify the Info.plist as needed.
397 'postbuild_name': 'Tweak Info.plist',
398 'action': ['../build/mac/tweak_info_plist.py',
[email protected]bbf52442012-08-23 22:53:18399 '--scm=1'],
[email protected]85ff16042012-03-06 23:46:34400 },
401 {
[email protected]180df8f2012-03-09 22:36:10402 # This postbuid step is responsible for creating the following
403 # helpers:
404 #
405 # Content Shell Helper EH.app and Content Shell Helper NP.app are
406 # created from Content Shell Helper.app.
407 #
408 # The EH helper is marked for an executable heap. The NP helper
409 # is marked for no PIE (ASLR).
410 'postbuild_name': 'Make More Helpers',
411 'action': [
412 '../build/mac/make_more_helpers.sh',
413 'Frameworks',
414 '<(content_shell_product_name)',
415 ],
416 },
417 {
[email protected]85ff16042012-03-06 23:46:34418 # Make sure there isn't any Objective-C in the shell's
419 # executable.
420 'postbuild_name': 'Verify No Objective-C',
421 'action': [
422 '../build/mac/verify_no_objc.sh',
423 ],
424 },
425 ],
426 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33427 ],
428 },
[email protected]fe2420d2012-08-21 07:28:33429 {
430 'target_name': 'content_shell_builder',
431 'type': 'none',
432 'dependencies': [
433 'content_shell',
434 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:DumpRenderTree',
435 ],
436 },
[email protected]5629e0c2011-09-12 22:07:36437 ],
[email protected]85ff16042012-03-06 23:46:34438 'conditions': [
439 ['OS=="mac"', {
440 'targets': [
441 {
442 'target_name': 'content_shell_framework',
443 'type': 'shared_library',
444 'product_name': '<(content_shell_product_name) Framework',
445 'mac_bundle': 1,
446 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36447 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34448 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42449 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34450 ],
451 'dependencies': [
452 'content_shell_lib',
453 ],
454 'include_dirs': [
455 '..',
456 ],
457 'sources': [
458 'shell/shell_content_main.cc',
459 'shell/shell_content_main.h',
460 ],
[email protected]5d96bbe2012-07-25 17:13:23461 'copies': [
462 {
463 # Copy FFmpeg binaries for audio/video support.
464 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
465 'files': [
466 '<(PRODUCT_DIR)/ffmpegsumo.so',
467 ],
468 },
469 ],
[email protected]180df8f2012-03-09 22:36:10470 }, # target content_shell_framework
471 {
472 'target_name': 'content_shell_helper_app',
473 'type': 'executable',
474 'variables': { 'enable_wexit_time_destructors': 1, },
475 'product_name': '<(content_shell_product_name) Helper',
476 'mac_bundle': 1,
477 'dependencies': [
478 'content_shell_framework',
479 ],
480 'sources': [
481 'shell/shell_main.cc',
482 'shell/mac/helper-Info.plist',
483 ],
484 # TODO(mark): Come up with a fancier way to do this. It should only
485 # be necessary to list helper-Info.plist once, not the three times it
486 # is listed here.
487 'mac_bundle_resources!': [
488 'shell/mac/helper-Info.plist',
489 ],
490 # TODO(mark): For now, don't put any resources into this app. Its
491 # resources directory will be a symbolic link to the browser app's
492 # resources directory.
493 'mac_bundle_resources/': [
494 ['exclude', '.*'],
495 ],
496 'xcode_settings': {
497 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
498 },
499 'postbuilds': [
500 {
501 # The framework defines its load-time path
502 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
503 # (chrome). A different relative path needs to be used in
504 # content_shell_helper_app.
505 'postbuild_name': 'Fix Framework Link',
506 'action': [
507 'install_name_tool',
508 '-change',
509 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
510 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
511 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
512 ],
513 },
514 {
515 # Modify the Info.plist as needed. The script explains why this
516 # is needed. This is also done in the chrome and chrome_dll
[email protected]bbf52442012-08-23 22:53:18517 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
518 # are used because Breakpad, Keystone, and SCM keys are
[email protected]180df8f2012-03-09 22:36:10519 # never placed into the helper.
520 'postbuild_name': 'Tweak Info.plist',
521 'action': ['../build/mac/tweak_info_plist.py',
522 '--breakpad=0',
523 '--keystone=0',
[email protected]bbf52442012-08-23 22:53:18524 '--scm=0'],
[email protected]180df8f2012-03-09 22:36:10525 },
526 {
527 # Make sure there isn't any Objective-C in the helper app's
528 # executable.
529 'postbuild_name': 'Verify No Objective-C',
530 'action': [
531 '../build/mac/verify_no_objc.sh',
532 ],
533 },
534 ],
[email protected]ec40c38f2012-06-28 16:37:49535 'conditions': [
536 ['component=="shared_library"', {
537 'xcode_settings': {
538 'LD_RUNPATH_SEARCH_PATHS': [
539 # Get back from Content Shell.app/Contents/Frameworks/
540 # Helper.app/Contents/MacOS
541 '@loader_path/../../../../../..',
542 ],
543 },
544 }],
545 ],
[email protected]180df8f2012-03-09 22:36:10546 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34547 ],
548 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06549 ['OS=="android"', {
550 'targets': [
551 {
[email protected]a08029b42012-04-25 03:18:46552 # TODO(jrg): Update this action and other jni generators to only
553 # require specifying the java directory and generate the rest.
554 'target_name': 'content_shell_jni_headers',
555 'type': 'none',
[email protected]e46f66152012-07-19 20:02:55556 'sources': [
557 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
558 'shell/android/java/src/org/chromium/content_shell/Shell.java',
559 ],
[email protected]a08029b42012-04-25 03:18:46560 'variables': {
[email protected]e46f66152012-07-19 20:02:55561 'jni_gen_dir': 'content/shell',
[email protected]a08029b42012-04-25 03:18:46562 },
563 'includes': [ '../build/jni_generator.gypi' ],
564 },
565 {
[email protected]c1101582012-06-25 17:07:18566 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46567 'type': 'shared_library',
568 'dependencies': [
569 'content_shell_jni_headers',
570 'content_shell_lib',
571 'content_shell_pak',
572 # Skia is necessary to ensure the dependencies needed by
573 # WebContents are included.
574 '../skia/skia.gyp:skia',
575 '<(DEPTH)/media/media.gyp:player_android',
576 ],
577 'include_dirs': [
578 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
579 ],
580 'sources': [
581 'shell/android/shell_library_loader.cc',
582 'shell/android/shell_library_loader.h',
583 'shell/android/shell_manager.cc',
584 'shell/android/shell_manager.h',
[email protected]a08029b42012-04-25 03:18:46585 ],
[email protected]f83a47392012-07-12 22:15:04586 'sources!': [
587 'shell/shell_main.cc',
588 'shell/shell_main.h',
589 ],
[email protected]7abcaa82012-06-27 17:09:48590 'conditions': [
591 ['android_build_type==1', {
592 'ldflags': [
593 '-lgabi++', # For rtti
594 ],
595 }],
596 ],
[email protected]a08029b42012-04-25 03:18:46597 },
598 {
[email protected]cc66d282012-03-30 11:44:06599 'target_name': 'content_shell_apk',
600 'type': 'none',
[email protected]de020e02012-09-11 02:03:08601 'dependencies': [
602 'content_java',
603 '../base/base.gyp:base_java',
604 '../media/media.gyp:media_java',
605 '../net/net.gyp:net_java',
606 ],
[email protected]cc66d282012-03-30 11:44:06607 'actions': [
608 {
[email protected]9c320642012-05-07 16:25:57609 'action_name': 'copy_and_strip_so',
[email protected]73919ea2012-04-26 00:48:41610 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]de5b7a42012-05-16 06:18:41611 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'],
[email protected]9c320642012-05-07 16:25:57612 'action': [
[email protected]c0f76312012-08-16 13:52:04613 '<(android_strip)',
[email protected]9c320642012-05-07 16:25:57614 '--strip-unneeded', # All symbols not needed for relocation.
615 '<@(_inputs)',
616 '-o',
[email protected]c9a433d2012-07-12 20:28:45617 '<@(_outputs)',
[email protected]9c320642012-05-07 16:25:57618 ],
[email protected]73919ea2012-04-26 00:48:41619 },
[email protected]b2367ff2012-09-12 16:06:45620 {
621 'action_name': 'content_shell_apk',
622 'inputs': [
623 'shell/android/java/content_shell_apk.xml',
624 'shell/android/java/AndroidManifest.xml',
625 '../build/android/ant/common.xml',
626 '../build/android/ant/sdk-targets.xml',
627 '<!@(find shell/android/java -name "*.java")',
628 '<!@(find shell/android/res -name "*")',
629 '>@(input_jars_paths)',
630 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
631 '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so',
632 ],
633 'outputs': [
634 # Awkwardly, we build a Debug APK even when gyp is in
635 # Release mode. I don't think it matters (e.g. we're
636 # probably happy to not codesign) but naming should be
637 # fixed.
638 '<(PRODUCT_DIR)/content_shell/ContentShell-debug.apk',
639 ],
640 'action': [
641 # Pass the build type to ant. Currently it only assumes
642 # debug mode in java. Release mode will break the current
643 # workflow.
644 'ant',
645 '-DPRODUCT_DIR=<(ant_build_out)',
646 '-DAPP_ABI=<(android_app_abi)',
647 '-DANDROID_SDK=<(android_sdk)',
648 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
649 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
650 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
651 '-DANDROID_GDBSERVER=<(android_gdbserver)',
652 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
653 '-DINPUT_JARS_PATHS=>(input_jars_paths)',
654 '-buildfile',
655 'shell/android/java/content_shell_apk.xml',
656 ],
657 }
[email protected]cc66d282012-03-30 11:44:06658 ],
659 },
660 ],
661 }], # OS=="android"
662 ]
[email protected]5629e0c2011-09-12 22:07:36663}