1 # Copyright (c) 2011 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',
147 'chrome_exe_target': 1,
148 'use_system_xdg_utils%': 0,
152 ['os_posix == 1 and OS != "mac"', {
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 # TODO(rkc): Remove disable_pie (and instead always use
197 # -pie) once we have a fix for remote gdb and are able to
198 # correctly get section header offsets for pie
199 # executables. Currently -pie breaks remote debugging.
201 'ldflags': ['-nopie'],
203 # Building with -pie needs investigating on ARM.
204 # For now, at least use it on Linux Intel.
206 ['target_arch=="x64" or target_arch=="ia32"', {
211 ['use_system_xdg_utils==0', {
214 'destination': '<(PRODUCT_DIR)',
215 'files': ['tools/build/linux/chrome-wrapper',
216 '../third_party/xdg-utils/scripts/xdg-mime',
217 '../third_party/xdg-utils/scripts/xdg-settings',
219 # The wrapper script above may need to generate a .desktop
220 # file, which requires an icon. So, copy one next to the
223 ['branding=="Chrome"', {
224 'files': ['app/theme/google_chrome/product_logo_48.png']
225 }, { # else: 'branding!="Chrome"
226 'files': ['app/theme/chromium/product_logo_48.png']
234 # On Linux, link the dependencies (libraries) that make up actual
235 # Chromium functionality directly into the executable.
236 '<@(chromium_dependencies)',
237 # Needed for chrome_main.cc initialization of libraries.
238 '../build/linux/system.gyp:dbus-glib',
239 '../build/linux/system.gyp:gtk',
241 # Needed to use the master_preferences functions
245 'app/chrome_dll_resource.h',
246 'app/chrome_main.cc',
247 'app/chrome_main_posix.cc',
251 # 'branding' is a variable defined in common.gypi
252 # (e.g. "Chromium", "Chrome")
254 ['branding=="Chrome"', {
255 'mac_bundle_resources': [
256 'app/theme/google_chrome/app.icns',
257 'app/theme/google_chrome/document.icns',
258 'browser/ui/cocoa/applescript/scripting.sdef',
260 }, { # else: 'branding!="Chrome"
261 'mac_bundle_resources': [
262 'app/theme/chromium/app.icns',
263 'app/theme/chromium/document.icns',
264 'browser/ui/cocoa/applescript/scripting.sdef',
267 ['mac_breakpad==1', {
269 # A real .dSYM is needed for dump_syms to operate on.
273 '../breakpad/breakpad.gyp:dump_syms',
274 '../breakpad/breakpad.gyp:symupload',
276 # The "Dump Symbols" post-build step is in a target_conditions
277 # block so that it will follow the "Strip If Needed" step if that
278 # is also being used. There is no standard configuration where
279 # both of these steps occur together, but Mark likes to use this
280 # configuraiton sometimes when testing Breakpad-enabled builds
281 # without the time overhead of creating real .dSYM files. When
282 # both "Dump Symbols" and "Strip If Needed" are present, "Dump
283 # Symbols" must come second because "Strip If Needed" creates
284 # a fake .dSYM that dump_syms needs to fake dump. Since
285 # "Strip If Needed" is added in a target_conditions block in
286 # common.gypi, "Dump Symbols" needs to be in an (always true)
287 # target_conditions block.
288 'target_conditions': [
292 'postbuild_name': 'Dump Symbols',
294 'dump_product_syms_path':
295 'tools/build/mac/dump_product_syms',
297 'action': ['<(dump_product_syms_path)',
305 'product_name': '<(mac_product_name)',
307 # chrome/app/app-Info.plist has:
308 # CFBundleIdentifier of CHROMIUM_BUNDLE_ID
309 # CFBundleName of CHROMIUM_SHORT_NAME
310 # CFBundleSignature of CHROMIUM_CREATOR
311 # Xcode then replaces these values with the branded values we set
312 # as settings on the target.
313 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
314 'CHROMIUM_CREATOR': '<(mac_creator)',
315 'CHROMIUM_SHORT_NAME': '<(branding)',
319 'infoplist_strings_tool',
320 'chrome_manifest_bundle',
322 'mac_bundle_resources': [
323 '<(PRODUCT_DIR)/<(mac_bundle_id).manifest',
327 # Generate the InfoPlist.strings file
328 'action_name': 'Generate InfoPlist.strings files',
330 'tool_path': '<(PRODUCT_DIR)/infoplist_strings_tool',
331 # Unique dir to write to so the [lang].lproj/InfoPlist.strings
332 # for the main app and the helper app don't name collide.
333 'output_path': '<(INTERMEDIATE_DIR)/app_infoplist_strings',
336 [ 'branding == "Chrome"', {
338 'branding_name': 'google_chrome_strings',
340 }, { # else branding!="Chrome"
342 'branding_name': 'chromium_strings',
349 # TODO: remove this helper when we have loops in GYP
350 '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(branding_name)_ZZLOCALE.pak\' <(locales))',
353 # TODO: remove this helper when we have loops in GYP
354 '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/InfoPlist.strings\' <(locales))',
358 '-b', '<(branding_name)',
359 '-v', '<(version_path)',
360 '-g', '<(grit_out_dir)',
361 '-o', '<(output_path)',
365 'message': 'Generating the language InfoPlist.strings files',
366 'process_outputs_as_mac_bundle_resources': 1,
371 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Versions/<(version_full)',
373 '<(PRODUCT_DIR)/<(mac_product_name) Helper.app',
379 'postbuild_name': 'Copy <(mac_product_name) Framework.framework',
381 'tools/build/mac/copy_framework_unversioned',
382 '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Framework.framework',
383 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Versions/<(version_full)',
387 # Modify the Info.plist as needed. The script explains why this
388 # is needed. This is also done in the helper_app and chrome_dll
389 # targets. Use -b0 to not include any Breakpad information; that
390 # all goes into the framework's Info.plist. Keystone information
391 # is included if Keystone is enabled. The application reads
392 # Keystone keys from this plist and not the framework's, and
393 # the ticket will reference this Info.plist to determine the tag
394 # of the installed product. Use -s1 to include Subversion
395 # information. The -p flag controls whether to insert PDF as a
396 # supported type identifier that can be opened.
397 'postbuild_name': 'Tweak Info.plist',
398 'action': ['<(tweak_info_plist_path)',
407 'postbuild_name': 'Clean up old versions',
409 'tools/build/mac/clean_up_old_versions',
417 ['branding=="Chrome"', {
419 'linux_installer_configs',
424 '../sandbox/sandbox.gyp:sandbox',
432 # 'product_name': 'chromium'
433 # whenever we convert the rest of the infrastructure
434 # (buildbots etc.) to understand the branding gyp define.
435 # NOTE: chrome/app/theme/chromium/BRANDING and
436 # chrome/app/theme/google_chrome/BRANDING have the short name
437 # "chrome" etc.; should we try to extract from there instead?
439 # On Mac, this is done in chrome_dll.gypi.
442 '../pdf/pdf.gyp:pdf',
447 'packed_extra_resources',
448 # Copy Flash Player files to PRODUCT_DIR if applicable. Let the .gyp
449 # file decide what to do on a per-OS basis; on Mac, internal plugins
450 # go inside the framework, so this dependency is in chrome_dll.gypi.
451 '../third_party/adobe/flash/flash_player.gyp:flash_player',
454 ['OS=="mac" or OS=="win"', {
456 # On Windows and Mac, make sure we've built chrome_dll, which
457 # contains all of the library code with Chromium functionality.
464 'installer_util_strings',
465 '../base/base.gyp:base',
466 '../breakpad/breakpad.gyp:breakpad_handler',
467 '../breakpad/breakpad.gyp:breakpad_sender',
468 '../sandbox/sandbox.gyp:sandbox',
469 'app/locales/locales.gyp:*',
470 'app/policy/cloud_policy_codegen.gyp:policy',
474 'ImportLibrary': '$(OutDir)\\lib\\chrome_exe.lib',
475 'ProgramDatabaseFile': '$(OutDir)\\chrome_exe.pdb',
486 'target_name': 'chrome_nacl_win64',
487 'type': 'executable',
488 'product_name': 'nacl64',
490 'chrome_exe_target': 1,
493 # On Windows make sure we've built Win64 version of chrome_dll,
494 # which contains all of the library code with Chromium
496 'chrome_dll_nacl_win64',
497 'common_constants_win64',
498 'installer_util_nacl_win64',
499 'app/policy/cloud_policy_codegen.gyp:policy_win64',
500 '../breakpad/breakpad.gyp:breakpad_handler_win64',
501 '../breakpad/breakpad.gyp:breakpad_sender_win64',
502 '../base/base.gyp:base_nacl_win64',
503 '../sandbox/sandbox.gyp:sandbox_win64',
506 '<@(nacl_win64_defines)',
509 '<(SHARED_INTERMEDIATE_DIR)/chrome',
513 'ImportLibrary': '$(OutDir)\\lib\\nacl64_exe.lib',
514 'ProgramDatabaseFile': '$(OutDir)\\nacl64_exe.pdb',
519 'msvs_target_platform': 'x64',