[email protected] | 23bb71f | 2011-04-21 22:22:10 | [diff] [blame] | 1 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [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] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 6 | 'targets': [ |
| 7 | { |
| 8 | 'target_name': 'chrome', |
| 9 | 'type': 'executable', |
| 10 | 'mac_bundle': 1, |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 11 | 'variables': { |
[email protected] | ce04cfd | 2011-01-18 18:36:55 | [diff] [blame] | 12 | 'use_system_xdg_utils%': 0, |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 13 | }, |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 14 | 'sources': [ |
| 15 | 'app/breakpad_win.cc', |
| 16 | 'app/breakpad_win.h', |
[email protected] | 1ac9f0e | 2011-09-30 16:33:13 | [diff] [blame] | 17 | 'app/chrome_exe_main_aura.cc', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 18 | 'app/chrome_exe_main_gtk.cc', |
| 19 | 'app/chrome_exe_main_mac.cc', |
| 20 | 'app/chrome_exe_main_win.cc', |
| 21 | 'app/chrome_exe_resource.h', |
| 22 | 'app/client_util.cc', |
| 23 | 'app/client_util.h', |
| 24 | 'app/hard_error_handler_win.cc', |
| 25 | 'app/hard_error_handler_win.h', |
| 26 | 'app/scoped_ole_initializer.h', |
| 27 | '../content/app/startup_helper_win.cc', |
| 28 | '../content/common/content_switches.cc', |
| 29 | ], |
| 30 | 'mac_bundle_resources': [ |
| 31 | 'app/app-Info.plist', |
| 32 | ], |
| 33 | # TODO(mark): Come up with a fancier way to do this. It should only |
| 34 | # be necessary to list app-Info.plist once, not the three times it is |
| 35 | # listed here. |
| 36 | 'mac_bundle_resources!': [ |
| 37 | 'app/app-Info.plist', |
| 38 | ], |
| 39 | 'xcode_settings': { |
| 40 | 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves', |
| 41 | 'INFOPLIST_FILE': 'app/app-Info.plist', |
| 42 | }, |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 43 | 'conditions': [ |
[email protected] | cb5e507 | 2011-05-19 21:49:41 | [diff] [blame] | 44 | ['os_posix == 1 and OS != "mac"', { |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 45 | 'actions': [ |
| 46 | { |
| 47 | 'action_name': 'manpage', |
| 48 | 'conditions': [ |
| 49 | [ 'branding == "Chrome"', { |
| 50 | 'variables': { |
| 51 | 'name': 'Google Chrome', |
| 52 | 'filename': 'google-chrome', |
| 53 | 'confdir': 'google-chrome', |
| 54 | }, |
| 55 | }, { # else branding!="Chrome" |
| 56 | 'variables': { |
| 57 | 'name': 'Chromium', |
| 58 | 'filename': 'chromium-browser', |
| 59 | 'confdir': 'chromium', |
| 60 | }, |
| 61 | }], |
| 62 | ], |
| 63 | 'inputs': [ |
| 64 | 'tools/build/linux/sed.sh', |
| 65 | 'app/resources/manpage.1.in', |
| 66 | ], |
| 67 | 'outputs': [ |
| 68 | '<(PRODUCT_DIR)/chrome.1', |
| 69 | ], |
| 70 | 'action': [ |
| 71 | 'tools/build/linux/sed.sh', |
| 72 | 'app/resources/manpage.1.in', |
| 73 | '<@(_outputs)', |
| 74 | '-e', 's/@@NAME@@/<(name)/', |
| 75 | '-e', 's/@@FILENAME@@/<(filename)/', |
| 76 | '-e', 's/@@CONFDIR@@/<(confdir)/', |
| 77 | ], |
| 78 | 'message': 'Generating manpage' |
| 79 | }, |
| 80 | ], |
| 81 | 'conditions': [ |
[email protected] | 771e145 | 2011-05-12 19:07:20 | [diff] [blame] | 82 | ['linux_use_tcmalloc==1', { |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 83 | 'dependencies': [ |
| 84 | '<(allocator_target)', |
| 85 | ], |
| 86 | }, |
| 87 | ], |
[email protected] | cf90a51 | 2011-10-08 00:00:44 | [diff] [blame] | 88 | # TODO(rkc): Remove once crosbug.com/15266 is fixed. |
| 89 | ['profiling==1', { |
[email protected] | 16d71b0d | 2011-06-22 00:43:53 | [diff] [blame] | 90 | 'ldflags': ['-nopie'], |
| 91 | }, { |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 92 | # Building with -pie needs investigating on ARM. |
| 93 | # For now, at least use it on Linux Intel. |
[email protected] | 16d71b0d | 2011-06-22 00:43:53 | [diff] [blame] | 94 | 'conditions': [ |
[email protected] | 1bca76f | 2011-10-11 16:30:27 | [diff] [blame^] | 95 | ['(target_arch=="x64" or target_arch=="ia32") and linux_disable_pie!=1', { |
[email protected] | 16d71b0d | 2011-06-22 00:43:53 | [diff] [blame] | 96 | 'ldflags': ['-pie'], |
| 97 | }], |
| 98 | ], |
[email protected] | 771e145 | 2011-05-12 19:07:20 | [diff] [blame] | 99 | }], |
[email protected] | ce04cfd | 2011-01-18 18:36:55 | [diff] [blame] | 100 | ['use_system_xdg_utils==0', { |
| 101 | 'copies': [ |
| 102 | { |
| 103 | 'destination': '<(PRODUCT_DIR)', |
| 104 | 'files': ['tools/build/linux/chrome-wrapper', |
| 105 | '../third_party/xdg-utils/scripts/xdg-mime', |
| 106 | '../third_party/xdg-utils/scripts/xdg-settings', |
| 107 | ], |
| 108 | # The wrapper script above may need to generate a .desktop |
| 109 | # file, which requires an icon. So, copy one next to the |
| 110 | # script. |
| 111 | 'conditions': [ |
| 112 | ['branding=="Chrome"', { |
| 113 | 'files': ['app/theme/google_chrome/product_logo_48.png'] |
| 114 | }, { # else: 'branding!="Chrome" |
| 115 | 'files': ['app/theme/chromium/product_logo_48.png'] |
| 116 | }], |
| 117 | ], |
| 118 | }, |
| 119 | ], |
| 120 | }], |
[email protected] | c71fc77 | 2011-10-05 02:17:49 | [diff] [blame] | 121 | ['toolkit_uses_gtk == 1', { |
| 122 | 'dependencies': [ |
| 123 | # On Linux, link the dependencies (libraries) that make up actual |
| 124 | # Chromium functionality directly into the executable. |
| 125 | '<@(chromium_dependencies)', |
| 126 | # Needed for chrome_main.cc initialization of libraries. |
| 127 | '../build/linux/system.gyp:gtk', |
| 128 | # Needed to use the master_preferences functions |
| 129 | 'installer_util', |
| 130 | ], |
| 131 | }, { # else toolkit_uses_gtk == 1 |
| 132 | 'dependencies': [ |
| 133 | # On Linux, link the dependencies (libraries) that make up actual |
| 134 | # Chromium functionality directly into the executable. |
| 135 | '<@(chromium_dependencies)', |
| 136 | # Needed for chrome_main.cc initialization of libraries. |
| 137 | '../build/linux/system.gyp:x11', |
| 138 | '../build/linux/system.gyp:pangocairo', |
| 139 | '../build/linux/system.gyp:xext', |
| 140 | # Needed to use the master_preferences functions |
| 141 | 'installer_util', |
[email protected] | 86671a3 | 2011-10-06 21:15:20 | [diff] [blame] | 142 | ], |
[email protected] | c71fc77 | 2011-10-05 02:17:49 | [diff] [blame] | 143 | }], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 144 | ], |
| 145 | 'sources': [ |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 146 | 'app/chrome_dll_resource.h', |
[email protected] | a09270ae | 2011-02-28 22:21:32 | [diff] [blame] | 147 | 'app/chrome_main.cc', |
[email protected] | 86671a3 | 2011-10-06 21:15:20 | [diff] [blame] | 148 | 'app/chrome_main_delegate.cc', |
| 149 | 'app/chrome_main_delegate.h', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 150 | ], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 151 | }], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 152 | ['OS=="mac"', { |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 153 | # 'branding' is a variable defined in common.gypi |
| 154 | # (e.g. "Chromium", "Chrome") |
| 155 | 'conditions': [ |
| 156 | ['branding=="Chrome"', { |
| 157 | 'mac_bundle_resources': [ |
| 158 | 'app/theme/google_chrome/app.icns', |
| 159 | 'app/theme/google_chrome/document.icns', |
[email protected] | 7d79165 | 2010-12-01 16:34:49 | [diff] [blame] | 160 | 'browser/ui/cocoa/applescript/scripting.sdef', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 161 | ], |
| 162 | }, { # else: 'branding!="Chrome" |
| 163 | 'mac_bundle_resources': [ |
| 164 | 'app/theme/chromium/app.icns', |
| 165 | 'app/theme/chromium/document.icns', |
[email protected] | 7d79165 | 2010-12-01 16:34:49 | [diff] [blame] | 166 | 'browser/ui/cocoa/applescript/scripting.sdef', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 167 | ], |
| 168 | }], |
| 169 | ['mac_breakpad==1', { |
| 170 | 'variables': { |
| 171 | # A real .dSYM is needed for dump_syms to operate on. |
| 172 | 'mac_real_dsym': 1, |
| 173 | }, |
[email protected] | c8dc7e6 | 2011-06-27 21:31:44 | [diff] [blame] | 174 | 'xcode_settings': { |
| 175 | # With mac_real_dsym set, strip_from_xcode won't be used. |
| 176 | # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode. |
| 177 | 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', |
| 178 | }, |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 179 | 'dependencies': [ |
| 180 | '../breakpad/breakpad.gyp:dump_syms', |
| 181 | '../breakpad/breakpad.gyp:symupload', |
[email protected] | 8fd5d27 | 2011-08-04 21:21:50 | [diff] [blame] | 182 | |
| 183 | # In order to process symbols for the Remoting Host plugin, |
| 184 | # that plugin needs to be built beforehand. Since the |
| 185 | # "Dump Symbols" step hangs off this target, that plugin also |
| 186 | # needs to be added as a dependency. |
| 187 | '../remoting/remoting.gyp:remoting_host_plugin', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 188 | ], |
| 189 | # The "Dump Symbols" post-build step is in a target_conditions |
| 190 | # block so that it will follow the "Strip If Needed" step if that |
| 191 | # is also being used. There is no standard configuration where |
| 192 | # both of these steps occur together, but Mark likes to use this |
[email protected] | 8fd5d27 | 2011-08-04 21:21:50 | [diff] [blame] | 193 | # configuration sometimes when testing Breakpad-enabled builds |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 194 | # without the time overhead of creating real .dSYM files. When |
| 195 | # both "Dump Symbols" and "Strip If Needed" are present, "Dump |
| 196 | # Symbols" must come second because "Strip If Needed" creates |
| 197 | # a fake .dSYM that dump_syms needs to fake dump. Since |
| 198 | # "Strip If Needed" is added in a target_conditions block in |
| 199 | # common.gypi, "Dump Symbols" needs to be in an (always true) |
| 200 | # target_conditions block. |
| 201 | 'target_conditions': [ |
| 202 | ['1 == 1', { |
| 203 | 'postbuilds': [ |
| 204 | { |
| 205 | 'postbuild_name': 'Dump Symbols', |
| 206 | 'variables': { |
| 207 | 'dump_product_syms_path': |
| 208 | 'tools/build/mac/dump_product_syms', |
| 209 | }, |
| 210 | 'action': ['<(dump_product_syms_path)', |
| 211 | '<(branding)'], |
| 212 | }, |
| 213 | ], |
| 214 | }], |
| 215 | ], |
| 216 | }], # mac_breakpad |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 217 | ], |
| 218 | 'product_name': '<(mac_product_name)', |
| 219 | 'xcode_settings': { |
| 220 | # chrome/app/app-Info.plist has: |
| 221 | # CFBundleIdentifier of CHROMIUM_BUNDLE_ID |
| 222 | # CFBundleName of CHROMIUM_SHORT_NAME |
| 223 | # CFBundleSignature of CHROMIUM_CREATOR |
| 224 | # Xcode then replaces these values with the branded values we set |
| 225 | # as settings on the target. |
| 226 | 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)', |
| 227 | 'CHROMIUM_CREATOR': '<(mac_creator)', |
| 228 | 'CHROMIUM_SHORT_NAME': '<(branding)', |
| 229 | }, |
| 230 | 'dependencies': [ |
| 231 | 'helper_app', |
| 232 | 'infoplist_strings_tool', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 233 | 'interpose_dependency_shim', |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 234 | 'chrome_manifest_bundle', |
| 235 | ], |
| 236 | 'mac_bundle_resources': [ |
| 237 | '<(PRODUCT_DIR)/<(mac_bundle_id).manifest', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 238 | ], |
| 239 | 'actions': [ |
| 240 | { |
| 241 | # Generate the InfoPlist.strings file |
[email protected] | 47d2094 | 2010-07-16 18:46:52 | [diff] [blame] | 242 | 'action_name': 'Generate InfoPlist.strings files', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 243 | 'variables': { |
| 244 | 'tool_path': '<(PRODUCT_DIR)/infoplist_strings_tool', |
| 245 | # Unique dir to write to so the [lang].lproj/InfoPlist.strings |
| 246 | # for the main app and the helper app don't name collide. |
| 247 | 'output_path': '<(INTERMEDIATE_DIR)/app_infoplist_strings', |
| 248 | }, |
| 249 | 'conditions': [ |
| 250 | [ 'branding == "Chrome"', { |
| 251 | 'variables': { |
| 252 | 'branding_name': 'google_chrome_strings', |
| 253 | }, |
| 254 | }, { # else branding!="Chrome" |
| 255 | 'variables': { |
| 256 | 'branding_name': 'chromium_strings', |
| 257 | }, |
| 258 | }], |
| 259 | ], |
| 260 | 'inputs': [ |
| 261 | '<(tool_path)', |
| 262 | '<(version_path)', |
| 263 | # TODO: remove this helper when we have loops in GYP |
| 264 | '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(branding_name)_ZZLOCALE.pak\' <(locales))', |
| 265 | ], |
| 266 | 'outputs': [ |
| 267 | # TODO: remove this helper when we have loops in GYP |
| 268 | '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/InfoPlist.strings\' <(locales))', |
| 269 | ], |
| 270 | 'action': [ |
| 271 | '<(tool_path)', |
| 272 | '-b', '<(branding_name)', |
| 273 | '-v', '<(version_path)', |
| 274 | '-g', '<(grit_out_dir)', |
| 275 | '-o', '<(output_path)', |
| 276 | '-t', 'main', |
| 277 | '<@(locales)', |
| 278 | ], |
| 279 | 'message': 'Generating the language InfoPlist.strings files', |
| 280 | 'process_outputs_as_mac_bundle_resources': 1, |
| 281 | }, |
| 282 | ], |
| 283 | 'copies': [ |
| 284 | { |
| 285 | 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Versions/<(version_full)', |
| 286 | 'files': [ |
| 287 | '<(PRODUCT_DIR)/<(mac_product_name) Helper.app', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 288 | '<(PRODUCT_DIR)/libplugin_carbon_interpose.dylib', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 289 | ], |
| 290 | }, |
| 291 | ], |
| 292 | 'postbuilds': [ |
| 293 | { |
| 294 | 'postbuild_name': 'Copy <(mac_product_name) Framework.framework', |
| 295 | 'action': [ |
| 296 | 'tools/build/mac/copy_framework_unversioned', |
| 297 | '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Framework.framework', |
| 298 | '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Versions/<(version_full)', |
| 299 | ], |
| 300 | }, |
| 301 | { |
| 302 | # Modify the Info.plist as needed. The script explains why this |
| 303 | # is needed. This is also done in the helper_app and chrome_dll |
| 304 | # targets. Use -b0 to not include any Breakpad information; that |
| 305 | # all goes into the framework's Info.plist. Keystone information |
[email protected] | 02a46a3 | 2010-06-09 22:39:17 | [diff] [blame] | 306 | # is included if Keystone is enabled. The application reads |
| 307 | # Keystone keys from this plist and not the framework's, and |
| 308 | # the ticket will reference this Info.plist to determine the tag |
| 309 | # of the installed product. Use -s1 to include Subversion |
[email protected] | 0ada4ca | 2011-05-18 19:10:45 | [diff] [blame] | 310 | # information. The -p flag controls whether to insert PDF as a |
| 311 | # supported type identifier that can be opened. |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 312 | 'postbuild_name': 'Tweak Info.plist', |
| 313 | 'action': ['<(tweak_info_plist_path)', |
| 314 | '-b0', |
| 315 | '-k<(mac_keystone)', |
| 316 | '-s1', |
[email protected] | 0ada4ca | 2011-05-18 19:10:45 | [diff] [blame] | 317 | '-p<(internal_pdf)', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 318 | '<(branding)', |
| 319 | '<(mac_bundle_id)'], |
| 320 | }, |
| 321 | { |
| 322 | 'postbuild_name': 'Clean up old versions', |
| 323 | 'action': [ |
| 324 | 'tools/build/mac/clean_up_old_versions', |
| 325 | '<(version_full)' |
| 326 | ], |
| 327 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 328 | { |
| 329 | # This postbuid step is responsible for creating the following |
| 330 | # helpers: |
| 331 | # |
| 332 | # For unofficial Chromium branding, Chromium Helper EH.app and |
| 333 | # Chromium Helper NP.app are created from Chromium Helper.app. |
| 334 | # For official Google Chrome branding, Google Chrome Helper |
| 335 | # EH.app and Google Chrome Helper NP.app are created from |
| 336 | # Google Chrome Helper.app. |
| 337 | # |
| 338 | # The EH helper is marked for an executable heap. The NP helper |
| 339 | # is marked for no PIE (ASLR). |
| 340 | # |
| 341 | # Normally, applications shipping as part of offical builds with |
| 342 | # Google Chrome branding have dsymutil (dwarf-with-dsym, |
| 343 | # mac_real_dsym) and dump_syms (mac_breakpad) run on them to |
| 344 | # produce a .dSYM bundle and a Breakpad .sym file. This is |
| 345 | # unnecessary for the "More Helpers" because they're identical |
| 346 | # to the original helper except for the bits in their Mach-O |
| 347 | # headers that change to enable or disable special features. |
[email protected] | 6a892ebc | 2011-08-29 20:05:27 | [diff] [blame] | 348 | # Each .dSYM is identified by UUID stored in a Mach-O file's |
| 349 | # LC_UUID load command. Because the "More Helpers" share a UUID |
| 350 | # with the original helper, there's no need to run dsymutil |
| 351 | # again. All helpers can share the same .dSYM. Special handling |
| 352 | # is performed in chrome/tools/build/mac/dump_product_syms to |
| 353 | # prepare their Breakpad symbol files. |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 354 | 'postbuild_name': 'Make More Helpers', |
| 355 | 'action': [ |
| 356 | 'tools/build/mac/make_more_helpers.sh', |
| 357 | '<(version_full)', |
| 358 | '<(mac_product_name)', |
| 359 | ], |
| 360 | }, |
[email protected] | e9a1938 | 2011-08-24 21:54:59 | [diff] [blame] | 361 | { |
| 362 | # Make sure there isn't any Objective-C in the browser app's |
| 363 | # executable. |
| 364 | 'postbuild_name': 'Verify No Objective-C', |
| 365 | 'action': [ |
| 366 | 'tools/build/mac/verify_no_objc.sh', |
| 367 | ], |
| 368 | }, |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 369 | ], # postbuilds |
| 370 | }], |
| 371 | ['OS=="linux"', { |
| 372 | 'conditions': [ |
| 373 | ['branding=="Chrome"', { |
| 374 | 'dependencies': [ |
[email protected] | 5c14951a | 2010-05-24 00:35:46 | [diff] [blame] | 375 | 'linux_installer_configs', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 376 | ], |
| 377 | }], |
| 378 | ['selinux==0', { |
| 379 | 'dependencies': [ |
| 380 | '../sandbox/sandbox.gyp:sandbox', |
| 381 | ], |
| 382 | }], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 383 | ], |
| 384 | }], |
| 385 | ['OS != "mac"', { |
| 386 | 'conditions': [ |
[email protected] | 27b1d062 | 2011-06-09 18:42:00 | [diff] [blame] | 387 | # TODO: add a: |
| 388 | # 'product_name': 'chromium' |
| 389 | # whenever we convert the rest of the infrastructure |
| 390 | # (buildbots etc.) to understand the branding gyp define. |
| 391 | # NOTE: chrome/app/theme/chromium/BRANDING and |
| 392 | # chrome/app/theme/google_chrome/BRANDING have the short name |
| 393 | # "chrome" etc.; should we try to extract from there instead? |
| 394 | |
[email protected] | a8d61ff | 2010-06-15 02:16:24 | [diff] [blame] | 395 | # On Mac, this is done in chrome_dll.gypi. |
| 396 | ['internal_pdf', { |
| 397 | 'dependencies': [ |
| 398 | '../pdf/pdf.gyp:pdf', |
| 399 | ], |
| 400 | }], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 401 | ], |
[email protected] | 275538b9 | 2010-06-11 07:18:23 | [diff] [blame] | 402 | 'dependencies': [ |
| 403 | 'packed_extra_resources', |
[email protected] | 3dcdd99a | 2011-08-26 16:35:04 | [diff] [blame] | 404 | 'packed_resources', |
[email protected] | cd1e4cd | 2010-06-14 23:30:06 | [diff] [blame] | 405 | # Copy Flash Player files to PRODUCT_DIR if applicable. Let the .gyp |
| 406 | # file decide what to do on a per-OS basis; on Mac, internal plugins |
| 407 | # go inside the framework, so this dependency is in chrome_dll.gypi. |
| 408 | '../third_party/adobe/flash/flash_player.gyp:flash_player', |
[email protected] | 275538b9 | 2010-06-11 07:18:23 | [diff] [blame] | 409 | ], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 410 | }], |
[email protected] | 9ddb68283 | 2011-09-07 22:03:33 | [diff] [blame] | 411 | ['OS=="linux"', { |
| 412 | 'conditions': [ |
| 413 | # For now, do not build nacl_helper on ARM or when disable_nacl=1 |
| 414 | ['disable_nacl!=1 and target_arch!="arm"', { |
| 415 | 'dependencies': [ |
| 416 | 'nacl_helper_bootstrap', |
| 417 | 'nacl_helper', |
| 418 | ], |
| 419 | }], |
| 420 | ], |
| 421 | }], |
[email protected] | 51ce0e17 | 2011-08-05 16:16:23 | [diff] [blame] | 422 | ['OS=="mac"', { |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 423 | 'dependencies': [ |
[email protected] | 51ce0e17 | 2011-08-05 16:16:23 | [diff] [blame] | 424 | # On Mac, make sure we've built chrome_dll, which contains all of |
| 425 | # the library code with Chromium functionality. |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 426 | 'chrome_dll', |
| 427 | ], |
| 428 | }], |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 429 | ['OS=="mac" and asan==1', { |
| 430 | 'xcode_settings': { |
| 431 | # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE. |
| 432 | 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves', |
| 433 | }, |
| 434 | }], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 435 | ['OS=="win"', { |
[email protected] | 991bc88 | 2011-08-09 00:02:40 | [diff] [blame] | 436 | 'conditions': [ |
| 437 | ['optimize_with_syzygy==1', { |
| 438 | # With syzygy enabled there is an intermediate target which |
| 439 | # builds an initial version of chrome_dll, then optimizes it |
| 440 | # to its final location. The optimization step also |
| 441 | # depends on chrome_exe, so here we depend on the initial |
| 442 | # chrome_dll. |
| 443 | 'dependencies': ['chrome_dll_initial',] |
| 444 | }, { |
| 445 | 'dependencies': ['chrome_dll',] |
| 446 | }], |
| 447 | ], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 448 | 'dependencies': [ |
[email protected] | 5e0a917 | 2011-07-19 23:24:37 | [diff] [blame] | 449 | 'chrome_version_resources', |
[email protected] | 5c14951a | 2010-05-24 00:35:46 | [diff] [blame] | 450 | 'installer_util', |
| 451 | 'installer_util_strings', |
[email protected] | 23bb71f | 2011-04-21 22:22:10 | [diff] [blame] | 452 | '../base/base.gyp:base', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 453 | '../breakpad/breakpad.gyp:breakpad_handler', |
| 454 | '../breakpad/breakpad.gyp:breakpad_sender', |
| 455 | '../sandbox/sandbox.gyp:sandbox', |
[email protected] | f8636972 | 2011-02-17 13:25:23 | [diff] [blame] | 456 | 'app/policy/cloud_policy_codegen.gyp:policy', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 457 | ], |
[email protected] | 5e0a917 | 2011-07-19 23:24:37 | [diff] [blame] | 458 | 'sources': [ |
| 459 | 'app/chrome_exe.rc', |
| 460 | '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_exe_version.rc', |
| 461 | ], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 462 | 'msvs_settings': { |
| 463 | 'VCLinkerTool': { |
| 464 | 'ImportLibrary': '$(OutDir)\\lib\\chrome_exe.lib', |
| 465 | 'ProgramDatabaseFile': '$(OutDir)\\chrome_exe.pdb', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 466 | 'DelayLoadDLLs': [ |
| 467 | 'dbghelp.dll', |
| 468 | 'dwmapi.dll', |
| 469 | 'uxtheme.dll', |
| 470 | 'ole32.dll', |
| 471 | 'oleaut32.dll', |
| 472 | ], |
| 473 | # Set /SUBSYSTEM:WINDOWS for chrome.exe itself. |
| 474 | 'SubSystem': '2', |
| 475 | }, |
| 476 | 'VCManifestTool': { |
| 477 | 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.exe.manifest', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 478 | }, |
| 479 | }, |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 480 | 'actions': [ |
| 481 | { |
| 482 | 'action_name': 'first_run', |
| 483 | 'inputs': [ |
| 484 | 'app/FirstRun', |
| 485 | ], |
| 486 | 'outputs': [ |
| 487 | '<(PRODUCT_DIR)/First Run', |
| 488 | ], |
| 489 | 'action': ['cp', '-f', '<@(_inputs)', '<@(_outputs)'], |
| 490 | 'message': 'Copy first run complete sentinel file', |
| 491 | }, |
[email protected] | 86671a3 | 2011-10-06 21:15:20 | [diff] [blame] | 492 | ], |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 493 | }, { # 'OS!="win" |
| 494 | 'sources!': [ |
| 495 | 'app/client_util.cc', |
| 496 | ], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 497 | }], |
| 498 | ], |
| 499 | }, |
| 500 | ], |
| 501 | 'conditions': [ |
| 502 | ['OS=="win"', { |
| 503 | 'targets': [ |
| 504 | { |
| 505 | 'target_name': 'chrome_nacl_win64', |
| 506 | 'type': 'executable', |
[email protected] | 5599588 | 2010-02-25 21:02:26 | [diff] [blame] | 507 | 'product_name': 'nacl64', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 508 | 'sources': [ |
| 509 | 'app/breakpad_win.cc', |
| 510 | 'app/hard_error_handler_win.cc', |
| 511 | 'nacl/nacl_exe_win_64.cc', |
| 512 | '../content/app/startup_helper_win.cc', |
| 513 | '../content/common/content_switches.cc', |
| 514 | '../content/common/debug_flags.cc', # Needed for sandbox_policy.cc |
| 515 | '../content/common/hi_res_timer_manager_win.cc', |
| 516 | '../content/common/sandbox_policy.cc', |
| 517 | '../content/common/sandbox_init_wrapper_win.cc', |
| 518 | '<(SHARED_INTERMEDIATE_DIR)/chrome_version/nacl64_exe_version.rc', |
| 519 | ], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 520 | 'dependencies': [ |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 521 | 'app/policy/cloud_policy_codegen.gyp:policy_win64', |
[email protected] | 5e0a917 | 2011-07-19 23:24:37 | [diff] [blame] | 522 | 'chrome_version_resources', |
[email protected] | f8636972 | 2011-02-17 13:25:23 | [diff] [blame] | 523 | 'common_constants_win64', |
| 524 | 'installer_util_nacl_win64', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 525 | 'nacl_win64', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 526 | '../breakpad/breakpad.gyp:breakpad_handler_win64', |
| 527 | '../breakpad/breakpad.gyp:breakpad_sender_win64', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 528 | '../base/base.gyp:base_i18n_nacl_win64', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 529 | '../base/base.gyp:base_nacl_win64', |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 530 | '../base/base.gyp:base_static_win64', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 531 | '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64', |
| 532 | '../ipc/ipc.gyp:ipc_win64', |
[email protected] | d77ada4 | 2010-03-24 23:10:37 | [diff] [blame] | 533 | '../sandbox/sandbox.gyp:sandbox_win64', |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 534 | ], |
| 535 | 'defines': [ |
| 536 | '<@(nacl_win64_defines)', |
| 537 | ], |
| 538 | 'include_dirs': [ |
| 539 | '<(SHARED_INTERMEDIATE_DIR)/chrome', |
| 540 | ], |
| 541 | 'msvs_settings': { |
| 542 | 'VCLinkerTool': { |
[email protected] | 5599588 | 2010-02-25 21:02:26 | [diff] [blame] | 543 | 'ImportLibrary': '$(OutDir)\\lib\\nacl64_exe.lib', |
| 544 | 'ProgramDatabaseFile': '$(OutDir)\\nacl64_exe.pdb', |
[email protected] | 93156cec | 2011-09-12 21:14:44 | [diff] [blame] | 545 | 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 546 | }, |
| 547 | }, |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 548 | 'configurations': { |
| 549 | 'Common_Base': { |
| 550 | 'msvs_target_platform': 'x64', |
| 551 | }, |
| 552 | }, |
| 553 | }, |
| 554 | ], |
| 555 | }], |
[email protected] | dd36368 | 2009-12-28 20:30:46 | [diff] [blame] | 556 | ], |
| 557 | } |