1 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
8 'chrome_exe_target': 0,
10 'target_conditions': [
11 ['chrome_exe_target==1', {
13 # .cc, .h, and .mm files under app that are used on all
14 # platforms, including both 32-bit and 64-bit Windows.
15 # Test files are not included.
16 'app/breakpad_win.cc',
18 'app/chrome_exe_main_gtk.cc',
19 'app/chrome_exe_main_mac.mm',
20 'app/chrome_exe_main_win.cc',
21 'app/chrome_exe_resource.h',
24 'app/hard_error_handler_win.cc',
25 'app/hard_error_handler_win.h',
26 'app/scoped_ole_initializer.h',
27 # TODO(bradnelson): once automatic generation of 64 bit targets on
28 # Windows is ready, take this out and add a dependency on
29 # content_common.gypi.
30 '../content/common/content_switches.cc',
31 '../content/common/content_switches.h',
33 'mac_bundle_resources': [
36 # TODO(mark): Come up with a fancier way to do this. It should only
37 # be necessary to list app-Info.plist once, not the three times it is
39 'mac_bundle_resources!': [
43 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
44 'INFOPLIST_FILE': 'app/app-Info.plist',
50 'app/chrome_exe_version.rc.version',
53 '<(SHARED_INTERMEDIATE_DIR)/chrome',
55 # TODO(scottbyer): This is a temporary workaround. The right fix
56 # is to change the output file to be in $(IntDir) for this project
57 # and the .dll project and use the hardlink script to link it back
63 'LinkIncremental': '1',
77 # Set /SUBSYSTEM:WINDOWS for chrome.exe itself.
81 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.exe.manifest',
86 'action_name': 'version',
88 'template_input_path': 'app/chrome_exe_version.rc.version',
91 [ 'branding == "Chrome"', {
93 'branding_path': 'app/theme/google_chrome/BRANDING',
95 }, { # else branding!="Chrome"
97 'branding_path': 'app/theme/chromium/BRANDING',
102 '<(template_input_path)',
107 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_exe_version.rc',
111 '<(version_py_path)',
112 '-f', '<(version_path)',
113 '-f', '<(branding_path)',
114 '<(template_input_path)',
117 'process_outputs_as_sources': 1,
118 'message': 'Generating version information in <(_outputs)'
121 'action_name': 'first_run',
126 '<(PRODUCT_DIR)/First Run',
128 'action': ['cp', '-f', '<@(_inputs)', '<@(_outputs)'],
129 'message': 'Copy first run complete sentinel file',
134 'app/client_util.cc',
143 'target_name': 'chrome',
144 'type': 'executable',
146 'msvs_guid': '7B219FAA-E360-43C8-B341-804A94EEFFAC',
148 'chrome_exe_target': 1,
149 'use_system_xdg_utils%': 0,
152 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
155 'action_name': 'manpage',
157 [ 'branding == "Chrome"', {
159 'name': 'Google Chrome',
160 'filename': 'google-chrome',
161 'confdir': 'google-chrome',
163 }, { # else branding!="Chrome"
166 'filename': 'chromium-browser',
167 'confdir': 'chromium',
172 'tools/build/linux/sed.sh',
173 'app/resources/manpage.1.in',
176 '<(PRODUCT_DIR)/chrome.1',
179 'tools/build/linux/sed.sh',
180 'app/resources/manpage.1.in',
182 '-e', 's/@@NAME@@/<(name)/',
183 '-e', 's/@@FILENAME@@/<(filename)/',
184 '-e', 's/@@CONFDIR@@/<(confdir)/',
186 'message': 'Generating manpage'
190 [ 'linux_use_tcmalloc==1', {
192 '<(allocator_target)',
196 ['use_system_xdg_utils==0', {
199 'destination': '<(PRODUCT_DIR)',
200 'files': ['tools/build/linux/chrome-wrapper',
201 '../third_party/xdg-utils/scripts/xdg-mime',
202 '../third_party/xdg-utils/scripts/xdg-settings',
204 # The wrapper script above may need to generate a .desktop
205 # file, which requires an icon. So, copy one next to the
208 ['branding=="Chrome"', {
209 'files': ['app/theme/google_chrome/product_logo_48.png']
210 }, { # else: 'branding!="Chrome"
211 'files': ['app/theme/chromium/product_logo_48.png']
219 # On Linux, link the dependencies (libraries) that make up actual
220 # Chromium functionality directly into the executable.
221 '<@(chromium_dependencies)',
222 # Needed for chrome_main.cc initialization of libraries.
223 '../build/linux/system.gyp:dbus-glib',
224 '../build/linux/system.gyp:gtk',
226 # Needed to use the master_preferences functions
230 'app/chrome_dll_resource.h',
231 'app/chrome_main.cc',
232 'app/chrome_main_posix.cc',
236 # 'branding' is a variable defined in common.gypi
237 # (e.g. "Chromium", "Chrome")
239 ['branding=="Chrome"', {
240 'mac_bundle_resources': [
241 'app/theme/google_chrome/app.icns',
242 'app/theme/google_chrome/document.icns',
243 'browser/ui/cocoa/applescript/scripting.sdef',
245 }, { # else: 'branding!="Chrome"
246 'mac_bundle_resources': [
247 'app/theme/chromium/app.icns',
248 'app/theme/chromium/document.icns',
249 'browser/ui/cocoa/applescript/scripting.sdef',
252 ['mac_breakpad==1', {
254 # A real .dSYM is needed for dump_syms to operate on.
258 '../breakpad/breakpad.gyp:dump_syms',
259 '../breakpad/breakpad.gyp:symupload',
261 # The "Dump Symbols" post-build step is in a target_conditions
262 # block so that it will follow the "Strip If Needed" step if that
263 # is also being used. There is no standard configuration where
264 # both of these steps occur together, but Mark likes to use this
265 # configuraiton sometimes when testing Breakpad-enabled builds
266 # without the time overhead of creating real .dSYM files. When
267 # both "Dump Symbols" and "Strip If Needed" are present, "Dump
268 # Symbols" must come second because "Strip If Needed" creates
269 # a fake .dSYM that dump_syms needs to fake dump. Since
270 # "Strip If Needed" is added in a target_conditions block in
271 # common.gypi, "Dump Symbols" needs to be in an (always true)
272 # target_conditions block.
273 'target_conditions': [
277 'postbuild_name': 'Dump Symbols',
279 'dump_product_syms_path':
280 'tools/build/mac/dump_product_syms',
282 'action': ['<(dump_product_syms_path)',
290 'product_name': '<(mac_product_name)',
292 # chrome/app/app-Info.plist has:
293 # CFBundleIdentifier of CHROMIUM_BUNDLE_ID
294 # CFBundleName of CHROMIUM_SHORT_NAME
295 # CFBundleSignature of CHROMIUM_CREATOR
296 # Xcode then replaces these values with the branded values we set
297 # as settings on the target.
298 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
299 'CHROMIUM_CREATOR': '<(mac_creator)',
300 'CHROMIUM_SHORT_NAME': '<(branding)',
304 'infoplist_strings_tool',
305 'chrome_manifest_bundle',
307 'mac_bundle_resources': [
308 '<(PRODUCT_DIR)/<(mac_bundle_id).manifest',
312 # Generate the InfoPlist.strings file
313 'action_name': 'Generate InfoPlist.strings files',
315 'tool_path': '<(PRODUCT_DIR)/infoplist_strings_tool',
316 # Unique dir to write to so the [lang].lproj/InfoPlist.strings
317 # for the main app and the helper app don't name collide.
318 'output_path': '<(INTERMEDIATE_DIR)/app_infoplist_strings',
321 [ 'branding == "Chrome"', {
323 'branding_name': 'google_chrome_strings',
325 }, { # else branding!="Chrome"
327 'branding_name': 'chromium_strings',
334 # TODO: remove this helper when we have loops in GYP
335 '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(branding_name)_ZZLOCALE.pak\' <(locales))',
338 # TODO: remove this helper when we have loops in GYP
339 '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/InfoPlist.strings\' <(locales))',
343 '-b', '<(branding_name)',
344 '-v', '<(version_path)',
345 '-g', '<(grit_out_dir)',
346 '-o', '<(output_path)',
350 'message': 'Generating the language InfoPlist.strings files',
351 'process_outputs_as_mac_bundle_resources': 1,
356 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Versions/<(version_full)',
358 '<(PRODUCT_DIR)/<(mac_product_name) Helper.app',
364 'postbuild_name': 'Copy <(mac_product_name) Framework.framework',
366 'tools/build/mac/copy_framework_unversioned',
367 '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Framework.framework',
368 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Versions/<(version_full)',
372 # Modify the Info.plist as needed. The script explains why this
373 # is needed. This is also done in the helper_app and chrome_dll
374 # targets. Use -b0 to not include any Breakpad information; that
375 # all goes into the framework's Info.plist. Keystone information
376 # is included if Keystone is enabled. The application reads
377 # Keystone keys from this plist and not the framework's, and
378 # the ticket will reference this Info.plist to determine the tag
379 # of the installed product. Use -s1 to include Subversion
381 'postbuild_name': 'Tweak Info.plist',
382 'action': ['<(tweak_info_plist_path)',
390 'postbuild_name': 'Clean up old versions',
392 'tools/build/mac/clean_up_old_versions',
400 ['branding=="Chrome"', {
402 'linux_installer_configs',
407 '../sandbox/sandbox.gyp:sandbox',
414 ['branding=="Chrome"', {
415 'product_name': 'chrome'
416 }, { # else: Branding!="Chrome"
418 # 'product_name': 'chromium'
419 # whenever we convert the rest of the infrastructure
420 # (buildbots etc.) to use "gyp -Dbranding=Chrome".
421 # NOTE: chrome/app/theme/chromium/BRANDING and
422 # chrome/app/theme/google_chrome/BRANDING have the short names,
423 # etc.; should we try to extract from there instead?
424 'product_name': 'chrome'
426 # On Mac, this is done in chrome_dll.gypi.
429 '../pdf/pdf.gyp:pdf',
434 'packed_extra_resources',
435 # Copy Flash Player files to PRODUCT_DIR if applicable. Let the .gyp
436 # file decide what to do on a per-OS basis; on Mac, internal plugins
437 # go inside the framework, so this dependency is in chrome_dll.gypi.
438 '../third_party/adobe/flash/flash_player.gyp:flash_player',
441 ['OS=="mac" or OS=="win"', {
443 # On Windows and Mac, make sure we've built chrome_dll, which
444 # contains all of the library code with Chromium functionality.
451 'installer_util_strings',
452 '../breakpad/breakpad.gyp:breakpad_handler',
453 '../breakpad/breakpad.gyp:breakpad_sender',
454 '../sandbox/sandbox.gyp:sandbox',
455 'app/locales/locales.gyp:*',
456 'app/policy/cloud_policy_codegen.gyp:policy',
460 'ImportLibrary': '$(OutDir)\\lib\\chrome_exe.lib',
461 'ProgramDatabaseFile': '$(OutDir)\\chrome_exe.pdb',
468 'target_name': 'chrome_mesa',
472 '../third_party/mesa/mesa.gyp:osmesa',
477 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Versions/<(version_full)/<(mac_product_name) Helper.app/Contents/MacOS/',
478 'files': ['<(PRODUCT_DIR)/osmesa.so'],
488 'target_name': 'chrome_nacl_win64',
489 'type': 'executable',
490 'product_name': 'nacl64',
491 'msvs_guid': 'BB1AE956-038B-4092-96A2-951D2B418548',
493 'chrome_exe_target': 1,
496 # On Windows make sure we've built Win64 version of chrome_dll,
497 # which contains all of the library code with Chromium
499 'chrome_dll_nacl_win64',
500 'common_constants_win64',
501 'installer_util_nacl_win64',
502 'app/policy/cloud_policy_codegen.gyp:policy_win64',
503 '../breakpad/breakpad.gyp:breakpad_handler_win64',
504 '../breakpad/breakpad.gyp:breakpad_sender_win64',
505 '../base/base.gyp:base_nacl_win64',
506 '../chrome_frame/chrome_frame.gyp:npchrome_frame',
507 '../sandbox/sandbox.gyp:sandbox_win64',
510 '<@(nacl_win64_defines)',
513 '<(SHARED_INTERMEDIATE_DIR)/chrome',
517 'ImportLibrary': '$(OutDir)\\lib\\nacl64_exe.lib',
518 'ProgramDatabaseFile': '$(OutDir)\\nacl64_exe.pdb',
523 'msvs_target_platform': 'x64',