blob: 566f294776dc06dd53f701c2e7097ea435f20db4 [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',
105 'shell/shell_web_contents_view_delegate.h',
[email protected]9b4c6cd2012-08-20 10:47:45106 'shell/webkit_test_runner.cc',
107 'shell/webkit_test_runner.h',
108 'shell/webkit_test_runner_bindings.cc',
109 'shell/webkit_test_runner_bindings.h',
110 'shell/webkit_test_runner_host.cc',
111 'shell/webkit_test_runner_host.h',
[email protected]5629e0c2011-09-12 22:07:36112 ],
113 'msvs_settings': {
114 'VCLinkerTool': {
115 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
116 },
117 },
118 'conditions': [
119 ['OS=="win" and win_use_allocator_shim==1', {
120 'dependencies': [
121 '../base/allocator/allocator.gyp:allocator',
122 ],
123 }],
[email protected]9fbd3f862011-09-20 23:31:34124 ['OS=="win"', {
125 'resource_include_dirs': [
126 '<(SHARED_INTERMEDIATE_DIR)/webkit',
127 ],
[email protected]9fbd3f862011-09-20 23:31:34128 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34129 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
130 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
131 ],
132 'configurations': {
133 'Debug_Base': {
134 'msvs_settings': {
135 'VCLinkerTool': {
136 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
137 },
138 },
139 },
140 },
[email protected]85ff16042012-03-06 23:46:34141 }], # OS=="win"
[email protected]689266d2012-08-07 12:52:20142 ['OS=="android"', {
[email protected]82e9e2b12012-07-19 00:32:01143 'dependencies': [
144 'content_shell_jni_headers',
145 ],
146 'include_dirs': [
147 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
148 ],
[email protected]689266d2012-08-07 12:52:20149 'sources!': [
150 'shell/shell_devtools_delegate.cc',
151 ],
152 }, { # else: OS!="android"
153 'dependencies': [
154 # This dependency is for running DRT against the content shell, and
155 # this combination is not yet supported on Android.
156 '../webkit/support/webkit_support.gyp:webkit_support',
157 ],
[email protected]82e9e2b12012-07-19 00:32:01158 }], # OS=="android"
[email protected]c767d572012-07-27 10:55:58159 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
160 'dependencies': [
161 # This is needed by content/app/content_main_runner.cc
162 '../base/allocator/allocator.gyp:allocator',
163 ],
164 }],
[email protected]fa4a45832012-04-12 21:32:48165 ['use_aura==1', {
[email protected]c767d572012-07-27 10:55:58166 'dependencies': [
167 '../ui/aura/aura.gyp:aura',
168 '../ui/base/strings/ui_strings.gyp:ui_strings',
[email protected]9e7fca802012-09-01 18:53:05169 '../ui/views/controls/webview/webview.gyp:webview',
[email protected]c767d572012-07-27 10:55:58170 '../ui/views/views.gyp:views',
171 '../ui/ui.gyp:ui_resources',
172 ],
[email protected]fa4a45832012-04-12 21:32:48173 'sources/': [
174 ['exclude', 'shell/shell_gtk.cc'],
175 ['exclude', 'shell/shell_win.cc'],
176 ],
[email protected]96b80b472012-07-03 19:41:56177 }], # use_aura==1
[email protected]c767d572012-07-27 10:55:58178 ['chromeos==1', {
179 'dependencies': [
180 '../chromeos/chromeos.gyp:chromeos',
181 ],
182 }], # chromeos==1
[email protected]96b80b472012-07-03 19:41:56183 ['inside_chromium_build==0 or component!="shared_library"', {
184 'dependencies': [
185 '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
186 '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf',
187 ],
188 'include_dirs': [
189 # Required for WebTestingSupport.cpp to find our custom config.h.
190 'shell/',
191 '<(webkit_src_dir)/Source/WebKit/chromium/public',
192 # WARNING: Do not view this particular case as a precedent for
193 # including WebCore headers in the content shell.
194 '<(webkit_src_dir)/Source/WebCore/testing/v8', # for WebCoreTestSupport.h needed to link in window.internals code.
195 ],
196 'sources': [
197 'shell/config.h',
198 '<(webkit_src_dir)/Source/WebKit/chromium/src/WebTestingSupport.cpp',
199 '<(webkit_src_dir)/Source/WebKit/chromium/public/WebTestingSupport.h',
200 ],
[email protected]fa4a45832012-04-12 21:32:48201 }],
[email protected]5629e0c2011-09-12 22:07:36202 ],
203 },
[email protected]c1f87b22011-10-05 21:59:33204 {
[email protected]ee75b8992012-01-27 07:53:57205 'target_name': 'content_shell_resources',
206 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46207 'dependencies': [
208 'generate_content_shell_resources',
209 ],
210 'variables': {
211 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
212 },
213 'includes': [ '../build/grit_target.gypi' ],
214 'copies': [
215 {
216 'destination': '<(PRODUCT_DIR)',
217 'files': [
218 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
219 ],
220 },
221 ],
[email protected]4cb792f42012-03-24 03:12:42222 },
223 {
[email protected]b581eb402012-03-09 01:31:46224 'target_name': 'generate_content_shell_resources',
225 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57226 'variables': {
227 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
228 },
229 'actions': [
230 {
231 'action_name': 'content_shell_resources',
232 'variables': {
233 'grit_grd_file': 'shell/shell_resources.grd',
234 },
235 'includes': [ '../build/grit_action.gypi' ],
236 },
237 ],
[email protected]ee75b8992012-01-27 07:53:57238 },
239 {
[email protected]81f30ce2012-01-18 22:10:33240 # We build a minimal set of resources so WebKit in content_shell has
241 # access to necessary resources.
242 'target_name': 'content_shell_pak',
243 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57244 'dependencies': [
245 'browser/debugger/devtools_resources.gyp:devtools_resources',
246 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45247 '<(DEPTH)/ui/ui.gyp:ui_resources',
[email protected]ee75b8992012-01-27 07:53:57248 ],
[email protected]81f30ce2012-01-18 22:10:33249 'variables': {
250 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
251 },
252 'actions': [
253 {
254 'action_name': 'repack_content_shell_pack',
255 'variables': {
256 'pak_inputs': [
257 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57258 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33259 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
[email protected]c767d572012-07-27 10:55:58260 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
[email protected]a52c7312012-07-24 22:45:57261 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
[email protected]c767d572012-07-27 10:55:58262 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
[email protected]ee75b8992012-01-27 07:53:57263 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33264 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
[email protected]30c8f542012-09-01 01:02:29265 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
[email protected]af551a62012-07-31 16:44:03266 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
[email protected]81f30ce2012-01-18 22:10:33267 ],
[email protected]81f30ce2012-01-18 22:10:33268 },
269 'inputs': [
270 '<(repack_path)',
271 '<@(pak_inputs)',
272 ],
[email protected]81f30ce2012-01-18 22:10:33273 'action': ['python', '<(repack_path)', '<@(_outputs)',
274 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46275 'conditions': [
276 ['OS!="android"', {
277 'outputs': [
278 '<(PRODUCT_DIR)/content_shell.pak',
279 ],
280 }, {
281 'outputs': [
282 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
283 ],
284 }],
285 ],
[email protected]81f30ce2012-01-18 22:10:33286 },
287 ],
288 },
289 {
[email protected]c1f87b22011-10-05 21:59:33290 'target_name': 'content_shell',
291 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34292 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33293 'defines!': ['CONTENT_IMPLEMENTATION'],
294 'variables': {
295 'chromium_code': 1,
296 },
297 'dependencies': [
298 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33299 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33300 ],
301 'include_dirs': [
302 '..',
303 ],
304 'sources': [
[email protected]711f428e2012-06-22 02:18:23305 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33306 'shell/shell_main.cc',
307 ],
[email protected]85ff16042012-03-06 23:46:34308 'mac_bundle_resources': [
309 'shell/mac/app.icns',
310 'shell/mac/app-Info.plist',
311 ],
312 # TODO(mark): Come up with a fancier way to do this. It should only
313 # be necessary to list app-Info.plist once, not the three times it is
314 # listed here.
315 'mac_bundle_resources!': [
316 'shell/mac/app-Info.plist',
317 ],
318 'xcode_settings': {
319 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
320 },
[email protected]c1f87b22011-10-05 21:59:33321 'msvs_settings': {
322 'VCLinkerTool': {
323 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
324 },
325 },
326 'conditions': [
327 ['OS=="win" and win_use_allocator_shim==1', {
328 'dependencies': [
329 '../base/allocator/allocator.gyp:allocator',
330 ],
331 }],
332 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29333 'sources': [
334 'shell/shell.rc',
335 ],
[email protected]c1f87b22011-10-05 21:59:33336 'configurations': {
337 'Debug_Base': {
338 'msvs_settings': {
339 'VCLinkerTool': {
340 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
341 },
342 },
343 },
344 },
[email protected]85ff16042012-03-06 23:46:34345 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12346 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
347 'dependencies': [
348 '../sandbox/sandbox.gyp:sandbox',
349 ],
[email protected]85ff16042012-03-06 23:46:34350 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58351 ['toolkit_uses_gtk == 1', {
352 'dependencies': [
353 '<(DEPTH)/build/linux/system.gyp:gtk',
354 ],
[email protected]85ff16042012-03-06 23:46:34355 }], # toolkit_uses_gtk
356 ['OS=="mac"', {
357 'product_name': '<(content_shell_product_name)',
358 'dependencies!': [
359 'content_shell_lib',
360 ],
361 'dependencies': [
362 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10363 'content_shell_helper_app',
364 ],
365 'copies': [
366 {
367 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
368 'files': [
369 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
370 ],
371 },
[email protected]85ff16042012-03-06 23:46:34372 ],
373 'postbuilds': [
374 {
375 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
376 'action': [
377 '../build/mac/copy_framework_unversioned.sh',
378 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
379 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
380 ],
381 },
382 {
383 'postbuild_name': 'Fix Framework Link',
384 'action': [
385 'install_name_tool',
386 '-change',
387 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
388 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
389 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
390 ],
391 },
392 {
393 # Modify the Info.plist as needed.
394 'postbuild_name': 'Tweak Info.plist',
395 'action': ['../build/mac/tweak_info_plist.py',
[email protected]bbf52442012-08-23 22:53:18396 '--scm=1'],
[email protected]85ff16042012-03-06 23:46:34397 },
398 {
[email protected]180df8f2012-03-09 22:36:10399 # This postbuid step is responsible for creating the following
400 # helpers:
401 #
402 # Content Shell Helper EH.app and Content Shell Helper NP.app are
403 # created from Content Shell Helper.app.
404 #
405 # The EH helper is marked for an executable heap. The NP helper
406 # is marked for no PIE (ASLR).
407 'postbuild_name': 'Make More Helpers',
408 'action': [
409 '../build/mac/make_more_helpers.sh',
410 'Frameworks',
411 '<(content_shell_product_name)',
412 ],
413 },
414 {
[email protected]85ff16042012-03-06 23:46:34415 # Make sure there isn't any Objective-C in the shell's
416 # executable.
417 'postbuild_name': 'Verify No Objective-C',
418 'action': [
419 '../build/mac/verify_no_objc.sh',
420 ],
421 },
422 ],
423 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33424 ],
425 },
[email protected]fe2420d2012-08-21 07:28:33426 {
427 'target_name': 'content_shell_builder',
428 'type': 'none',
429 'dependencies': [
430 'content_shell',
431 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:DumpRenderTree',
432 ],
433 },
[email protected]5629e0c2011-09-12 22:07:36434 ],
[email protected]85ff16042012-03-06 23:46:34435 'conditions': [
436 ['OS=="mac"', {
437 'targets': [
438 {
439 'target_name': 'content_shell_framework',
440 'type': 'shared_library',
441 'product_name': '<(content_shell_product_name) Framework',
442 'mac_bundle': 1,
443 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36444 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34445 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42446 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34447 ],
448 'dependencies': [
449 'content_shell_lib',
450 ],
451 'include_dirs': [
452 '..',
453 ],
454 'sources': [
455 'shell/shell_content_main.cc',
456 'shell/shell_content_main.h',
457 ],
[email protected]5d96bbe2012-07-25 17:13:23458 'copies': [
459 {
460 # Copy FFmpeg binaries for audio/video support.
461 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
462 'files': [
463 '<(PRODUCT_DIR)/ffmpegsumo.so',
464 ],
465 },
466 ],
[email protected]180df8f2012-03-09 22:36:10467 }, # target content_shell_framework
468 {
469 'target_name': 'content_shell_helper_app',
470 'type': 'executable',
471 'variables': { 'enable_wexit_time_destructors': 1, },
472 'product_name': '<(content_shell_product_name) Helper',
473 'mac_bundle': 1,
474 'dependencies': [
475 'content_shell_framework',
476 ],
477 'sources': [
478 'shell/shell_main.cc',
479 'shell/mac/helper-Info.plist',
480 ],
481 # TODO(mark): Come up with a fancier way to do this. It should only
482 # be necessary to list helper-Info.plist once, not the three times it
483 # is listed here.
484 'mac_bundle_resources!': [
485 'shell/mac/helper-Info.plist',
486 ],
487 # TODO(mark): For now, don't put any resources into this app. Its
488 # resources directory will be a symbolic link to the browser app's
489 # resources directory.
490 'mac_bundle_resources/': [
491 ['exclude', '.*'],
492 ],
493 'xcode_settings': {
494 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
495 },
496 'postbuilds': [
497 {
498 # The framework defines its load-time path
499 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
500 # (chrome). A different relative path needs to be used in
501 # content_shell_helper_app.
502 'postbuild_name': 'Fix Framework Link',
503 'action': [
504 'install_name_tool',
505 '-change',
506 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
507 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
508 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
509 ],
510 },
511 {
512 # Modify the Info.plist as needed. The script explains why this
513 # is needed. This is also done in the chrome and chrome_dll
[email protected]bbf52442012-08-23 22:53:18514 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
515 # are used because Breakpad, Keystone, and SCM keys are
[email protected]180df8f2012-03-09 22:36:10516 # never placed into the helper.
517 'postbuild_name': 'Tweak Info.plist',
518 'action': ['../build/mac/tweak_info_plist.py',
519 '--breakpad=0',
520 '--keystone=0',
[email protected]bbf52442012-08-23 22:53:18521 '--scm=0'],
[email protected]180df8f2012-03-09 22:36:10522 },
523 {
524 # Make sure there isn't any Objective-C in the helper app's
525 # executable.
526 'postbuild_name': 'Verify No Objective-C',
527 'action': [
528 '../build/mac/verify_no_objc.sh',
529 ],
530 },
531 ],
[email protected]ec40c38f2012-06-28 16:37:49532 'conditions': [
533 ['component=="shared_library"', {
534 'xcode_settings': {
535 'LD_RUNPATH_SEARCH_PATHS': [
536 # Get back from Content Shell.app/Contents/Frameworks/
537 # Helper.app/Contents/MacOS
538 '@loader_path/../../../../../..',
539 ],
540 },
541 }],
542 ],
[email protected]180df8f2012-03-09 22:36:10543 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34544 ],
545 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06546 ['OS=="android"', {
547 'targets': [
548 {
[email protected]a08029b42012-04-25 03:18:46549 # TODO(jrg): Update this action and other jni generators to only
550 # require specifying the java directory and generate the rest.
551 'target_name': 'content_shell_jni_headers',
552 'type': 'none',
[email protected]e46f66152012-07-19 20:02:55553 'sources': [
554 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
555 'shell/android/java/src/org/chromium/content_shell/Shell.java',
556 ],
[email protected]a08029b42012-04-25 03:18:46557 'variables': {
[email protected]e46f66152012-07-19 20:02:55558 'jni_gen_dir': 'content/shell',
[email protected]a08029b42012-04-25 03:18:46559 },
560 'includes': [ '../build/jni_generator.gypi' ],
561 },
562 {
[email protected]c1101582012-06-25 17:07:18563 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46564 'type': 'shared_library',
565 'dependencies': [
566 'content_shell_jni_headers',
567 'content_shell_lib',
568 'content_shell_pak',
569 # Skia is necessary to ensure the dependencies needed by
570 # WebContents are included.
571 '../skia/skia.gyp:skia',
572 '<(DEPTH)/media/media.gyp:player_android',
573 ],
574 'include_dirs': [
575 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
576 ],
577 'sources': [
[email protected]7436acd32012-08-01 18:25:37578 'shell/android/draw_context.cc',
579 'shell/android/draw_context.h',
[email protected]a08029b42012-04-25 03:18:46580 'shell/android/shell_library_loader.cc',
581 'shell/android/shell_library_loader.h',
582 'shell/android/shell_manager.cc',
583 'shell/android/shell_manager.h',
[email protected]a08029b42012-04-25 03:18:46584 ],
[email protected]f83a47392012-07-12 22:15:04585 'sources!': [
586 'shell/shell_main.cc',
587 'shell/shell_main.h',
588 ],
[email protected]7abcaa82012-06-27 17:09:48589 'conditions': [
590 ['android_build_type==1', {
591 'ldflags': [
592 '-lgabi++', # For rtti
593 ],
594 }],
595 ],
[email protected]a08029b42012-04-25 03:18:46596 },
597 {
[email protected]cc66d282012-03-30 11:44:06598 'target_name': 'content_shell_apk',
599 'type': 'none',
600 'actions': [
601 {
[email protected]a08029b42012-04-25 03:18:46602 'action_name': 'copy_base_jar',
[email protected]e0825562012-05-10 01:50:47603 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'],
[email protected]a08029b42012-04-25 03:18:46604 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar'],
605 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
606 },
607 {
[email protected]e0825562012-05-10 01:50:47608 'action_name': 'copy_net_jar',
609 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'],
610 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar'],
611 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
612 },
613 {
614 'action_name': 'copy_media_jar',
615 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'],
616 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar'],
617 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
618 },
619 {
[email protected]a08029b42012-04-25 03:18:46620 'action_name': 'copy_content_jar',
[email protected]e0825562012-05-10 01:50:47621 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'],
[email protected]a08029b42012-04-25 03:18:46622 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar'],
623 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
624 },
625 {
[email protected]9c320642012-05-07 16:25:57626 'action_name': 'copy_and_strip_so',
[email protected]73919ea2012-04-26 00:48:41627 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]de5b7a42012-05-16 06:18:41628 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'],
[email protected]9c320642012-05-07 16:25:57629 'action': [
[email protected]c0f76312012-08-16 13:52:04630 '<(android_strip)',
[email protected]9c320642012-05-07 16:25:57631 '--strip-unneeded', # All symbols not needed for relocation.
632 '<@(_inputs)',
633 '-o',
[email protected]c9a433d2012-07-12 20:28:45634 '<@(_outputs)',
[email protected]9c320642012-05-07 16:25:57635 ],
[email protected]73919ea2012-04-26 00:48:41636 },
637 {
[email protected]cc66d282012-03-30 11:44:06638 'action_name': 'content_shell_apk',
639 'inputs': [
[email protected]19bbc472012-07-14 13:33:34640 'shell/android/java/content_shell_apk.xml',
641 'shell/android/java/AndroidManifest.xml',
[email protected]cc66d282012-03-30 11:44:06642 '<!@(find shell/android/java -name "*.java")',
[email protected]a08029b42012-04-25 03:18:46643 '<!@(find shell/android/res -name "*")',
644 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar',
[email protected]e0825562012-05-10 01:50:47645 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar',
646 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar',
[email protected]a08029b42012-04-25 03:18:46647 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar',
[email protected]f83a47392012-07-12 22:15:04648 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
[email protected]de5b7a42012-05-16 06:18:41649 '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so',
[email protected]cc66d282012-03-30 11:44:06650 ],
651 'outputs': [
652 # Awkwardly, we build a Debug APK even when gyp is in
653 # Release mode. I don't think it matters (e.g. we're
654 # probably happy to not codesign) but naming should be
655 # fixed.
[email protected]c9a433d2012-07-12 20:28:45656 '<(PRODUCT_DIR)/content_shell/ContentShell-debug.apk',
[email protected]cc66d282012-03-30 11:44:06657 ],
658 'action': [
[email protected]19bbc472012-07-14 13:33:34659 # Pass the build type to ant. Currently it only assumes
660 # debug mode in java. Release mode will break the current
661 # workflow.
[email protected]f4cab6a2012-08-07 06:54:27662 'shell/content_shell_ant_helper.sh',
[email protected]cc66d282012-03-30 11:44:06663 'ant',
[email protected]ef7ed7a2012-05-29 23:19:13664 '-DPRODUCT_DIR=<(ant_build_out)',
[email protected]de5b7a42012-05-16 06:18:41665 '-DAPP_ABI=<(android_app_abi)',
[email protected]300800482012-08-06 23:23:51666 '-DANDROID_SDK=<(android_sdk)',
667 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
668 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
669 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
670 '-DANDROID_TOOLCHAIN=<(android_toolchain)',
[email protected]9ae5b9b2012-08-30 22:54:09671 '-DANDROID_GDBSERVER=<(android_gdbserver)',
[email protected]cc66d282012-03-30 11:44:06672 '-buildfile',
[email protected]19bbc472012-07-14 13:33:34673 'shell/android/java/content_shell_apk.xml',
[email protected]f4cab6a2012-08-07 06:54:27674 '<(CONFIGURATION_NAME)',
[email protected]ad1a7382012-08-01 00:43:46675 ],
676 'dependencies': [
677 'content_java',
678 ],
[email protected]cc66d282012-03-30 11:44:06679 }
680 ],
681 },
682 ],
683 }], # OS=="android"
684 ]
[email protected]5629e0c2011-09-12 22:07:36685}