blob: 49fdafbf6df20209fa47d5f4bab9e59da0980b57 [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]97efb8e2011-10-04 17:16:1636 '../third_party/WebKit/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]aa6e79762011-09-29 20:53:5239 '../webkit/support/webkit_support.gyp:appcache',
40 '../webkit/support/webkit_support.gyp:database',
41 '../webkit/support/webkit_support.gyp:fileapi',
42 '../webkit/support/webkit_support.gyp:glue',
43 '../webkit/support/webkit_support.gyp:quota',
[email protected]147f8092012-03-21 11:47:4544 '../webkit/support/webkit_support.gyp:webkit_support',
[email protected]5629e0c2011-09-12 22:07:3645 ],
46 'include_dirs': [
47 '..',
48 ],
49 'sources': [
[email protected]74830f02012-01-30 22:27:0450 'shell/layout_test_controller_bindings.cc',
51 'shell/layout_test_controller_bindings.h',
[email protected]e1aff172012-03-22 22:41:1752 'shell/paths_mac.h',
53 'shell/paths_mac.mm',
[email protected]9fbd3f862011-09-20 23:31:3454 'shell/shell.cc',
55 'shell/shell.h',
56 'shell/shell_gtk.cc',
57 'shell/shell_mac.mm',
58 'shell/shell_win.cc',
[email protected]c4e78d72012-03-24 22:55:4159 'shell/shell_application_mac.h',
60 'shell/shell_application_mac.mm',
[email protected]b0f146f2011-09-15 22:14:2561 'shell/shell_browser_context.cc',
62 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3663 'shell/shell_browser_main.cc',
64 'shell/shell_browser_main.h',
[email protected]147f8092012-03-21 11:47:4565 'shell/shell_browser_main_parts.cc',
66 'shell/shell_browser_main_parts.h',
67 'shell/shell_browser_main_parts_mac.mm',
[email protected]5629e0c2011-09-12 22:07:3668 'shell/shell_content_browser_client.cc',
69 'shell/shell_content_browser_client.h',
70 'shell/shell_content_client.cc',
71 'shell/shell_content_client.h',
72 'shell/shell_content_plugin_client.cc',
73 'shell/shell_content_plugin_client.h',
74 'shell/shell_content_renderer_client.cc',
75 'shell/shell_content_renderer_client.h',
76 'shell/shell_content_utility_client.cc',
77 'shell/shell_content_utility_client.h',
[email protected]ee75b8992012-01-27 07:53:5778 'shell/shell_devtools_delegate.cc',
79 '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',
84 'shell/shell_javascript_dialog_mac.mm',
85 'shell/shell_javascript_dialog.h',
[email protected]c1f87b22011-10-05 21:59:3386 'shell/shell_main_delegate.cc',
87 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3388 'shell/shell_messages.cc',
89 'shell/shell_messages.h',
[email protected]74830f02012-01-30 22:27:0490 'shell/shell_render_process_observer.cc',
91 'shell/shell_render_process_observer.h',
[email protected]efb5f572012-01-29 10:57:3392 'shell/shell_render_view_host_observer.cc',
93 'shell/shell_render_view_host_observer.h',
[email protected]31d71b02012-01-26 03:42:3194 'shell/shell_render_view_observer.cc',
95 'shell/shell_render_view_observer.h',
[email protected]c5f1e332011-09-27 01:08:0396 'shell/shell_resource_context.cc',
97 'shell/shell_resource_context.h',
[email protected]efb5f572012-01-29 10:57:3398 'shell/shell_switches.cc',
99 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:03100 'shell/shell_url_request_context_getter.cc',
101 'shell/shell_url_request_context_getter.h',
[email protected]5629e0c2011-09-12 22:07:36102 ],
103 'msvs_settings': {
104 'VCLinkerTool': {
105 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
106 },
107 },
108 'conditions': [
109 ['OS=="win" and win_use_allocator_shim==1', {
110 'dependencies': [
111 '../base/allocator/allocator.gyp:allocator',
112 ],
113 }],
[email protected]9fbd3f862011-09-20 23:31:34114 ['OS=="win"', {
115 'resource_include_dirs': [
116 '<(SHARED_INTERMEDIATE_DIR)/webkit',
117 ],
[email protected]9fbd3f862011-09-20 23:31:34118 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34119 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
120 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
121 ],
122 'configurations': {
123 'Debug_Base': {
124 'msvs_settings': {
125 'VCLinkerTool': {
126 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
127 },
128 },
129 },
130 },
[email protected]85ff16042012-03-06 23:46:34131 }], # OS=="win"
[email protected]5629e0c2011-09-12 22:07:36132 ],
133 },
[email protected]c1f87b22011-10-05 21:59:33134 {
[email protected]ee75b8992012-01-27 07:53:57135 'target_name': 'content_shell_resources',
136 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46137 'dependencies': [
138 'generate_content_shell_resources',
139 ],
140 'variables': {
141 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
142 },
143 'includes': [ '../build/grit_target.gypi' ],
144 'copies': [
145 {
146 'destination': '<(PRODUCT_DIR)',
147 'files': [
148 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
149 ],
150 },
151 ],
[email protected]4cb792f42012-03-24 03:12:42152 },
153 {
[email protected]b581eb402012-03-09 01:31:46154 'target_name': 'generate_content_shell_resources',
155 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57156 'variables': {
157 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
158 },
159 'actions': [
160 {
161 'action_name': 'content_shell_resources',
162 'variables': {
163 'grit_grd_file': 'shell/shell_resources.grd',
164 },
165 'includes': [ '../build/grit_action.gypi' ],
166 },
167 ],
[email protected]ee75b8992012-01-27 07:53:57168 },
169 {
[email protected]81f30ce2012-01-18 22:10:33170 # We build a minimal set of resources so WebKit in content_shell has
171 # access to necessary resources.
172 'target_name': 'content_shell_pak',
173 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57174 'dependencies': [
175 'browser/debugger/devtools_resources.gyp:devtools_resources',
176 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45177 '<(DEPTH)/net/net.gyp:net_resources',
178 '<(DEPTH)/ui/ui.gyp:ui_resources',
179 '<(DEPTH)/ui/ui.gyp:ui_resources_standard',
[email protected]ee75b8992012-01-27 07:53:57180 ],
[email protected]81f30ce2012-01-18 22:10:33181 'variables': {
182 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
183 },
184 'actions': [
185 {
186 'action_name': 'repack_content_shell_pack',
187 'variables': {
188 'pak_inputs': [
189 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57190 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33191 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
192 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak',
193 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
[email protected]ee75b8992012-01-27 07:53:57194 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33195 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
196 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
197 ],
198 'conditions': [
199 ['OS != "mac"', {
200 'pak_inputs': [
201 '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
202 ]
203 }],
204 ],
205 },
206 'inputs': [
207 '<(repack_path)',
208 '<@(pak_inputs)',
209 ],
210 'outputs': [
211 '<(PRODUCT_DIR)/content_shell.pak',
212 ],
213 'action': ['python', '<(repack_path)', '<@(_outputs)',
214 '<@(pak_inputs)'],
215 },
216 ],
217 },
218 {
[email protected]c1f87b22011-10-05 21:59:33219 'target_name': 'content_shell',
220 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34221 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33222 'defines!': ['CONTENT_IMPLEMENTATION'],
223 'variables': {
224 'chromium_code': 1,
225 },
226 'dependencies': [
227 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33228 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33229 ],
230 'include_dirs': [
231 '..',
232 ],
233 'sources': [
[email protected]27315ce42011-10-14 01:25:12234 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33235 'shell/shell_main.cc',
236 ],
[email protected]85ff16042012-03-06 23:46:34237 'mac_bundle_resources': [
238 'shell/mac/app.icns',
239 'shell/mac/app-Info.plist',
240 ],
241 # TODO(mark): Come up with a fancier way to do this. It should only
242 # be necessary to list app-Info.plist once, not the three times it is
243 # listed here.
244 'mac_bundle_resources!': [
245 'shell/mac/app-Info.plist',
246 ],
247 'xcode_settings': {
248 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
249 },
[email protected]c1f87b22011-10-05 21:59:33250 'msvs_settings': {
251 'VCLinkerTool': {
252 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
253 },
254 },
255 'conditions': [
256 ['OS=="win" and win_use_allocator_shim==1', {
257 'dependencies': [
258 '../base/allocator/allocator.gyp:allocator',
259 ],
260 }],
261 ['OS=="win"', {
262 'configurations': {
263 'Debug_Base': {
264 'msvs_settings': {
265 'VCLinkerTool': {
266 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
267 },
268 },
269 },
270 },
[email protected]85ff16042012-03-06 23:46:34271 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12272 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
273 'dependencies': [
274 '../sandbox/sandbox.gyp:sandbox',
275 ],
[email protected]85ff16042012-03-06 23:46:34276 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58277 ['toolkit_uses_gtk == 1', {
278 'dependencies': [
279 '<(DEPTH)/build/linux/system.gyp:gtk',
280 ],
[email protected]85ff16042012-03-06 23:46:34281 }], # toolkit_uses_gtk
282 ['OS=="mac"', {
283 'product_name': '<(content_shell_product_name)',
284 'dependencies!': [
285 'content_shell_lib',
286 ],
287 'dependencies': [
288 'content_shell_framework',
[email protected]180df8f2012-03-09 22:36:10289 'content_shell_helper_app',
290 ],
291 'copies': [
292 {
293 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
294 'files': [
295 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
296 ],
297 },
[email protected]85ff16042012-03-06 23:46:34298 ],
299 'postbuilds': [
300 {
301 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
302 'action': [
303 '../build/mac/copy_framework_unversioned.sh',
304 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
305 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
306 ],
307 },
308 {
309 'postbuild_name': 'Fix Framework Link',
310 'action': [
311 'install_name_tool',
312 '-change',
313 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
314 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
315 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
316 ],
317 },
318 {
319 # Modify the Info.plist as needed.
320 'postbuild_name': 'Tweak Info.plist',
321 'action': ['../build/mac/tweak_info_plist.py',
[email protected]8fcde31f62012-03-07 06:25:17322 '--svn=1'],
[email protected]85ff16042012-03-06 23:46:34323 },
324 {
[email protected]180df8f2012-03-09 22:36:10325 # This postbuid step is responsible for creating the following
326 # helpers:
327 #
328 # Content Shell Helper EH.app and Content Shell Helper NP.app are
329 # created from Content Shell Helper.app.
330 #
331 # The EH helper is marked for an executable heap. The NP helper
332 # is marked for no PIE (ASLR).
333 'postbuild_name': 'Make More Helpers',
334 'action': [
335 '../build/mac/make_more_helpers.sh',
336 'Frameworks',
337 '<(content_shell_product_name)',
338 ],
339 },
340 {
[email protected]85ff16042012-03-06 23:46:34341 # Make sure there isn't any Objective-C in the shell's
342 # executable.
343 'postbuild_name': 'Verify No Objective-C',
344 'action': [
345 '../build/mac/verify_no_objc.sh',
346 ],
347 },
348 ],
349 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33350 ],
351 },
[email protected]5629e0c2011-09-12 22:07:36352 ],
[email protected]85ff16042012-03-06 23:46:34353 'conditions': [
354 ['OS=="mac"', {
355 'targets': [
356 {
357 'target_name': 'content_shell_framework',
358 'type': 'shared_library',
359 'product_name': '<(content_shell_product_name) Framework',
360 'mac_bundle': 1,
361 'mac_bundle_resources': [
362 'shell/mac/English.lproj/MainMenu.xib',
[email protected]4cb792f42012-03-24 03:12:42363 '<(PRODUCT_DIR)/content_shell.pak'
[email protected]85ff16042012-03-06 23:46:34364 ],
365 'dependencies': [
366 'content_shell_lib',
367 ],
368 'include_dirs': [
369 '..',
370 ],
371 'sources': [
372 'shell/shell_content_main.cc',
373 'shell/shell_content_main.h',
374 ],
[email protected]180df8f2012-03-09 22:36:10375 }, # target content_shell_framework
376 {
377 'target_name': 'content_shell_helper_app',
378 'type': 'executable',
379 'variables': { 'enable_wexit_time_destructors': 1, },
380 'product_name': '<(content_shell_product_name) Helper',
381 'mac_bundle': 1,
382 'dependencies': [
383 'content_shell_framework',
384 ],
385 'sources': [
386 'shell/shell_main.cc',
387 'shell/mac/helper-Info.plist',
388 ],
389 # TODO(mark): Come up with a fancier way to do this. It should only
390 # be necessary to list helper-Info.plist once, not the three times it
391 # is listed here.
392 'mac_bundle_resources!': [
393 'shell/mac/helper-Info.plist',
394 ],
395 # TODO(mark): For now, don't put any resources into this app. Its
396 # resources directory will be a symbolic link to the browser app's
397 # resources directory.
398 'mac_bundle_resources/': [
399 ['exclude', '.*'],
400 ],
401 'xcode_settings': {
402 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
403 },
404 'postbuilds': [
405 {
406 # The framework defines its load-time path
407 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
408 # (chrome). A different relative path needs to be used in
409 # content_shell_helper_app.
410 'postbuild_name': 'Fix Framework Link',
411 'action': [
412 'install_name_tool',
413 '-change',
414 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
415 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
416 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
417 ],
418 },
419 {
420 # Modify the Info.plist as needed. The script explains why this
421 # is needed. This is also done in the chrome and chrome_dll
422 # targets. In this case, --breakpad=0, --keystone=0, and --svn=0
423 # are used because Breakpad, Keystone, and Subversion keys are
424 # never placed into the helper.
425 'postbuild_name': 'Tweak Info.plist',
426 'action': ['../build/mac/tweak_info_plist.py',
427 '--breakpad=0',
428 '--keystone=0',
429 '--svn=0'],
430 },
431 {
432 # Make sure there isn't any Objective-C in the helper app's
433 # executable.
434 'postbuild_name': 'Verify No Objective-C',
435 'action': [
436 '../build/mac/verify_no_objc.sh',
437 ],
438 },
439 ],
440 }, # target content_shell_helper_app
[email protected]85ff16042012-03-06 23:46:34441 ],
442 }], # OS=="mac"
443 ],
[email protected]5629e0c2011-09-12 22:07:36444}