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