blob: e97e80258d9159e48b78a0187178871e862c1899 [file] [log] [blame]
[email protected]81f30ce2012-01-18 22:10:331# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]5629e0c2011-09-12 22:07:362# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
[email protected]85ff16042012-03-06 23:46:346 'variables': {
7 'content_shell_product_name': 'Content Shell',
8 },
[email protected]5629e0c2011-09-12 22:07:369 'targets': [
10 {
[email protected]c1f87b22011-10-05 21:59:3311 'target_name': 'content_shell_lib',
12 'type': 'static_library',
[email protected]03ff5e52011-09-30 00:28:1413 'defines!': ['CONTENT_IMPLEMENTATION'],
[email protected]9fbd3f862011-09-20 23:31:3414 'variables': {
15 'chromium_code': 1,
16 },
[email protected]5629e0c2011-09-12 22:07:3617 'dependencies': [
18 'content_app',
19 'content_browser',
20 'content_common',
21 'content_gpu',
22 'content_plugin',
23 'content_ppapi_plugin',
24 'content_renderer',
[email protected]ee75b8992012-01-27 07:53:5725 'content_shell_resources',
[email protected]5629e0c2011-09-12 22:07:3626 'content_utility',
27 'content_worker',
[email protected]0faa0a2b2011-11-15 18:03:1428 'content_resources.gyp:content_resources',
[email protected]aa6e79762011-09-29 20:53:5229 '../base/base.gyp:base',
30 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
31 '../build/temp_gyp/googleurl.gyp:googleurl',
32 '../ipc/ipc.gyp:ipc',
[email protected]433df472012-03-07 20:33:3933 '../media/media.gyp:media',
[email protected]aa6e79762011-09-29 20:53:5234 '../net/net.gyp:net',
[email protected]5629e0c2011-09-12 22:07:3635 '../skia/skia.gyp:skia',
[email protected]ee582a52012-05-22 07:38:5236 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
[email protected]5629e0c2011-09-12 22:07:3637 '../ui/ui.gyp:ui',
[email protected]12bc28fcb2011-09-21 15:53:5038 '../v8/tools/gyp/v8.gyp:v8',
[email protected]01048712012-07-09 23:26:2739 '../webkit/support/webkit_support.gyp:webkit_support',
[email protected]5629e0c2011-09-12 22:07:3640 ],
41 'include_dirs': [
42 '..',
43 ],
44 'sources': [
[email protected]6cfccd12012-06-28 12:14:0545 'shell/geolocation/shell_access_token_store.cc',
46 'shell/geolocation/shell_access_token_store.h',
[email protected]cccb5cf2012-06-06 22:20:0447 'shell/layout_test_controller.cc',
48 'shell/layout_test_controller.h',
[email protected]74830f02012-01-30 22:27:0449 'shell/layout_test_controller_bindings.cc',
50 'shell/layout_test_controller_bindings.h',
[email protected]cccb5cf2012-06-06 22:20:0451 'shell/layout_test_controller_host.cc',
52 'shell/layout_test_controller_host.h',
[email protected]e1aff172012-03-22 22:41:1753 'shell/paths_mac.h',
54 'shell/paths_mac.mm',
[email protected]9fbd3f862011-09-20 23:31:3455 'shell/shell.cc',
56 'shell/shell.h',
[email protected]a08029b42012-04-25 03:18:4657 'shell/shell_android.cc',
[email protected]fa4a45832012-04-12 21:32:4858 'shell/shell_aura.cc',
[email protected]9fbd3f862011-09-20 23:31:3459 'shell/shell_gtk.cc',
60 'shell/shell_mac.mm',
61 'shell/shell_win.cc',
[email protected]c4e78d72012-03-24 22:55:4162 'shell/shell_application_mac.h',
63 'shell/shell_application_mac.mm',
[email protected]b0f146f2011-09-15 22:14:2564 'shell/shell_browser_context.cc',
65 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3666 'shell/shell_browser_main.cc',
67 'shell/shell_browser_main.h',
[email protected]147f8092012-03-21 11:47:4568 'shell/shell_browser_main_parts.cc',
69 'shell/shell_browser_main_parts.h',
70 'shell/shell_browser_main_parts_mac.mm',
[email protected]5629e0c2011-09-12 22:07:3671 'shell/shell_content_browser_client.cc',
72 'shell/shell_content_browser_client.h',
73 'shell/shell_content_client.cc',
74 'shell/shell_content_client.h',
[email protected]5629e0c2011-09-12 22:07:3675 'shell/shell_content_renderer_client.cc',
76 'shell/shell_content_renderer_client.h',
[email protected]ee75b8992012-01-27 07:53:5777 'shell/shell_devtools_delegate.cc',
[email protected]689266d2012-08-07 12:52:2078 'shell/shell_devtools_delegate_android.cc',
[email protected]ee75b8992012-01-27 07:53:5779 'shell/shell_devtools_delegate.h',
[email protected]98d6f152011-09-29 19:35:5180 'shell/shell_download_manager_delegate.cc',
81 'shell/shell_download_manager_delegate.h',
[email protected]f2210022012-03-29 00:36:0882 'shell/shell_javascript_dialog_creator.cc',
83 'shell/shell_javascript_dialog_creator.h',
[email protected]fc4f4dd42012-07-30 20:52:4884 'shell/shell_javascript_dialog_gtk.cc',
[email protected]f2210022012-03-29 00:36:0885 'shell/shell_javascript_dialog_mac.mm',
[email protected]7fc83822012-03-30 19:53:2986 'shell/shell_javascript_dialog_win.cc',
[email protected]f2210022012-03-29 00:36:0887 'shell/shell_javascript_dialog.h',
[email protected]e6fbecf22012-08-01 10:11:0388 'shell/shell_login_dialog_gtk.cc',
[email protected]e3503ac2012-04-05 15:01:3689 'shell/shell_login_dialog_mac.mm',
90 'shell/shell_login_dialog.cc',
91 'shell/shell_login_dialog.h',
[email protected]c1f87b22011-10-05 21:59:3392 'shell/shell_main_delegate.cc',
93 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3394 'shell/shell_messages.cc',
95 'shell/shell_messages.h',
[email protected]33bc2832012-03-29 08:18:1796 'shell/shell_network_delegate.cc',
97 'shell/shell_network_delegate.h',
[email protected]74830f02012-01-30 22:27:0498 'shell/shell_render_process_observer.cc',
99 'shell/shell_render_process_observer.h',
[email protected]c5f1e332011-09-27 01:08:03100 'shell/shell_resource_context.cc',
101 'shell/shell_resource_context.h',
[email protected]e3503ac2012-04-05 15:01:36102 'shell/shell_resource_dispatcher_host_delegate.cc',
103 'shell/shell_resource_dispatcher_host_delegate.h',
[email protected]efb5f572012-01-29 10:57:33104 'shell/shell_switches.cc',
105 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:03106 'shell/shell_url_request_context_getter.cc',
107 'shell/shell_url_request_context_getter.h',
[email protected]5629e0c2011-09-12 22:07:36108 ],
109 'msvs_settings': {
110 'VCLinkerTool': {
111 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
112 },
113 },
114 'conditions': [
115 ['OS=="win" and win_use_allocator_shim==1', {
116 'dependencies': [
117 '../base/allocator/allocator.gyp:allocator',
118 ],
119 }],
[email protected]9fbd3f862011-09-20 23:31:34120 ['OS=="win"', {
121 'resource_include_dirs': [
122 '<(SHARED_INTERMEDIATE_DIR)/webkit',
123 ],
[email protected]9fbd3f862011-09-20 23:31:34124 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34125 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
126 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
127 ],
128 'configurations': {
129 'Debug_Base': {
130 'msvs_settings': {
131 'VCLinkerTool': {
132 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
133 },
134 },
135 },
136 },
[email protected]85ff16042012-03-06 23:46:34137 }], # OS=="win"
[email protected]689266d2012-08-07 12:52:20138 ['OS=="android"', {
[email protected]82e9e2b12012-07-19 00:32:01139 'dependencies': [
140 'content_shell_jni_headers',
141 ],
142 'include_dirs': [
143 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
144 ],
[email protected]689266d2012-08-07 12:52:20145 'sources!': [
146 'shell/shell_devtools_delegate.cc',
147 ],
148 }, { # else: OS!="android"
149 'dependencies': [
150 # This dependency is for running DRT against the content shell, and
151 # this combination is not yet supported on Android.
152 '../webkit/support/webkit_support.gyp:webkit_support',
153 ],
[email protected]82e9e2b12012-07-19 00:32:01154 }], # OS=="android"
[email protected]c767d572012-07-27 10:55:58155 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
156 'dependencies': [
157 # This is needed by content/app/content_main_runner.cc
158 '../base/allocator/allocator.gyp:allocator',
159 ],
160 }],
[email protected]fa4a45832012-04-12 21:32:48161 ['use_aura==1', {
[email protected]c767d572012-07-27 10:55:58162 'dependencies': [
163 '../ui/aura/aura.gyp:aura',
164 '../ui/base/strings/ui_strings.gyp:ui_strings',
165 '../ui/views/views.gyp:views',
166 '../ui/ui.gyp:ui_resources',
167 ],
[email protected]fa4a45832012-04-12 21:32:48168 'sources/': [
169 ['exclude', 'shell/shell_gtk.cc'],
170 ['exclude', 'shell/shell_win.cc'],
171 ],
[email protected]96b80b472012-07-03 19:41:56172 }], # use_aura==1
[email protected]c767d572012-07-27 10:55:58173 ['chromeos==1', {
174 'dependencies': [
175 '../chromeos/chromeos.gyp:chromeos',
176 ],
177 }], # chromeos==1
[email protected]96b80b472012-07-03 19:41:56178 ['inside_chromium_build==0 or component!="shared_library"', {
179 'dependencies': [
180 '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
181 '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf',
182 ],
183 'include_dirs': [
184 # Required for WebTestingSupport.cpp to find our custom config.h.
185 'shell/',
186 '<(webkit_src_dir)/Source/WebKit/chromium/public',
187 # WARNING: Do not view this particular case as a precedent for
188 # including WebCore headers in the content shell.
189 '<(webkit_src_dir)/Source/WebCore/testing/v8', # for WebCoreTestSupport.h needed to link in window.internals code.
190 ],
191 'sources': [
192 'shell/config.h',
193 '<(webkit_src_dir)/Source/WebKit/chromium/src/WebTestingSupport.cpp',
194 '<(webkit_src_dir)/Source/WebKit/chromium/public/WebTestingSupport.h',
195 ],
[email protected]fa4a45832012-04-12 21:32:48196 }],
[email protected]5629e0c2011-09-12 22:07:36197 ],
198 },
[email protected]c1f87b22011-10-05 21:59:33199 {
[email protected]ee75b8992012-01-27 07:53:57200 'target_name': 'content_shell_resources',
201 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46202 'dependencies': [
203 'generate_content_shell_resources',
204 ],
205 'variables': {
206 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
207 },
208 'includes': [ '../build/grit_target.gypi' ],
209 'copies': [
210 {
211 'destination': '<(PRODUCT_DIR)',
212 'files': [
213 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
214 ],
215 },
216 ],
[email protected]4cb792f42012-03-24 03:12:42217 },
218 {
[email protected]b581eb402012-03-09 01:31:46219 'target_name': 'generate_content_shell_resources',
220 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57221 'variables': {
222 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
223 },
224 'actions': [
225 {
226 'action_name': 'content_shell_resources',
227 'variables': {
228 'grit_grd_file': 'shell/shell_resources.grd',
229 },
230 'includes': [ '../build/grit_action.gypi' ],
231 },
232 ],
[email protected]ee75b8992012-01-27 07:53:57233 },
234 {
[email protected]81f30ce2012-01-18 22:10:33235 # We build a minimal set of resources so WebKit in content_shell has
236 # access to necessary resources.
237 'target_name': 'content_shell_pak',
238 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57239 'dependencies': [
240 'browser/debugger/devtools_resources.gyp:devtools_resources',
241 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45242 '<(DEPTH)/net/net.gyp:net_resources',
243 '<(DEPTH)/ui/ui.gyp:ui_resources',
[email protected]ee75b8992012-01-27 07:53:57244 ],
[email protected]81f30ce2012-01-18 22:10:33245 'variables': {
246 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
247 },
248 'actions': [
249 {
250 'action_name': 'repack_content_shell_pack',
251 'variables': {
252 'pak_inputs': [
253 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57254 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33255 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
[email protected]c767d572012-07-27 10:55:58256 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
[email protected]a52c7312012-07-24 22:45:57257 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
[email protected]c767d572012-07-27 10:55:58258 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
[email protected]ee75b8992012-01-27 07:53:57259 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33260 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
261 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
[email protected]af551a62012-07-31 16:44:03262 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
[email protected]81f30ce2012-01-18 22:10:33263 ],
[email protected]81f30ce2012-01-18 22:10:33264 },
265 'inputs': [
266 '<(repack_path)',
267 '<@(pak_inputs)',
268 ],
[email protected]81f30ce2012-01-18 22:10:33269 'action': ['python', '<(repack_path)', '<@(_outputs)',
270 '<@(pak_inputs)'],
[email protected]a08029b42012-04-25 03:18:46271 'conditions': [
272 ['OS!="android"', {
273 'outputs': [
274 '<(PRODUCT_DIR)/content_shell.pak',
275 ],
276 }, {
277 'outputs': [
278 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
279 ],
280 }],
281 ],
[email protected]81f30ce2012-01-18 22:10:33282 },
283 ],
284 },
285 {
[email protected]c1f87b22011-10-05 21:59:33286 'target_name': 'content_shell',
287 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34288 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33289 'defines!': ['CONTENT_IMPLEMENTATION'],
290 'variables': {
291 'chromium_code': 1,
292 },
293 'dependencies': [
294 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33295 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33296 ],
297 'include_dirs': [
298 '..',
299 ],
300 'sources': [
[email protected]711f428e2012-06-22 02:18:23301 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33302 'shell/shell_main.cc',
303 ],
[email protected]85ff16042012-03-06 23:46:34304 'mac_bundle_resources': [
305 'shell/mac/app.icns',
306 'shell/mac/app-Info.plist',
307 ],
308 # TODO(mark): Come up with a fancier way to do this. It should only
309 # be necessary to list app-Info.plist once, not the three times it is
310 # listed here.
311 'mac_bundle_resources!': [
312 'shell/mac/app-Info.plist',
313 ],
314 'xcode_settings': {
315 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
316 },
[email protected]c1f87b22011-10-05 21:59:33317 'msvs_settings': {
318 'VCLinkerTool': {
319 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
320 },
321 },
322 'conditions': [
323 ['OS=="win" and win_use_allocator_shim==1', {
324 'dependencies': [
325 '../base/allocator/allocator.gyp:allocator',
326 ],
327 }],
328 ['OS=="win"', {
[email protected]7fc83822012-03-30 19:53:29329 'sources': [
330 'shell/shell.rc',
331 ],
[email protected]c1f87b22011-10-05 21:59:33332 'configurations': {
333 'Debug_Base': {
334 'msvs_settings': {
335 'VCLinkerTool': {
336 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
337 },
338 },
339 },
340 },
[email protected]85ff16042012-03-06 23:46:34341 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12342 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
343 'dependencies': [
344 '../sandbox/sandbox.gyp:sandbox',
345 ],
[email protected]85ff16042012-03-06 23:46:34346 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58347 ['toolkit_uses_gtk == 1', {
348 'dependencies': [
349 '<(DEPTH)/build/linux/system.gyp:gtk',
350 ],
[email protected]85ff16042012-03-06 23:46:34351 }], # toolkit_uses_gtk
352 ['OS=="mac"', {
353 'product_name': '<(content_shell_product_name)',
354 'dependencies!': [
355 'content_shell_lib',
356 ],
357 'dependencies': [
358 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10359 'content_shell_helper_app',
360 ],
361 'copies': [
362 {
363 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
364 'files': [
365 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
366 ],
367 },
[email protected]85ff16042012-03-06 23:46:34368 ],
369 'postbuilds': [
370 {
371 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
372 'action': [
373 '../build/mac/copy_framework_unversioned.sh',
374 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
375 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
376 ],
377 },
378 {
379 'postbuild_name': 'Fix Framework Link',
380 'action': [
381 'install_name_tool',
382 '-change',
383 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
384 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
385 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
386 ],
387 },
388 {
389 # Modify the Info.plist as needed.
390 'postbuild_name': 'Tweak Info.plist',
391 'action': ['../build/mac/tweak_info_plist.py',
[email protected]8fcde31f62012-03-07 06:25:17392 '--svn=1'],
[email protected]85ff16042012-03-06 23:46:34393 },
394 {
[email protected]180df8f2012-03-09 22:36:10395 # This postbuid step is responsible for creating the following
396 # helpers:
397 #
398 # Content Shell Helper EH.app and Content Shell Helper NP.app are
399 # created from Content Shell Helper.app.
400 #
401 # The EH helper is marked for an executable heap. The NP helper
402 # is marked for no PIE (ASLR).
403 'postbuild_name': 'Make More Helpers',
404 'action': [
405 '../build/mac/make_more_helpers.sh',
406 'Frameworks',
407 '<(content_shell_product_name)',
408 ],
409 },
410 {
[email protected]85ff16042012-03-06 23:46:34411 # Make sure there isn't any Objective-C in the shell's
412 # executable.
413 'postbuild_name': 'Verify No Objective-C',
414 'action': [
415 '../build/mac/verify_no_objc.sh',
416 ],
417 },
418 ],
419 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33420 ],
421 },
[email protected]5629e0c2011-09-12 22:07:36422 ],
[email protected]85ff16042012-03-06 23:46:34423 'conditions': [
424 ['OS=="mac"', {
425 'targets': [
426 {
427 'target_name': 'content_shell_framework',
428 'type': 'shared_library',
429 'product_name': '<(content_shell_product_name) Framework',
430 'mac_bundle': 1,
431 'mac_bundle_resources': [
[email protected]e3503ac2012-04-05 15:01:36432 'shell/mac/English.lproj/HttpAuth.xib',
[email protected]85ff16042012-03-06 23:46:34433 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42434 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34435 ],
436 'dependencies': [
437 'content_shell_lib',
438 ],
439 'include_dirs': [
440 '..',
441 ],
442 'sources': [
443 'shell/shell_content_main.cc',
444 'shell/shell_content_main.h',
445 ],
[email protected]5d96bbe2012-07-25 17:13:23446 'copies': [
447 {
448 # Copy FFmpeg binaries for audio/video support.
449 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
450 'files': [
451 '<(PRODUCT_DIR)/ffmpegsumo.so',
452 ],
453 },
454 ],
[email protected]180df8f2012-03-09 22:36:10455 }, # target content_shell_framework
456 {
457 'target_name': 'content_shell_helper_app',
458 'type': 'executable',
459 'variables': { 'enable_wexit_time_destructors': 1, },
460 'product_name': '<(content_shell_product_name) Helper',
461 'mac_bundle': 1,
462 'dependencies': [
463 'content_shell_framework',
464 ],
465 'sources': [
466 'shell/shell_main.cc',
467 'shell/mac/helper-Info.plist',
468 ],
469 # TODO(mark): Come up with a fancier way to do this. It should only
470 # be necessary to list helper-Info.plist once, not the three times it
471 # is listed here.
472 'mac_bundle_resources!': [
473 'shell/mac/helper-Info.plist',
474 ],
475 # TODO(mark): For now, don't put any resources into this app. Its
476 # resources directory will be a symbolic link to the browser app's
477 # resources directory.
478 'mac_bundle_resources/': [
479 ['exclude', '.*'],
480 ],
481 'xcode_settings': {
482 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
483 },
484 'postbuilds': [
485 {
486 # The framework defines its load-time path
487 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
488 # (chrome). A different relative path needs to be used in
489 # content_shell_helper_app.
490 'postbuild_name': 'Fix Framework Link',
491 'action': [
492 'install_name_tool',
493 '-change',
494 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
495 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
496 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
497 ],
498 },
499 {
500 # Modify the Info.plist as needed. The script explains why this
501 # is needed. This is also done in the chrome and chrome_dll
502 # targets. In this case, --breakpad=0, --keystone=0, and --svn=0
503 # are used because Breakpad, Keystone, and Subversion keys are
504 # never placed into the helper.
505 'postbuild_name': 'Tweak Info.plist',
506 'action': ['../build/mac/tweak_info_plist.py',
507 '--breakpad=0',
508 '--keystone=0',
509 '--svn=0'],
510 },
511 {
512 # Make sure there isn't any Objective-C in the helper app's
513 # executable.
514 'postbuild_name': 'Verify No Objective-C',
515 'action': [
516 '../build/mac/verify_no_objc.sh',
517 ],
518 },
519 ],
[email protected]ec40c38f2012-06-28 16:37:49520 'conditions': [
521 ['component=="shared_library"', {
522 'xcode_settings': {
523 'LD_RUNPATH_SEARCH_PATHS': [
524 # Get back from Content Shell.app/Contents/Frameworks/
525 # Helper.app/Contents/MacOS
526 '@loader_path/../../../../../..',
527 ],
528 },
529 }],
530 ],
[email protected]180df8f2012-03-09 22:36:10531 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34532 ],
533 }], # OS=="mac"
[email protected]cc66d282012-03-30 11:44:06534 ['OS=="android"', {
535 'targets': [
536 {
[email protected]a08029b42012-04-25 03:18:46537 # TODO(jrg): Update this action and other jni generators to only
538 # require specifying the java directory and generate the rest.
539 'target_name': 'content_shell_jni_headers',
540 'type': 'none',
[email protected]e46f66152012-07-19 20:02:55541 'sources': [
542 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
543 'shell/android/java/src/org/chromium/content_shell/Shell.java',
544 ],
[email protected]a08029b42012-04-25 03:18:46545 'variables': {
[email protected]e46f66152012-07-19 20:02:55546 'jni_gen_dir': 'content/shell',
[email protected]a08029b42012-04-25 03:18:46547 },
548 'includes': [ '../build/jni_generator.gypi' ],
549 },
550 {
[email protected]c1101582012-06-25 17:07:18551 'target_name': 'libcontent_shell_content_view',
[email protected]a08029b42012-04-25 03:18:46552 'type': 'shared_library',
553 'dependencies': [
554 'content_shell_jni_headers',
555 'content_shell_lib',
556 'content_shell_pak',
557 # Skia is necessary to ensure the dependencies needed by
558 # WebContents are included.
559 '../skia/skia.gyp:skia',
560 '<(DEPTH)/media/media.gyp:player_android',
561 ],
562 'include_dirs': [
563 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
564 ],
565 'sources': [
[email protected]7436acd32012-08-01 18:25:37566 'shell/android/draw_context.cc',
567 'shell/android/draw_context.h',
[email protected]a08029b42012-04-25 03:18:46568 'shell/android/shell_library_loader.cc',
569 'shell/android/shell_library_loader.h',
570 'shell/android/shell_manager.cc',
571 'shell/android/shell_manager.h',
[email protected]a08029b42012-04-25 03:18:46572 ],
[email protected]f83a47392012-07-12 22:15:04573 'sources!': [
574 'shell/shell_main.cc',
575 'shell/shell_main.h',
576 ],
[email protected]7abcaa82012-06-27 17:09:48577 'conditions': [
578 ['android_build_type==1', {
579 'ldflags': [
580 '-lgabi++', # For rtti
581 ],
582 }],
583 ],
[email protected]a08029b42012-04-25 03:18:46584 },
585 {
[email protected]cc66d282012-03-30 11:44:06586 'target_name': 'content_shell_apk',
587 'type': 'none',
588 'actions': [
589 {
[email protected]a08029b42012-04-25 03:18:46590 'action_name': 'copy_base_jar',
[email protected]e0825562012-05-10 01:50:47591 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'],
[email protected]a08029b42012-04-25 03:18:46592 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar'],
593 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
594 },
595 {
[email protected]e0825562012-05-10 01:50:47596 'action_name': 'copy_net_jar',
597 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'],
598 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar'],
599 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
600 },
601 {
602 'action_name': 'copy_media_jar',
603 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'],
604 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar'],
605 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
606 },
607 {
[email protected]a08029b42012-04-25 03:18:46608 'action_name': 'copy_content_jar',
[email protected]e0825562012-05-10 01:50:47609 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'],
[email protected]a08029b42012-04-25 03:18:46610 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar'],
611 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
612 },
613 {
[email protected]9c320642012-05-07 16:25:57614 'action_name': 'copy_and_strip_so',
[email protected]73919ea2012-04-26 00:48:41615 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
[email protected]de5b7a42012-05-16 06:18:41616 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'],
[email protected]9c320642012-05-07 16:25:57617 'action': [
618 '<!(/bin/echo -n $STRIP)',
619 '--strip-unneeded', # All symbols not needed for relocation.
620 '<@(_inputs)',
621 '-o',
[email protected]c9a433d2012-07-12 20:28:45622 '<@(_outputs)',
[email protected]9c320642012-05-07 16:25:57623 ],
[email protected]73919ea2012-04-26 00:48:41624 },
625 {
[email protected]cc66d282012-03-30 11:44:06626 'action_name': 'content_shell_apk',
627 'inputs': [
[email protected]19bbc472012-07-14 13:33:34628 'shell/android/java/content_shell_apk.xml',
629 'shell/android/java/AndroidManifest.xml',
[email protected]cc66d282012-03-30 11:44:06630 '<!@(find shell/android/java -name "*.java")',
[email protected]a08029b42012-04-25 03:18:46631 '<!@(find shell/android/res -name "*")',
632 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar',
[email protected]e0825562012-05-10 01:50:47633 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar',
634 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar',
[email protected]a08029b42012-04-25 03:18:46635 '<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar',
[email protected]f83a47392012-07-12 22:15:04636 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
[email protected]de5b7a42012-05-16 06:18:41637 '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so',
[email protected]cc66d282012-03-30 11:44:06638 ],
639 'outputs': [
640 # Awkwardly, we build a Debug APK even when gyp is in
641 # Release mode. I don't think it matters (e.g. we're
642 # probably happy to not codesign) but naming should be
643 # fixed.
[email protected]c9a433d2012-07-12 20:28:45644 '<(PRODUCT_DIR)/content_shell/ContentShell-debug.apk',
[email protected]cc66d282012-03-30 11:44:06645 ],
646 'action': [
[email protected]19bbc472012-07-14 13:33:34647 # Pass the build type to ant. Currently it only assumes
648 # debug mode in java. Release mode will break the current
649 # workflow.
[email protected]f4cab6a2012-08-07 06:54:27650 'shell/content_shell_ant_helper.sh',
[email protected]cc66d282012-03-30 11:44:06651 'ant',
[email protected]ef7ed7a2012-05-29 23:19:13652 '-DPRODUCT_DIR=<(ant_build_out)',
[email protected]de5b7a42012-05-16 06:18:41653 '-DAPP_ABI=<(android_app_abi)',
[email protected]300800482012-08-06 23:23:51654 '-DANDROID_SDK=<(android_sdk)',
655 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
656 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
657 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
658 '-DANDROID_TOOLCHAIN=<(android_toolchain)',
[email protected]cc66d282012-03-30 11:44:06659 '-buildfile',
[email protected]19bbc472012-07-14 13:33:34660 'shell/android/java/content_shell_apk.xml',
[email protected]f4cab6a2012-08-07 06:54:27661 '<(CONFIGURATION_NAME)',
[email protected]ad1a7382012-08-01 00:43:46662 ],
663 'dependencies': [
664 'content_java',
665 ],
[email protected]cc66d282012-03-30 11:44:06666 }
667 ],
668 },
669 ],
670 }], # OS=="android"
671 ]
[email protected]5629e0c2011-09-12 22:07:36672}