[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] | ee582a5 | 2012-05-22 07:38:52 | [diff] [blame] | 36 | '<(webkit_src_dir)/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] | 0104871 | 2012-07-09 23:26:27 | [diff] [blame] | 39 | '../webkit/support/webkit_support.gyp:webkit_support', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 40 | ], |
| 41 | 'include_dirs': [ |
| 42 | '..', |
| 43 | ], |
| 44 | 'sources': [ |
[email protected] | 6cfccd1 | 2012-06-28 12:14:05 | [diff] [blame] | 45 | 'shell/geolocation/shell_access_token_store.cc', |
| 46 | 'shell/geolocation/shell_access_token_store.h', |
[email protected] | cccb5cf | 2012-06-06 22:20:04 | [diff] [blame] | 47 | 'shell/layout_test_controller.cc', |
| 48 | 'shell/layout_test_controller.h', |
[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] | cccb5cf | 2012-06-06 22:20:04 | [diff] [blame] | 51 | 'shell/layout_test_controller_host.cc', |
| 52 | 'shell/layout_test_controller_host.h', |
[email protected] | e1aff17 | 2012-03-22 22:41:17 | [diff] [blame] | 53 | 'shell/paths_mac.h', |
| 54 | 'shell/paths_mac.mm', |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 55 | 'shell/shell.cc', |
| 56 | 'shell/shell.h', |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 57 | 'shell/shell_android.cc', |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 58 | 'shell/shell_aura.cc', |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 59 | 'shell/shell_gtk.cc', |
| 60 | 'shell/shell_mac.mm', |
| 61 | 'shell/shell_win.cc', |
[email protected] | c4e78d7 | 2012-03-24 22:55:41 | [diff] [blame] | 62 | 'shell/shell_application_mac.h', |
| 63 | 'shell/shell_application_mac.mm', |
[email protected] | b0f146f | 2011-09-15 22:14:25 | [diff] [blame] | 64 | 'shell/shell_browser_context.cc', |
| 65 | 'shell/shell_browser_context.h', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 66 | 'shell/shell_browser_main.cc', |
| 67 | 'shell/shell_browser_main.h', |
[email protected] | 147f809 | 2012-03-21 11:47:45 | [diff] [blame] | 68 | 'shell/shell_browser_main_parts.cc', |
| 69 | 'shell/shell_browser_main_parts.h', |
| 70 | 'shell/shell_browser_main_parts_mac.mm', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 71 | '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] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 75 | 'shell/shell_content_renderer_client.cc', |
| 76 | 'shell/shell_content_renderer_client.h', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 77 | 'shell/shell_devtools_delegate.cc', |
| 78 | 'shell/shell_devtools_delegate.h', |
[email protected] | 98d6f15 | 2011-09-29 19:35:51 | [diff] [blame] | 79 | 'shell/shell_download_manager_delegate.cc', |
| 80 | 'shell/shell_download_manager_delegate.h', |
[email protected] | f221002 | 2012-03-29 00:36:08 | [diff] [blame] | 81 | 'shell/shell_javascript_dialog_creator.cc', |
| 82 | 'shell/shell_javascript_dialog_creator.h', |
| 83 | 'shell/shell_javascript_dialog_mac.mm', |
[email protected] | 7fc8382 | 2012-03-30 19:53:29 | [diff] [blame] | 84 | 'shell/shell_javascript_dialog_win.cc', |
[email protected] | f221002 | 2012-03-29 00:36:08 | [diff] [blame] | 85 | 'shell/shell_javascript_dialog.h', |
[email protected] | e3503ac | 2012-04-05 15:01:36 | [diff] [blame] | 86 | 'shell/shell_login_dialog_mac.mm', |
| 87 | 'shell/shell_login_dialog.cc', |
| 88 | 'shell/shell_login_dialog.h', |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 89 | 'shell/shell_main_delegate.cc', |
| 90 | 'shell/shell_main_delegate.h', |
[email protected] | efb5f57 | 2012-01-29 10:57:33 | [diff] [blame] | 91 | 'shell/shell_messages.cc', |
| 92 | 'shell/shell_messages.h', |
[email protected] | 33bc283 | 2012-03-29 08:18:17 | [diff] [blame] | 93 | 'shell/shell_network_delegate.cc', |
| 94 | 'shell/shell_network_delegate.h', |
[email protected] | 74830f0 | 2012-01-30 22:27:04 | [diff] [blame] | 95 | 'shell/shell_render_process_observer.cc', |
| 96 | 'shell/shell_render_process_observer.h', |
[email protected] | c5f1e33 | 2011-09-27 01:08:03 | [diff] [blame] | 97 | 'shell/shell_resource_context.cc', |
| 98 | 'shell/shell_resource_context.h', |
[email protected] | e3503ac | 2012-04-05 15:01:36 | [diff] [blame] | 99 | 'shell/shell_resource_dispatcher_host_delegate.cc', |
| 100 | 'shell/shell_resource_dispatcher_host_delegate.h', |
[email protected] | efb5f57 | 2012-01-29 10:57:33 | [diff] [blame] | 101 | 'shell/shell_switches.cc', |
| 102 | 'shell/shell_switches.h', |
[email protected] | c5f1e33 | 2011-09-27 01:08:03 | [diff] [blame] | 103 | 'shell/shell_url_request_context_getter.cc', |
| 104 | 'shell/shell_url_request_context_getter.h', |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 105 | ], |
| 106 | 'msvs_settings': { |
| 107 | 'VCLinkerTool': { |
| 108 | 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 109 | }, |
| 110 | }, |
| 111 | 'conditions': [ |
| 112 | ['OS=="win" and win_use_allocator_shim==1', { |
| 113 | 'dependencies': [ |
| 114 | '../base/allocator/allocator.gyp:allocator', |
| 115 | ], |
| 116 | }], |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 117 | ['OS=="win"', { |
| 118 | 'resource_include_dirs': [ |
| 119 | '<(SHARED_INTERMEDIATE_DIR)/webkit', |
| 120 | ], |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 121 | 'dependencies': [ |
[email protected] | 9fbd3f86 | 2011-09-20 23:31:34 | [diff] [blame] | 122 | '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', |
| 123 | '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', |
| 124 | ], |
| 125 | 'configurations': { |
| 126 | 'Debug_Base': { |
| 127 | 'msvs_settings': { |
| 128 | 'VCLinkerTool': { |
| 129 | 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', |
| 130 | }, |
| 131 | }, |
| 132 | }, |
| 133 | }, |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 134 | }], # OS=="win" |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 135 | ['OS!="android"', { |
| 136 | 'dependencies': [ |
| 137 | # This dependency is for running DRT against the content shell, and |
| 138 | # this combination is not yet supported on Android. |
| 139 | '../webkit/support/webkit_support.gyp:webkit_support', |
| 140 | ], |
| 141 | }], # OS!="android" |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 142 | ['use_aura==1', { |
| 143 | 'sources/': [ |
| 144 | ['exclude', 'shell/shell_gtk.cc'], |
| 145 | ['exclude', 'shell/shell_win.cc'], |
| 146 | ], |
[email protected] | 96b80b47 | 2012-07-03 19:41:56 | [diff] [blame] | 147 | }], # use_aura==1 |
| 148 | ['inside_chromium_build==0 or component!="shared_library"', { |
| 149 | 'dependencies': [ |
| 150 | '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support', |
| 151 | '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf', |
| 152 | ], |
| 153 | 'include_dirs': [ |
| 154 | # Required for WebTestingSupport.cpp to find our custom config.h. |
| 155 | 'shell/', |
| 156 | '<(webkit_src_dir)/Source/WebKit/chromium/public', |
| 157 | # WARNING: Do not view this particular case as a precedent for |
| 158 | # including WebCore headers in the content shell. |
| 159 | '<(webkit_src_dir)/Source/WebCore/testing/v8', # for WebCoreTestSupport.h needed to link in window.internals code. |
| 160 | ], |
| 161 | 'sources': [ |
| 162 | 'shell/config.h', |
| 163 | '<(webkit_src_dir)/Source/WebKit/chromium/src/WebTestingSupport.cpp', |
| 164 | '<(webkit_src_dir)/Source/WebKit/chromium/public/WebTestingSupport.h', |
| 165 | ], |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 166 | }], |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 167 | ], |
| 168 | }, |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 169 | { |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 170 | 'target_name': 'content_shell_resources', |
| 171 | 'type': 'none', |
[email protected] | b581eb40 | 2012-03-09 01:31:46 | [diff] [blame] | 172 | 'dependencies': [ |
| 173 | 'generate_content_shell_resources', |
| 174 | ], |
| 175 | 'variables': { |
| 176 | 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content', |
| 177 | }, |
| 178 | 'includes': [ '../build/grit_target.gypi' ], |
| 179 | 'copies': [ |
| 180 | { |
| 181 | 'destination': '<(PRODUCT_DIR)', |
| 182 | 'files': [ |
| 183 | '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak' |
| 184 | ], |
| 185 | }, |
| 186 | ], |
[email protected] | 4cb792f4 | 2012-03-24 03:12:42 | [diff] [blame] | 187 | }, |
| 188 | { |
[email protected] | b581eb40 | 2012-03-09 01:31:46 | [diff] [blame] | 189 | 'target_name': 'generate_content_shell_resources', |
| 190 | 'type': 'none', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 191 | 'variables': { |
| 192 | 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content', |
| 193 | }, |
| 194 | 'actions': [ |
| 195 | { |
| 196 | 'action_name': 'content_shell_resources', |
| 197 | 'variables': { |
| 198 | 'grit_grd_file': 'shell/shell_resources.grd', |
| 199 | }, |
| 200 | 'includes': [ '../build/grit_action.gypi' ], |
| 201 | }, |
| 202 | ], |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 203 | }, |
| 204 | { |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 205 | # We build a minimal set of resources so WebKit in content_shell has |
| 206 | # access to necessary resources. |
| 207 | 'target_name': 'content_shell_pak', |
| 208 | 'type': 'none', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 209 | 'dependencies': [ |
| 210 | 'browser/debugger/devtools_resources.gyp:devtools_resources', |
| 211 | 'content_shell_resources', |
[email protected] | 6c3e649 | 2012-02-27 17:07:45 | [diff] [blame] | 212 | '<(DEPTH)/net/net.gyp:net_resources', |
| 213 | '<(DEPTH)/ui/ui.gyp:ui_resources', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 214 | ], |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 215 | 'variables': { |
| 216 | 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', |
| 217 | }, |
| 218 | 'actions': [ |
| 219 | { |
| 220 | 'action_name': 'repack_content_shell_pack', |
| 221 | 'variables': { |
| 222 | 'pak_inputs': [ |
| 223 | '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 224 | '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak', |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 225 | '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', |
[email protected] | 2a28133 | 2012-07-11 22:20:23 | [diff] [blame] | 226 | '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_standard.pak', |
[email protected] | ee75b899 | 2012-01-27 07:53:57 | [diff] [blame] | 227 | '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 228 | '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', |
| 229 | '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', |
| 230 | ], |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 231 | }, |
| 232 | 'inputs': [ |
| 233 | '<(repack_path)', |
| 234 | '<@(pak_inputs)', |
| 235 | ], |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 236 | 'action': ['python', '<(repack_path)', '<@(_outputs)', |
| 237 | '<@(pak_inputs)'], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 238 | 'conditions': [ |
| 239 | ['OS!="android"', { |
| 240 | 'outputs': [ |
| 241 | '<(PRODUCT_DIR)/content_shell.pak', |
| 242 | ], |
| 243 | }, { |
| 244 | 'outputs': [ |
| 245 | '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak', |
| 246 | ], |
| 247 | }], |
| 248 | ], |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 249 | }, |
| 250 | ], |
| 251 | }, |
| 252 | { |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 253 | 'target_name': 'content_shell', |
| 254 | 'type': 'executable', |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 255 | 'mac_bundle': 1, |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 256 | 'defines!': ['CONTENT_IMPLEMENTATION'], |
| 257 | 'variables': { |
| 258 | 'chromium_code': 1, |
| 259 | }, |
| 260 | 'dependencies': [ |
| 261 | 'content_shell_lib', |
[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 262 | 'content_shell_pak', |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 263 | ], |
| 264 | 'include_dirs': [ |
| 265 | '..', |
| 266 | ], |
| 267 | 'sources': [ |
[email protected] | 711f428e | 2012-06-22 02:18:23 | [diff] [blame] | 268 | 'app/startup_helper_win.cc', |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 269 | 'shell/shell_main.cc', |
| 270 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 271 | 'mac_bundle_resources': [ |
| 272 | 'shell/mac/app.icns', |
| 273 | 'shell/mac/app-Info.plist', |
| 274 | ], |
| 275 | # TODO(mark): Come up with a fancier way to do this. It should only |
| 276 | # be necessary to list app-Info.plist once, not the three times it is |
| 277 | # listed here. |
| 278 | 'mac_bundle_resources!': [ |
| 279 | 'shell/mac/app-Info.plist', |
| 280 | ], |
| 281 | 'xcode_settings': { |
| 282 | 'INFOPLIST_FILE': 'shell/mac/app-Info.plist', |
| 283 | }, |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 284 | 'msvs_settings': { |
| 285 | 'VCLinkerTool': { |
| 286 | 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 287 | }, |
| 288 | }, |
| 289 | 'conditions': [ |
| 290 | ['OS=="win" and win_use_allocator_shim==1', { |
| 291 | 'dependencies': [ |
| 292 | '../base/allocator/allocator.gyp:allocator', |
| 293 | ], |
| 294 | }], |
| 295 | ['OS=="win"', { |
[email protected] | 7fc8382 | 2012-03-30 19:53:29 | [diff] [blame] | 296 | 'sources': [ |
| 297 | 'shell/shell.rc', |
| 298 | ], |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 299 | 'configurations': { |
| 300 | 'Debug_Base': { |
| 301 | 'msvs_settings': { |
| 302 | 'VCLinkerTool': { |
| 303 | 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', |
| 304 | }, |
| 305 | }, |
| 306 | }, |
| 307 | }, |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 308 | }], # OS=="win" |
[email protected] | 27315ce4 | 2011-10-14 01:25:12 | [diff] [blame] | 309 | ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', { |
| 310 | 'dependencies': [ |
| 311 | '../sandbox/sandbox.gyp:sandbox', |
| 312 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 313 | }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0) |
[email protected] | 39899089 | 2012-01-20 03:25:58 | [diff] [blame] | 314 | ['toolkit_uses_gtk == 1', { |
| 315 | 'dependencies': [ |
| 316 | '<(DEPTH)/build/linux/system.gyp:gtk', |
| 317 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 318 | }], # toolkit_uses_gtk |
| 319 | ['OS=="mac"', { |
| 320 | 'product_name': '<(content_shell_product_name)', |
| 321 | 'dependencies!': [ |
| 322 | 'content_shell_lib', |
| 323 | ], |
| 324 | 'dependencies': [ |
| 325 | 'content_shell_framework', |
[email protected] | 180df8f | 2012-03-09 22:36:10 | [diff] [blame] | 326 | 'content_shell_helper_app', |
| 327 | ], |
| 328 | 'copies': [ |
| 329 | { |
| 330 | 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks', |
| 331 | 'files': [ |
| 332 | '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app', |
| 333 | ], |
| 334 | }, |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 335 | ], |
| 336 | 'postbuilds': [ |
| 337 | { |
| 338 | 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework', |
| 339 | 'action': [ |
| 340 | '../build/mac/copy_framework_unversioned.sh', |
| 341 | '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework', |
| 342 | '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks', |
| 343 | ], |
| 344 | }, |
| 345 | { |
| 346 | 'postbuild_name': 'Fix Framework Link', |
| 347 | 'action': [ |
| 348 | 'install_name_tool', |
| 349 | '-change', |
| 350 | '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework', |
| 351 | '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework', |
| 352 | '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' |
| 353 | ], |
| 354 | }, |
| 355 | { |
| 356 | # Modify the Info.plist as needed. |
| 357 | 'postbuild_name': 'Tweak Info.plist', |
| 358 | 'action': ['../build/mac/tweak_info_plist.py', |
[email protected] | 8fcde31f6 | 2012-03-07 06:25:17 | [diff] [blame] | 359 | '--svn=1'], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 360 | }, |
| 361 | { |
[email protected] | 180df8f | 2012-03-09 22:36:10 | [diff] [blame] | 362 | # This postbuid step is responsible for creating the following |
| 363 | # helpers: |
| 364 | # |
| 365 | # Content Shell Helper EH.app and Content Shell Helper NP.app are |
| 366 | # created from Content Shell Helper.app. |
| 367 | # |
| 368 | # The EH helper is marked for an executable heap. The NP helper |
| 369 | # is marked for no PIE (ASLR). |
| 370 | 'postbuild_name': 'Make More Helpers', |
| 371 | 'action': [ |
| 372 | '../build/mac/make_more_helpers.sh', |
| 373 | 'Frameworks', |
| 374 | '<(content_shell_product_name)', |
| 375 | ], |
| 376 | }, |
| 377 | { |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 378 | # Make sure there isn't any Objective-C in the shell's |
| 379 | # executable. |
| 380 | 'postbuild_name': 'Verify No Objective-C', |
| 381 | 'action': [ |
| 382 | '../build/mac/verify_no_objc.sh', |
| 383 | ], |
| 384 | }, |
| 385 | ], |
| 386 | }], # OS=="mac" |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 387 | ], |
| 388 | }, |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 389 | ], |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 390 | 'conditions': [ |
| 391 | ['OS=="mac"', { |
| 392 | 'targets': [ |
| 393 | { |
| 394 | 'target_name': 'content_shell_framework', |
| 395 | 'type': 'shared_library', |
| 396 | 'product_name': '<(content_shell_product_name) Framework', |
| 397 | 'mac_bundle': 1, |
| 398 | 'mac_bundle_resources': [ |
[email protected] | e3503ac | 2012-04-05 15:01:36 | [diff] [blame] | 399 | 'shell/mac/English.lproj/HttpAuth.xib', |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 400 | 'shell/mac/English.lproj/MainMenu.xib', |
[email protected] | 4cb792f4 | 2012-03-24 03:12:42 | [diff] [blame] | 401 | '<(PRODUCT_DIR)/content_shell.pak' |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 402 | ], |
| 403 | 'dependencies': [ |
| 404 | 'content_shell_lib', |
| 405 | ], |
| 406 | 'include_dirs': [ |
| 407 | '..', |
| 408 | ], |
| 409 | 'sources': [ |
| 410 | 'shell/shell_content_main.cc', |
| 411 | 'shell/shell_content_main.h', |
| 412 | ], |
[email protected] | 180df8f | 2012-03-09 22:36:10 | [diff] [blame] | 413 | }, # target content_shell_framework |
| 414 | { |
| 415 | 'target_name': 'content_shell_helper_app', |
| 416 | 'type': 'executable', |
| 417 | 'variables': { 'enable_wexit_time_destructors': 1, }, |
| 418 | 'product_name': '<(content_shell_product_name) Helper', |
| 419 | 'mac_bundle': 1, |
| 420 | 'dependencies': [ |
| 421 | 'content_shell_framework', |
| 422 | ], |
| 423 | 'sources': [ |
| 424 | 'shell/shell_main.cc', |
| 425 | 'shell/mac/helper-Info.plist', |
| 426 | ], |
| 427 | # TODO(mark): Come up with a fancier way to do this. It should only |
| 428 | # be necessary to list helper-Info.plist once, not the three times it |
| 429 | # is listed here. |
| 430 | 'mac_bundle_resources!': [ |
| 431 | 'shell/mac/helper-Info.plist', |
| 432 | ], |
| 433 | # TODO(mark): For now, don't put any resources into this app. Its |
| 434 | # resources directory will be a symbolic link to the browser app's |
| 435 | # resources directory. |
| 436 | 'mac_bundle_resources/': [ |
| 437 | ['exclude', '.*'], |
| 438 | ], |
| 439 | 'xcode_settings': { |
| 440 | 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist', |
| 441 | }, |
| 442 | 'postbuilds': [ |
| 443 | { |
| 444 | # The framework defines its load-time path |
| 445 | # (DYLIB_INSTALL_NAME_BASE) relative to the main executable |
| 446 | # (chrome). A different relative path needs to be used in |
| 447 | # content_shell_helper_app. |
| 448 | 'postbuild_name': 'Fix Framework Link', |
| 449 | 'action': [ |
| 450 | 'install_name_tool', |
| 451 | '-change', |
| 452 | '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework', |
| 453 | '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework', |
| 454 | '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' |
| 455 | ], |
| 456 | }, |
| 457 | { |
| 458 | # Modify the Info.plist as needed. The script explains why this |
| 459 | # is needed. This is also done in the chrome and chrome_dll |
| 460 | # targets. In this case, --breakpad=0, --keystone=0, and --svn=0 |
| 461 | # are used because Breakpad, Keystone, and Subversion keys are |
| 462 | # never placed into the helper. |
| 463 | 'postbuild_name': 'Tweak Info.plist', |
| 464 | 'action': ['../build/mac/tweak_info_plist.py', |
| 465 | '--breakpad=0', |
| 466 | '--keystone=0', |
| 467 | '--svn=0'], |
| 468 | }, |
| 469 | { |
| 470 | # Make sure there isn't any Objective-C in the helper app's |
| 471 | # executable. |
| 472 | 'postbuild_name': 'Verify No Objective-C', |
| 473 | 'action': [ |
| 474 | '../build/mac/verify_no_objc.sh', |
| 475 | ], |
| 476 | }, |
| 477 | ], |
[email protected] | ec40c38f | 2012-06-28 16:37:49 | [diff] [blame] | 478 | 'conditions': [ |
| 479 | ['component=="shared_library"', { |
| 480 | 'xcode_settings': { |
| 481 | 'LD_RUNPATH_SEARCH_PATHS': [ |
| 482 | # Get back from Content Shell.app/Contents/Frameworks/ |
| 483 | # Helper.app/Contents/MacOS |
| 484 | '@loader_path/../../../../../..', |
| 485 | ], |
| 486 | }, |
| 487 | }], |
| 488 | ], |
[email protected] | 180df8f | 2012-03-09 22:36:10 | [diff] [blame] | 489 | }, # target content_shell_helper_app |
[email protected] | 85ff1604 | 2012-03-06 23:46:34 | [diff] [blame] | 490 | ], |
| 491 | }], # OS=="mac" |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 492 | ['OS=="android"', { |
| 493 | 'targets': [ |
| 494 | { |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 495 | # TODO(jrg): Update this action and other jni generators to only |
| 496 | # require specifying the java directory and generate the rest. |
| 497 | 'target_name': 'content_shell_jni_headers', |
| 498 | 'type': 'none', |
| 499 | 'variables': { |
| 500 | 'java_sources': [ |
[email protected] | dccbbb1 | 2012-06-26 21:05:56 | [diff] [blame] | 501 | 'shell/android/java/src/org/chromium/content_shell/ShellManager.java', |
| 502 | 'shell/android/java/src/org/chromium/content_shell/ShellView.java', |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 503 | ], |
| 504 | 'jni_headers': [ |
| 505 | '<(SHARED_INTERMEDIATE_DIR)/content/shell/jni/shell_manager_jni.h', |
| 506 | '<(SHARED_INTERMEDIATE_DIR)/content/shell/jni/shell_view_jni.h', |
| 507 | ], |
| 508 | }, |
| 509 | 'includes': [ '../build/jni_generator.gypi' ], |
| 510 | }, |
| 511 | { |
[email protected] | c110158 | 2012-06-25 17:07:18 | [diff] [blame] | 512 | 'target_name': 'libcontent_shell_content_view', |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 513 | 'type': 'shared_library', |
| 514 | 'dependencies': [ |
| 515 | 'content_shell_jni_headers', |
| 516 | 'content_shell_lib', |
| 517 | 'content_shell_pak', |
| 518 | # Skia is necessary to ensure the dependencies needed by |
| 519 | # WebContents are included. |
| 520 | '../skia/skia.gyp:skia', |
| 521 | '<(DEPTH)/media/media.gyp:player_android', |
| 522 | ], |
| 523 | 'include_dirs': [ |
| 524 | '<(SHARED_INTERMEDIATE_DIR)/content/shell', |
| 525 | ], |
| 526 | 'sources': [ |
| 527 | 'shell/android/shell_library_loader.cc', |
| 528 | 'shell/android/shell_library_loader.h', |
| 529 | 'shell/android/shell_manager.cc', |
| 530 | 'shell/android/shell_manager.h', |
| 531 | 'shell/android/shell_view.cc', |
| 532 | 'shell/android/shell_view.h', |
| 533 | ], |
[email protected] | f83a4739 | 2012-07-12 22:15:04 | [diff] [blame] | 534 | 'sources!': [ |
| 535 | 'shell/shell_main.cc', |
| 536 | 'shell/shell_main.h', |
| 537 | ], |
[email protected] | 7abcaa8 | 2012-06-27 17:09:48 | [diff] [blame] | 538 | 'conditions': [ |
| 539 | ['android_build_type==1', { |
| 540 | 'ldflags': [ |
| 541 | '-lgabi++', # For rtti |
| 542 | ], |
| 543 | }], |
| 544 | ], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 545 | }, |
| 546 | { |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 547 | 'target_name': 'content_shell_apk', |
| 548 | 'type': 'none', |
| 549 | 'actions': [ |
| 550 | { |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 551 | 'action_name': 'copy_base_jar', |
[email protected] | e082556 | 2012-05-10 01:50:47 | [diff] [blame] | 552 | 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 553 | 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar'], |
| 554 | 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], |
| 555 | }, |
| 556 | { |
[email protected] | e082556 | 2012-05-10 01:50:47 | [diff] [blame] | 557 | 'action_name': 'copy_net_jar', |
| 558 | 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'], |
| 559 | 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar'], |
| 560 | 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], |
| 561 | }, |
| 562 | { |
| 563 | 'action_name': 'copy_media_jar', |
| 564 | 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'], |
| 565 | 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar'], |
| 566 | 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], |
| 567 | }, |
| 568 | { |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 569 | 'action_name': 'copy_content_jar', |
[email protected] | e082556 | 2012-05-10 01:50:47 | [diff] [blame] | 570 | 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 571 | 'outputs': ['<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar'], |
| 572 | 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], |
| 573 | }, |
| 574 | { |
[email protected] | 9c32064 | 2012-05-07 16:25:57 | [diff] [blame] | 575 | 'action_name': 'copy_and_strip_so', |
[email protected] | 73919ea | 2012-04-26 00:48:41 | [diff] [blame] | 576 | 'inputs': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'], |
[email protected] | de5b7a4 | 2012-05-16 06:18:41 | [diff] [blame] | 577 | 'outputs': ['<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so'], |
[email protected] | 9c32064 | 2012-05-07 16:25:57 | [diff] [blame] | 578 | 'action': [ |
| 579 | '<!(/bin/echo -n $STRIP)', |
| 580 | '--strip-unneeded', # All symbols not needed for relocation. |
| 581 | '<@(_inputs)', |
| 582 | '-o', |
[email protected] | c9a433d | 2012-07-12 20:28:45 | [diff] [blame] | 583 | '<@(_outputs)', |
[email protected] | 9c32064 | 2012-05-07 16:25:57 | [diff] [blame] | 584 | ], |
[email protected] | 73919ea | 2012-04-26 00:48:41 | [diff] [blame] | 585 | }, |
| 586 | { |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 587 | 'action_name': 'content_shell_apk', |
| 588 | 'inputs': [ |
[email protected] | 19bbc47 | 2012-07-14 13:33:34 | [diff] [blame^] | 589 | 'shell/android/java/content_shell_apk.xml', |
| 590 | 'shell/android/java/AndroidManifest.xml', |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 591 | '<!@(find shell/android/java -name "*.java")', |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 592 | '<!@(find shell/android/res -name "*")', |
| 593 | '<(PRODUCT_DIR)/content_shell/java/libs/chromium_base.jar', |
[email protected] | e082556 | 2012-05-10 01:50:47 | [diff] [blame] | 594 | '<(PRODUCT_DIR)/content_shell/java/libs/chromium_net.jar', |
| 595 | '<(PRODUCT_DIR)/content_shell/java/libs/chromium_media.jar', |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 596 | '<(PRODUCT_DIR)/content_shell/java/libs/chromium_content.jar', |
[email protected] | f83a4739 | 2012-07-12 22:15:04 | [diff] [blame] | 597 | '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak', |
[email protected] | de5b7a4 | 2012-05-16 06:18:41 | [diff] [blame] | 598 | '<(PRODUCT_DIR)/content_shell/libs/<(android_app_abi)/libcontent_shell_content_view.so', |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 599 | ], |
| 600 | 'outputs': [ |
| 601 | # Awkwardly, we build a Debug APK even when gyp is in |
| 602 | # Release mode. I don't think it matters (e.g. we're |
| 603 | # probably happy to not codesign) but naming should be |
| 604 | # fixed. |
[email protected] | c9a433d | 2012-07-12 20:28:45 | [diff] [blame] | 605 | '<(PRODUCT_DIR)/content_shell/ContentShell-debug.apk', |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 606 | ], |
| 607 | 'action': [ |
[email protected] | 19bbc47 | 2012-07-14 13:33:34 | [diff] [blame^] | 608 | # Pass the build type to ant. Currently it only assumes |
| 609 | # debug mode in java. Release mode will break the current |
| 610 | # workflow. |
| 611 | # 'shell/content_shell_ant_helper.sh', |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 612 | 'ant', |
[email protected] | ef7ed7a | 2012-05-29 23:19:13 | [diff] [blame] | 613 | '-DPRODUCT_DIR=<(ant_build_out)', |
[email protected] | de5b7a4 | 2012-05-16 06:18:41 | [diff] [blame] | 614 | '-DAPP_ABI=<(android_app_abi)', |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 615 | '-buildfile', |
[email protected] | 19bbc47 | 2012-07-14 13:33:34 | [diff] [blame^] | 616 | 'shell/android/java/content_shell_apk.xml', |
| 617 | # '<(CONFIGURATION_NAME)', |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 618 | ] |
| 619 | } |
| 620 | ], |
| 621 | }, |
[email protected] | c9a433d | 2012-07-12 20:28:45 | [diff] [blame] | 622 | { |
| 623 | 'target_name': 'content_shell_test_apk', |
| 624 | 'type': 'none', |
| 625 | 'dependencies': [ |
| 626 | 'content_shell_apk', |
| 627 | ], |
| 628 | 'actions': [ |
| 629 | { |
| 630 | 'action_name': 'content_shell_test_generate_apk', |
| 631 | 'inputs': [ |
| 632 | '<(DEPTH)/content/shell/android/javatests/content_shell_test_apk.xml', |
| 633 | '<(DEPTH)/content/shell/android/javatests/AndroidManifest.xml', |
| 634 | ], |
| 635 | 'outputs': [ |
| 636 | '<(PRODUCT_DIR)/content_shell_test/ContentShellTest-debug.apk', |
| 637 | ], |
| 638 | 'action': [ |
| 639 | 'ant', |
| 640 | '-DPRODUCT_DIR=<(ant_build_out)', |
| 641 | '-DAPP_ABI=<(android_app_abi)', |
| 642 | '-buildfile', |
| 643 | '<(DEPTH)/content/shell/android/javatests/content_shell_test_apk.xml', |
| 644 | ] |
| 645 | } |
| 646 | ], |
| 647 | }, |
[email protected] | cc66d28 | 2012-03-30 11:44:06 | [diff] [blame] | 648 | ], |
| 649 | }], # OS=="android" |
| 650 | ] |
[email protected] | 5629e0c | 2011-09-12 22:07:36 | [diff] [blame] | 651 | } |