[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 2 | # 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] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 6 | 'variables': { |
| 7 | 'content_shell_product_name': 'Content Shell', |
| 8 | }, |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 9 | 'targets': [ |
| 10 | { |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 11 | 'target_name': 'content_shell_lib', |
| 12 | 'type': 'static_library', |
[email protected] | 03ff5e5 | 2011-09-30 00:28:14 | [diff] [blame] | 13 | 'defines!': ['CONTENT_IMPLEMENTATION'], |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 14 | 'variables': { |
| 15 | 'chromium_code': 1, |
| 16 | }, |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 17 | '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] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 25 | 'content_shell_resources', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 26 | 'content_utility', |
| 27 | 'content_worker', |
[email protected] | 0faa0a2b | 2011-11-15 18:03:14 | [diff] [blame] | 28 | 'content_resources.gyp:content_resources', |
[email protected] | aa6e7976 | 2011-09-29 20:53:52 | [diff] [blame] | 29 | '../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] | 433df47 | 2012-03-07 20:33:39 | [diff] [blame] | 33 | '../media/media.gyp:media', |
[email protected] | aa6e7976 | 2011-09-29 20:53:52 | [diff] [blame] | 34 | '../net/net.gyp:net', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 35 | '../skia/skia.gyp:skia', |
[email protected] | 97efb8e | 2011-10-04 17:16:16 | [diff] [blame] | 36 | '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 37 | '../ui/ui.gyp:ui', |
[email protected] | 12bc28fcb | 2011-09-21 15:53:50 | [diff] [blame] | 38 | '../v8/tools/gyp/v8.gyp:v8', |
[email protected] | aa6e7976 | 2011-09-29 20:53:52 | [diff] [blame] | 39 | '../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] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 44 | ], |
| 45 | 'include_dirs': [ |
| 46 | '..', |
| 47 | ], |
| 48 | 'sources': [ |
[email protected] | 74830f0 | 2012-01-30 22:27:04 | [diff] [blame] | 49 | 'shell/layout_test_controller_bindings.cc', |
| 50 | 'shell/layout_test_controller_bindings.h', |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 51 | 'shell/shell.cc', |
| 52 | 'shell/shell.h', |
| 53 | 'shell/shell_gtk.cc', |
| 54 | 'shell/shell_mac.mm', |
| 55 | 'shell/shell_win.cc', |
[email protected] | b0f146f | 2011-09-15 22:14:25 | [diff] [blame] | 56 | 'shell/shell_browser_context.cc', |
| 57 | 'shell/shell_browser_context.h', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 58 | 'shell/shell_browser_main.cc', |
| 59 | 'shell/shell_browser_main.h', |
| 60 | 'shell/shell_content_browser_client.cc', |
| 61 | 'shell/shell_content_browser_client.h', |
| 62 | 'shell/shell_content_client.cc', |
| 63 | 'shell/shell_content_client.h', |
| 64 | 'shell/shell_content_plugin_client.cc', |
| 65 | 'shell/shell_content_plugin_client.h', |
| 66 | 'shell/shell_content_renderer_client.cc', |
| 67 | 'shell/shell_content_renderer_client.h', |
| 68 | 'shell/shell_content_utility_client.cc', |
| 69 | 'shell/shell_content_utility_client.h', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 70 | 'shell/shell_devtools_delegate.cc', |
| 71 | 'shell/shell_devtools_delegate.h', |
[email protected] | 98d6f15 | 2011-09-29 19:35:51 | [diff] [blame] | 72 | 'shell/shell_download_manager_delegate.cc', |
| 73 | 'shell/shell_download_manager_delegate.h', |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 74 | 'shell/shell_main_delegate.cc', |
| 75 | 'shell/shell_main_delegate.h', |
[email protected] | efb5f57 | 2012-01-29 10:57:33 | [diff] [blame] | 76 | 'shell/shell_messages.cc', |
| 77 | 'shell/shell_messages.h', |
[email protected] | 74830f0 | 2012-01-30 22:27:04 | [diff] [blame] | 78 | 'shell/shell_render_process_observer.cc', |
| 79 | 'shell/shell_render_process_observer.h', |
[email protected] | efb5f57 | 2012-01-29 10:57:33 | [diff] [blame] | 80 | 'shell/shell_render_view_host_observer.cc', |
| 81 | 'shell/shell_render_view_host_observer.h', |
[email protected] | 31d71b0 | 2012-01-26 03:42:31 | [diff] [blame] | 82 | 'shell/shell_render_view_observer.cc', |
| 83 | 'shell/shell_render_view_observer.h', |
[email protected] | c5f1e33 | 2011-09-27 01:08:03 | [diff] [blame] | 84 | 'shell/shell_resource_context.cc', |
| 85 | 'shell/shell_resource_context.h', |
[email protected] | efb5f57 | 2012-01-29 10:57:33 | [diff] [blame] | 86 | 'shell/shell_switches.cc', |
| 87 | 'shell/shell_switches.h', |
[email protected] | c5f1e33 | 2011-09-27 01:08:03 | [diff] [blame] | 88 | 'shell/shell_url_request_context_getter.cc', |
| 89 | 'shell/shell_url_request_context_getter.h', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 90 | ], |
| 91 | 'msvs_settings': { |
| 92 | 'VCLinkerTool': { |
| 93 | 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 94 | }, |
| 95 | }, |
| 96 | 'conditions': [ |
| 97 | ['OS=="win" and win_use_allocator_shim==1', { |
| 98 | 'dependencies': [ |
| 99 | '../base/allocator/allocator.gyp:allocator', |
| 100 | ], |
| 101 | }], |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 102 | ['OS=="win"', { |
| 103 | 'resource_include_dirs': [ |
| 104 | '<(SHARED_INTERMEDIATE_DIR)/webkit', |
| 105 | ], |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 106 | 'dependencies': [ |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 107 | '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', |
| 108 | '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', |
| 109 | ], |
| 110 | 'configurations': { |
| 111 | 'Debug_Base': { |
| 112 | 'msvs_settings': { |
| 113 | 'VCLinkerTool': { |
| 114 | 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', |
| 115 | }, |
| 116 | }, |
| 117 | }, |
| 118 | }, |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 119 | }], # OS=="win" |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 120 | ], |
| 121 | }, |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 122 | { |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 123 | 'target_name': 'content_shell_resources', |
| 124 | 'type': 'none', |
[email protected] | b581eb40 | 2012-03-09 01:31:46 | [diff] [blame^] | 125 | 'dependencies': [ |
| 126 | 'generate_content_shell_resources', |
| 127 | ], |
| 128 | 'variables': { |
| 129 | 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content', |
| 130 | }, |
| 131 | 'includes': [ '../build/grit_target.gypi' ], |
| 132 | 'copies': [ |
| 133 | { |
| 134 | 'destination': '<(PRODUCT_DIR)', |
| 135 | 'files': [ |
| 136 | '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak' |
| 137 | ], |
| 138 | }, |
| 139 | ], |
| 140 | }, { |
| 141 | 'target_name': 'generate_content_shell_resources', |
| 142 | 'type': 'none', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 143 | 'variables': { |
| 144 | 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content', |
| 145 | }, |
| 146 | 'actions': [ |
| 147 | { |
| 148 | 'action_name': 'content_shell_resources', |
| 149 | 'variables': { |
| 150 | 'grit_grd_file': 'shell/shell_resources.grd', |
| 151 | }, |
| 152 | 'includes': [ '../build/grit_action.gypi' ], |
| 153 | }, |
| 154 | ], |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 155 | }, |
| 156 | { |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 157 | # We build a minimal set of resources so WebKit in content_shell has |
| 158 | # access to necessary resources. |
| 159 | 'target_name': 'content_shell_pak', |
| 160 | 'type': 'none', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 161 | 'dependencies': [ |
| 162 | 'browser/debugger/devtools_resources.gyp:devtools_resources', |
| 163 | 'content_shell_resources', |
[email protected] | 6c3e649 | 2012-02-27 17:07:45 | [diff] [blame] | 164 | '<(DEPTH)/net/net.gyp:net_resources', |
| 165 | '<(DEPTH)/ui/ui.gyp:ui_resources', |
| 166 | '<(DEPTH)/ui/ui.gyp:ui_resources_standard', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 167 | ], |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 168 | 'variables': { |
| 169 | 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', |
| 170 | }, |
| 171 | 'actions': [ |
| 172 | { |
| 173 | 'action_name': 'repack_content_shell_pack', |
| 174 | 'variables': { |
| 175 | 'pak_inputs': [ |
| 176 | '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 177 | '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak', |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 178 | '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', |
| 179 | '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak', |
| 180 | '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 181 | '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 182 | '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', |
| 183 | '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', |
| 184 | ], |
| 185 | 'conditions': [ |
| 186 | ['OS != "mac"', { |
| 187 | 'pak_inputs': [ |
| 188 | '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak', |
| 189 | ] |
| 190 | }], |
| 191 | ], |
| 192 | }, |
| 193 | 'inputs': [ |
| 194 | '<(repack_path)', |
| 195 | '<@(pak_inputs)', |
| 196 | ], |
| 197 | 'outputs': [ |
| 198 | '<(PRODUCT_DIR)/content_shell.pak', |
| 199 | ], |
| 200 | 'action': ['python', '<(repack_path)', '<@(_outputs)', |
| 201 | '<@(pak_inputs)'], |
| 202 | }, |
| 203 | ], |
| 204 | }, |
| 205 | { |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 206 | 'target_name': 'content_shell', |
| 207 | 'type': 'executable', |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 208 | 'mac_bundle': 1, |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 209 | 'defines!': ['CONTENT_IMPLEMENTATION'], |
| 210 | 'variables': { |
| 211 | 'chromium_code': 1, |
| 212 | }, |
| 213 | 'dependencies': [ |
| 214 | 'content_shell_lib', |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 215 | 'content_shell_pak', |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 216 | ], |
| 217 | 'include_dirs': [ |
| 218 | '..', |
| 219 | ], |
| 220 | 'sources': [ |
[email protected] | 27315ce4 | 2011-10-14 01:25:12 | [diff] [blame] | 221 | 'app/startup_helper_win.cc', |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 222 | 'shell/shell_main.cc', |
| 223 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 224 | 'mac_bundle_resources': [ |
| 225 | 'shell/mac/app.icns', |
| 226 | 'shell/mac/app-Info.plist', |
| 227 | ], |
| 228 | # TODO(mark): Come up with a fancier way to do this. It should only |
| 229 | # be necessary to list app-Info.plist once, not the three times it is |
| 230 | # listed here. |
| 231 | 'mac_bundle_resources!': [ |
| 232 | 'shell/mac/app-Info.plist', |
| 233 | ], |
| 234 | 'xcode_settings': { |
| 235 | 'INFOPLIST_FILE': 'shell/mac/app-Info.plist', |
| 236 | }, |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 237 | 'msvs_settings': { |
| 238 | 'VCLinkerTool': { |
| 239 | 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 240 | }, |
| 241 | }, |
| 242 | 'conditions': [ |
| 243 | ['OS=="win" and win_use_allocator_shim==1', { |
| 244 | 'dependencies': [ |
| 245 | '../base/allocator/allocator.gyp:allocator', |
| 246 | ], |
| 247 | }], |
| 248 | ['OS=="win"', { |
| 249 | 'configurations': { |
| 250 | 'Debug_Base': { |
| 251 | 'msvs_settings': { |
| 252 | 'VCLinkerTool': { |
| 253 | 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', |
| 254 | }, |
| 255 | }, |
| 256 | }, |
| 257 | }, |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 258 | }], # OS=="win" |
[email protected] | 27315ce4 | 2011-10-14 01:25:12 | [diff] [blame] | 259 | ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', { |
| 260 | 'dependencies': [ |
| 261 | '../sandbox/sandbox.gyp:sandbox', |
| 262 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 263 | }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0) |
[email protected] | 39899089 | 2012-01-20 03:25:58 | [diff] [blame] | 264 | ['toolkit_uses_gtk == 1', { |
| 265 | 'dependencies': [ |
| 266 | '<(DEPTH)/build/linux/system.gyp:gtk', |
| 267 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 268 | }], # toolkit_uses_gtk |
| 269 | ['OS=="mac"', { |
| 270 | 'product_name': '<(content_shell_product_name)', |
| 271 | 'dependencies!': [ |
| 272 | 'content_shell_lib', |
| 273 | ], |
| 274 | 'dependencies': [ |
| 275 | 'content_shell_framework', |
| 276 | ], |
| 277 | 'postbuilds': [ |
| 278 | { |
| 279 | 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework', |
| 280 | 'action': [ |
| 281 | '../build/mac/copy_framework_unversioned.sh', |
| 282 | '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework', |
| 283 | '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks', |
| 284 | ], |
| 285 | }, |
| 286 | { |
| 287 | 'postbuild_name': 'Fix Framework Link', |
| 288 | 'action': [ |
| 289 | 'install_name_tool', |
| 290 | '-change', |
| 291 | '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework', |
| 292 | '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework', |
| 293 | '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' |
| 294 | ], |
| 295 | }, |
| 296 | { |
| 297 | # Modify the Info.plist as needed. |
| 298 | 'postbuild_name': 'Tweak Info.plist', |
| 299 | 'action': ['../build/mac/tweak_info_plist.py', |
[email protected] | 8fcde31f6 | 2012-03-07 06:25:17 | [diff] [blame] | 300 | '--svn=1'], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 301 | }, |
| 302 | { |
| 303 | # Make sure there isn't any Objective-C in the shell's |
| 304 | # executable. |
| 305 | 'postbuild_name': 'Verify No Objective-C', |
| 306 | 'action': [ |
| 307 | '../build/mac/verify_no_objc.sh', |
| 308 | ], |
| 309 | }, |
| 310 | ], |
| 311 | }], # OS=="mac" |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 312 | ], |
| 313 | }, |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 314 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 315 | 'conditions': [ |
| 316 | ['OS=="mac"', { |
| 317 | 'targets': [ |
| 318 | { |
| 319 | 'target_name': 'content_shell_framework', |
| 320 | 'type': 'shared_library', |
| 321 | 'product_name': '<(content_shell_product_name) Framework', |
| 322 | 'mac_bundle': 1, |
| 323 | 'mac_bundle_resources': [ |
| 324 | 'shell/mac/English.lproj/MainMenu.xib', |
| 325 | '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak' |
| 326 | ], |
| 327 | 'dependencies': [ |
| 328 | 'content_shell_lib', |
| 329 | ], |
| 330 | 'include_dirs': [ |
| 331 | '..', |
| 332 | ], |
| 333 | 'sources': [ |
| 334 | 'shell/shell_content_main.cc', |
| 335 | 'shell/shell_content_main.h', |
| 336 | ], |
| 337 | }, |
| 338 | ], |
| 339 | }], # OS=="mac" |
| 340 | ], |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 341 | } |