Roll DEPS for libelf clang compilation fix.
[chromium-blink-merge.git] / chrome / chrome_installer.gypi
bloba6443d7cd4a11cd89155974969ff76175e19be50
1 # Copyright (c) 2012 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.
6   'variables': {
7     'lastchange_path': '../build/util/LASTCHANGE',
8     'libpeer_target_type%': 'static_library',
9     # 'branding_dir' is set in the 'conditions' section at the bottom.
10   },
11   'conditions': [
12     ['OS=="win"', {
13       'targets': [
14         {
15           'target_name': 'gcapi_dll',
16           'type': 'loadable_module',
17           'dependencies': [
18             'gcapi_lib',
19           ],
20           'include_dirs': [
21             '..',
22           ],
23           'sources': [
24             'installer/gcapi/gcapi.def',
25             'installer/gcapi/gcapi_dll.cc',
26           ],
27         },
28         {
29           'target_name': 'gcapi_lib',
30           'type': 'static_library',
31           'dependencies': [
32             'installer_util',
33             '../base/base.gyp:base',
34             '../chrome/chrome.gyp:launcher_support',
35             '../google_update/google_update.gyp:google_update',
36           ],
37           'include_dirs': [
38             '..',
39           ],
40           'sources': [
41             'installer/gcapi/gcapi.cc',
42             'installer/gcapi/gcapi.h',
43             'installer/gcapi/gcapi_omaha_experiment.cc',
44             'installer/gcapi/gcapi_omaha_experiment.h',
45             'installer/gcapi/gcapi_reactivation.cc',
46             'installer/gcapi/gcapi_reactivation.h',
47           ],
48           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
49           'msvs_disabled_warnings': [ 4267, ],
50         },
51         {
52           'target_name': 'gcapi_test',
53           'type': 'executable',
54           'dependencies': [
55             'common',
56             'gcapi_dll',
57             'gcapi_lib',
58             'installer_util',
59             '../base/base.gyp:base',
60             '../base/base.gyp:test_support_base',
61             '../testing/gtest.gyp:gtest',
62           ],
63           'include_dirs': [
64             '..',
65           ],
66           'sources': [
67             'installer/gcapi/gcapi_last_run_test.cc',
68             'installer/gcapi/gcapi_omaha_experiment_test.cc',
69             'installer/gcapi/gcapi_reactivation_test.cc',
70             'installer/gcapi/gcapi_test_registry_overrider.cc',
71             'installer/gcapi/gcapi_test_registry_overrider.h',
72             'installer/gcapi/gcapi_test.cc',
73             'installer/gcapi/gcapi_test.rc',
74             'installer/gcapi/resource.h',
75           ],
76         },
77         {
78           'target_name': 'installer_util_unittests',
79           'type': 'executable',
80           'dependencies': [
81             'installer_util',
82             'installer_util_strings',
83             'installer/upgrade_test.gyp:alternate_version_generator_lib',
84             '../base/base.gyp:base',
85             '../base/base.gyp:base_i18n',
86             '../base/base.gyp:test_support_base',
87             '../chrome/chrome.gyp:chrome_version_resources',
88             '../content/content.gyp:content_common',
89             '../testing/gmock.gyp:gmock',
90             '../testing/gtest.gyp:gtest',
91           ],
92           'include_dirs': [
93             '..',
94           ],
95           'sources': [
96             'installer/setup/compat_checks_unittest.cc',
97             'installer/setup/setup_constants.cc',
98             'installer/util/advanced_firewall_manager_win_unittest.cc',
99             'installer/util/callback_work_item_unittest.cc',
100             'installer/util/channel_info_unittest.cc',
101             'installer/util/copy_tree_work_item_unittest.cc',
102             'installer/util/create_dir_work_item_unittest.cc',
103             'installer/util/create_reg_key_work_item_unittest.cc',
104             'installer/util/delete_after_reboot_helper_unittest.cc',
105             'installer/util/delete_reg_key_work_item_unittest.cc',
106             'installer/util/delete_reg_value_work_item_unittest.cc',
107             'installer/util/delete_tree_work_item_unittest.cc',
108             'installer/util/duplicate_tree_detector_unittest.cc',
109             'installer/util/fake_installation_state.h',
110             'installer/util/fake_product_state.h',
111             'installer/util/google_update_settings_unittest.cc',
112             'installer/util/install_util_unittest.cc',
113             'installer/util/installation_validation_helper.cc',
114             'installer/util/installation_validation_helper.h',
115             'installer/util/installation_validator_unittest.cc',
116             'installer/util/installer_state_unittest.cc',
117             'installer/util/installer_util_test_common.cc',
118             'installer/util/installer_util_test_common.h',
119             'installer/util/installer_util_unittests.rc',
120             'installer/util/installer_util_unittests_resource.h',
121             'installer/util/language_selector_unittest.cc',
122             'installer/util/legacy_firewall_manager_win_unittest.cc',
123             'installer/util/logging_installer_unittest.cc',
124             'installer/util/lzma_util_unittest.cc',
125             'installer/util/master_preferences_unittest.cc',
126             'installer/util/move_tree_work_item_unittest.cc',
127             'installer/util/product_state_unittest.cc',
128             'installer/util/product_unittest.cc',
129             'installer/util/product_unittest.h',
130             'installer/util/registry_key_backup_unittest.cc',
131             'installer/util/registry_test_data.cc',
132             'installer/util/registry_test_data.h',
133             'installer/util/run_all_unittests.cc',
134             'installer/util/self_cleaning_temp_dir_unittest.cc',
135             'installer/util/set_reg_value_work_item_unittest.cc',
136             'installer/util/shell_util_unittest.cc',
137             'installer/util/uninstall_metrics_unittest.cc',
138             'installer/util/wmi_unittest.cc',
139             'installer/util/work_item_list_unittest.cc',
140             '<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc',
141           ],
142           'msvs_settings': {
143             'VCManifestTool': {
144               'AdditionalManifestFiles': [
145                 '$(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest',
146               ],
147             },
148           },
149           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
150           'msvs_disabled_warnings': [ 4267, ],
151         },
152         {
153           'target_name': 'installer_util_strings',
154           'type': 'none',
155           'actions': [
156             {
157               'action_name': 'installer_util_strings',
158               'variables': {
159                 'create_string_rc_py': 'installer/util/prebuild/create_string_rc.py',
160               },
161               'conditions': [
162                 ['branding=="Chrome"', {
163                   'variables': {
164                     'brand_strings': 'google_chrome_strings',
165                   },
166                 }, {
167                   'variables': {
168                     'brand_strings': 'chromium_strings',
169                   },
170                 }],
171               ],
172               'inputs': [
173                 '<(create_string_rc_py)',
174                 'app/<(brand_strings).grd',
175               ],
176               'outputs': [
177                 '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.h',
178                 '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc',
179               ],
180               'action': ['python',
181                          '<(create_string_rc_py)',
182                          '-i', 'app/<(brand_strings).grd:resources',
183                          '-n', 'installer_util_strings',
184                          '-o', '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings',],
185               'message': 'Generating installer_util_strings',
186             },
187           ],
188           'direct_dependent_settings': {
189             'include_dirs': [
190               '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings',
191             ],
192           },
193         },
194         {
195           'target_name': 'launcher_support',
196           'type': 'static_library',
197           'include_dirs': [
198             '..',
199           ],
200           'direct_dependent_settings': {
201             'include_dirs': [
202               '..',
203             ],
204           },
205           'dependencies': [
206             '<(DEPTH)/base/base.gyp:base',
207           ],
208           'sources': [
209             'installer/launcher_support/chrome_launcher_support.cc',
210             'installer/launcher_support/chrome_launcher_support.h',
211           ],
212         },
213         {
214           'target_name': 'setup',
215           'type': 'executable',
216           'dependencies': [
217             'installer_util',
218             'installer_util_strings',
219             'launcher_support',
220             '../base/base.gyp:base',
221             '../breakpad/breakpad.gyp:breakpad_handler',
222             '../chrome/common_constants.gyp:common_constants',
223             '../chrome_elf/chrome_elf.gyp:chrome_elf_constants',
224             '../rlz/rlz.gyp:rlz_lib',
225             '../third_party/zlib/zlib.gyp:zlib',
226           ],
227           'include_dirs': [
228             '..',
229             '<(INTERMEDIATE_DIR)',
230             '<(SHARED_INTERMEDIATE_DIR)/setup',
231           ],
232           'direct_dependent_settings': {
233             'include_dirs': [
234               '<(SHARED_INTERMEDIATE_DIR)/setup',
235             ],
236           },
237           'sources': [
238             '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc',
239             'installer/mini_installer/chrome.release',
240             'installer/setup/archive_patch_helper.cc',
241             'installer/setup/archive_patch_helper.h',
242             'installer/setup/install.cc',
243             'installer/setup/install.h',
244             'installer/setup/install_worker.cc',
245             'installer/setup/install_worker.h',
246             'installer/setup/setup_main.cc',
247             'installer/setup/setup_main.h',
248             'installer/setup/setup.ico',
249             'installer/setup/setup.rc',
250             'installer/setup/setup_constants.cc',
251             'installer/setup/setup_constants.h',
252             'installer/setup/setup_exe_version.rc.version',
253             'installer/setup/setup_resource.h',
254             'installer/setup/setup_util.cc',
255             'installer/setup/setup_util.h',
256             'installer/setup/uninstall.cc',
257             'installer/setup/uninstall.h',
258           ],
259           'msvs_settings': {
260             'VCLinkerTool': {
261               'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
262             },
263             'VCManifestTool': {
264               'AdditionalManifestFiles': [
265                 '$(ProjectDir)\\installer\\setup\\setup.exe.manifest',
266               ],
267             },
268           },
269           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
270           'msvs_disabled_warnings': [ 4267, ],
271           'rules': [
272             {
273               'rule_name': 'setup_version',
274               'extension': 'version',
275               'variables': {
276                 'version_py_path': '<(DEPTH)/build/util/version.py',
277                 'template_input_path': 'installer/setup/setup_exe_version.rc.version',
278               },
279               'inputs': [
280                 '<(template_input_path)',
281                 '<(version_path)',
282                 '<(lastchange_path)',
283                 '<(branding_dir)/BRANDING',
284               ],
285               'outputs': [
286                 '<(SHARED_INTERMEDIATE_DIR)/setup/setup_exe_version.rc',
287               ],
288               'action': [
289                 'python', '<(version_py_path)',
290                 '-f', '<(version_path)',
291                 '-f', '<(lastchange_path)',
292                 '-f', '<(branding_dir)/BRANDING',
293                 '<(template_input_path)',
294                 '<@(_outputs)',
295               ],
296               'process_outputs_as_sources': 1,
297               'message': 'Generating version information'
298             },
299           ],
300           'conditions': [
301             # TODO(mark):  <(branding_dir) should be defined by the
302             # global condition block at the bottom of the file, but
303             # this doesn't work due to the following issue:
304             #
305             #   http://code.google.com/p/gyp/issues/detail?id=22
306             #
307             # Remove this block once the above issue is fixed.
308             [ 'branding == "Chrome"', {
309               'variables': {
310                  'branding_dir': 'app/theme/google_chrome',
311                  'branding_dir_100': 'app/theme/default_100_percent/google_chrome',
312               },
313             }, { # else branding!="Chrome"
314               'variables': {
315                  'branding_dir': 'app/theme/chromium',
316                  'branding_dir_100': 'app/theme/default_100_percent/chromium',
317               },
318             }],
319             ['target_arch=="ia32"', {
320               'msvs_settings': {
321                 'VCCLCompilerTool': {
322                   'EnableEnhancedInstructionSet': '4',  # NoExtensions
323                 },
324               },
325             }],
326           ],
327         },
328         {
329           'target_name': 'setup_unittests',
330           'type': 'executable',
331           'dependencies': [
332             'installer_util',
333             'installer_util_strings',
334             'launcher_support',
335             '../base/base.gyp:base',
336             '../base/base.gyp:base_i18n',
337             '../base/base.gyp:test_support_base',
338             '../testing/gmock.gyp:gmock',
339             '../testing/gtest.gyp:gtest',
340           ],
341           'include_dirs': [
342             '..',
343             '<(INTERMEDIATE_DIR)',
344           ],
345           # TODO(robertshield): Move the items marked with "Move to lib"
346           # below into a separate lib and then link both setup.exe and
347           # setup_unittests.exe against that.
348           'sources': [
349             'installer/mini_installer/chrome.release',  # Move to lib
350             'installer/mini_installer/appid.h',
351             'installer/mini_installer/chrome_appid.cc',
352             'installer/mini_installer/configuration.cc',
353             'installer/mini_installer/configuration.h',
354             'installer/mini_installer/configuration_test.cc',
355             'installer/mini_installer/decompress.cc',
356             'installer/mini_installer/decompress.h',
357             'installer/mini_installer/decompress_test.cc',
358             'installer/mini_installer/mini_string.cc',
359             'installer/mini_installer/mini_string.h',
360             'installer/mini_installer/mini_string_test.cc',
361             'installer/setup/archive_patch_helper.cc',  # Move to lib
362             'installer/setup/archive_patch_helper.h',   # Move to lib
363             'installer/setup/archive_patch_helper_unittest.cc',
364             'installer/setup/install.cc',               # Move to lib
365             'installer/setup/install.h',                # Move to lib
366             'installer/setup/install_unittest.cc',
367             'installer/setup/install_worker.cc',        # Move to lib
368             'installer/setup/install_worker.h',         # Move to lib
369             'installer/setup/install_worker_unittest.cc',
370             'installer/setup/run_all_unittests.cc',
371             'installer/setup/setup_constants.cc',       # Move to lib
372             'installer/setup/setup_constants.h',        # Move to lib
373             'installer/setup/setup_unittests.rc',
374             'installer/setup/setup_unittests_resource.h',
375             'installer/setup/setup_util.cc',
376             'installer/setup/setup_util_unittest.cc',
377             'installer/setup/setup_util_unittest.h',
378           ],
379           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
380           'msvs_disabled_warnings': [ 4267, ],
381         },
382       ],
383     }],
384     ['OS=="win" and target_arch=="ia32"', {
385       'targets': [
386         {
387           'target_name': 'launcher_support64',
388           'type': 'static_library',
389           'include_dirs': [
390             '..',
391           ],
392           'direct_dependent_settings': {
393             'include_dirs': [
394               '..',
395             ],
396           },
397           'defines': [
398               '<@(nacl_win64_defines)',
399           ],
400               'dependencies': [
401               '<(DEPTH)/base/base.gyp:base_win64',
402           ],
403           'configurations': {
404             'Common_Base': {
405               'msvs_target_platform': 'x64',
406             },
407           },
408           'sources': [
409             'installer/launcher_support/chrome_launcher_support.cc',
410             'installer/launcher_support/chrome_launcher_support.h',
411           ],
412         },
413       ],
414     }],
415     ['OS=="linux" and branding=="Chrome"', {
416       'variables': {
417         # Always google_chrome since this only applies to branding==Chrome.
418         'branding_dir': 'app/theme/google_chrome',
419         'branding_dir_100': 'app/theme/default_100_percent/google_chrome',
420         'version' : '<!(python <(version_py_path) -f ../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
421         'revision' : '<!(python ../build/util/lastchange.py --revision-only)',
422         'packaging_files_common': [
423           'installer/linux/common/apt.include',
424           'installer/linux/common/default-app.template',
425           'installer/linux/common/default-app-block.template',
426           'installer/linux/common/desktop.template',
427           'installer/linux/common/google-chrome/google-chrome.info',
428           'installer/linux/common/installer.include',
429           'installer/linux/common/postinst.include',
430           'installer/linux/common/prerm.include',
431           'installer/linux/common/repo.cron',
432           'installer/linux/common/rpm.include',
433           'installer/linux/common/rpmrepo.cron',
434           'installer/linux/common/symlinks.include',
435           'installer/linux/common/variables.include',
436           'installer/linux/common/wrapper',
437         ],
438         'packaging_files_deb': [
439           'installer/linux/debian/build.sh',
440           'installer/linux/debian/changelog.template',
441           'installer/linux/debian/control.template',
442           'installer/linux/debian/debian.menu',
443           'installer/linux/debian/expected_deps',
444           'installer/linux/debian/postinst',
445           'installer/linux/debian/postrm',
446           'installer/linux/debian/prerm',
447         ],
448         'packaging_files_rpm': [
449           'installer/linux/rpm/build.sh',
450           'installer/linux/rpm/chrome.spec.template',
451           'installer/linux/rpm/expected_deps_i386',
452           'installer/linux/rpm/expected_deps_x86_64',
453         ],
454         'packaging_files_binaries': [
455           # TODO(mmoss) Any convenient way to get all the relevant build
456           # files? (e.g. all locales, resources, etc.)
457           '<(PRODUCT_DIR)/chrome',
458           '<(PRODUCT_DIR)/chrome_sandbox',
459           '<(PRODUCT_DIR)/libffmpegsumo.so',
460           '<(PRODUCT_DIR)/libpdf.so',
461           '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
462           '<(PRODUCT_DIR)/xdg-mime',
463           '<(PRODUCT_DIR)/xdg-settings',
464           '<(PRODUCT_DIR)/locales/en-US.pak',
465           '<(PRODUCT_DIR)/nacl_helper',
466           '<(PRODUCT_DIR)/nacl_helper_bootstrap',
467           '<(PRODUCT_DIR)/PepperFlash/libpepflashplayer.so',
468           '<(PRODUCT_DIR)/PepperFlash/manifest.json',
469           '<@(default_apps_list_linux_dest)',
470         ],
471         'flock_bash': ['flock', '--', '/tmp/linux_package_lock', 'bash'],
472         'deb_build': '<(PRODUCT_DIR)/installer/debian/build.sh',
473         'rpm_build': '<(PRODUCT_DIR)/installer/rpm/build.sh',
474         'deb_cmd': ['<@(flock_bash)', '<(deb_build)', '-o' '<(PRODUCT_DIR)',
475                     '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'],
476         'rpm_cmd': ['<@(flock_bash)', '<(rpm_build)', '-o' '<(PRODUCT_DIR)',
477                     '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'],
478         'conditions': [
479           ['target_arch=="ia32"', {
480             'deb_arch': 'i386',
481             'rpm_arch': 'i386',
482             'packaging_files_binaries': [
483               '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
484               '<(PRODUCT_DIR)/libwidevinecdmadapter.so',
485               '<(PRODUCT_DIR)/libwidevinecdm.so',
486             ],
487             'packaging_files_common': [
488               '<(DEPTH)/build/linux/bin/eu-strip',
489             ],
490           }],
491           ['target_arch=="x64"', {
492             'deb_arch': 'amd64',
493             'rpm_arch': 'x86_64',
494             'packaging_files_binaries': [
495               '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
496               '<(PRODUCT_DIR)/libwidevinecdmadapter.so',
497               '<(PRODUCT_DIR)/libwidevinecdm.so',
498             ],
499             'packaging_files_common': [
500               '<!(which eu-strip)',
501             ],
502           }],
503           ['target_arch=="arm"', {
504             'deb_arch': 'arm',
505             'rpm_arch': 'arm',
506           }],
507           ['libpeer_target_type!="static_library"', {
508             'packaging_files_binaries': [
509               '<(PRODUCT_DIR)/lib/libpeerconnection.so',
510             ],
511           }],
512         ],
513       },
514       'targets': [
515         {
516           'target_name': 'linux_installer_configs',
517           'type': 'none',
518           # Add these files to the build output so the build archives will be
519           # "hermetic" for packaging. This is only for branding="Chrome" since
520           # we only create packages for official builds.
521           'copies': [
522             {
523               'destination': '<(PRODUCT_DIR)/installer/debian/',
524               'files': [
525                 '<@(packaging_files_deb)',
526               ]
527             },
528             {
529               'destination': '<(PRODUCT_DIR)/installer/rpm/',
530               'files': [
531                 '<@(packaging_files_rpm)',
532               ]
533             },
534             {
535               'destination': '<(PRODUCT_DIR)/installer/common/',
536               'files': [
537                 '<@(packaging_files_common)',
538               ]
539             },
540             # Additional theme resources needed for package building.
541             {
542               'destination': '<(PRODUCT_DIR)/installer/theme/',
543               'files': [
544                 '<(branding_dir_100)/product_logo_16.png',
545                 '<(branding_dir)/product_logo_22.png',
546                 '<(branding_dir)/product_logo_24.png',
547                 '<(branding_dir_100)/product_logo_32.png',
548                 '<(branding_dir)/product_logo_48.png',
549                 '<(branding_dir)/product_logo_64.png',
550                 '<(branding_dir)/product_logo_128.png',
551                 '<(branding_dir)/product_logo_256.png',
552                 '<(branding_dir)/product_logo_32.xpm',
553                 '<(branding_dir)/BRANDING',
554               ],
555             },
556           ],
557           'actions': [
558             {
559               'action_name': 'save_build_info',
560               'inputs': [
561                 '<(branding_dir)/BRANDING',
562                 '<(version_path)',
563                 '<(lastchange_path)',
564               ],
565               'outputs': [
566                 '<(PRODUCT_DIR)/installer/version.txt',
567               ],
568               # Just output the default version info variables.
569               'action': [
570                 'python', '<(version_py_path)',
571                 '-f', '<(branding_dir)/BRANDING',
572                 '-f', '<(version_path)',
573                 '-f', '<(lastchange_path)',
574                 '-o', '<@(_outputs)'
575               ],
576             },
577           ],
578         },
579         {
580           'target_name': 'linux_packages_all',
581           'suppress_wildcard': 1,
582           'type': 'none',
583           'dependencies': [
584             'linux_packages_unstable',
585             'linux_packages_beta',
586             'linux_packages_stable',
587           ],
588         },
589         {
590           # 'asan' is a developer, testing-only package, so it shouldn't be
591           # included in the 'linux_packages_all' collection.
592           'target_name': 'linux_packages_asan',
593           'suppress_wildcard': 1,
594           'type': 'none',
595           'dependencies': [
596             'linux_packages_asan_deb',
597           ],
598           # ChromeOS doesn't care about RPM packages.
599           'conditions': [
600             ['chromeos==0', {
601               'dependencies': [
602                 'linux_packages_asan_rpm',
603               ],
604             }],
605           ],
606         },
607         {
608           # 'trunk' is a developer, testing-only package, so it shouldn't be
609           # included in the 'linux_packages_all' collection.
610           'target_name': 'linux_packages_trunk',
611           'suppress_wildcard': 1,
612           'type': 'none',
613           'dependencies': [
614             'linux_packages_trunk_deb',
615           ],
616           # ChromeOS doesn't care about RPM packages.
617           'conditions': [
618             ['chromeos==0', {
619               'dependencies': [
620                 'linux_packages_trunk_rpm',
621               ],
622             }],
623           ],
624         },
625         {
626           'target_name': 'linux_packages_unstable',
627           'suppress_wildcard': 1,
628           'type': 'none',
629           'dependencies': [
630             'linux_packages_unstable_deb',
631           ],
632           # ChromeOS doesn't care about RPM packages.
633           'conditions': [
634             ['chromeos==0', {
635               'dependencies': [
636                 'linux_packages_unstable_rpm',
637               ],
638             }],
639           ],
640         },
641         {
642           'target_name': 'linux_packages_beta',
643           'suppress_wildcard': 1,
644           'type': 'none',
645           'dependencies': [
646             'linux_packages_beta_deb',
647           ],
648           # ChromeOS doesn't care about RPM packages.
649           'conditions': [
650             ['chromeos==0', {
651               'dependencies': [
652                 'linux_packages_beta_rpm',
653               ],
654             }],
655           ],
656         },
657         {
658           'target_name': 'linux_packages_stable',
659           'suppress_wildcard': 1,
660           'type': 'none',
661           'dependencies': [
662             'linux_packages_stable_deb',
663           ],
664           # ChromeOS doesn't care about RPM packages.
665           'conditions': [
666             ['chromeos==0', {
667               'dependencies': [
668                 'linux_packages_stable_rpm',
669               ],
670             }],
671           ],
672         },
673         # TODO(mmoss) gyp looping construct would be handy here ...
674         # These package actions are the same except for the 'channel' variable.
675         {
676           'target_name': 'linux_packages_asan_deb',
677           'suppress_wildcard': 1,
678           'type': 'none',
679           'dependencies': [
680             'chrome',
681             'linux_installer_configs',
682           ],
683           'actions': [
684             {
685               'variables': {
686                 'channel': 'asan',
687               },
688               'action_name': 'deb_packages_<(channel)',
689               'process_outputs_as_sources': 1,
690               'inputs': [
691                 '<(deb_build)',
692                 '<@(packaging_files_binaries)',
693                 '<@(packaging_files_common)',
694                 '<@(packaging_files_deb)',
695               ],
696               'outputs': [
697                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
698               ],
699               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
700             },
701           ],
702         },
703         {
704           'target_name': 'linux_packages_trunk_deb',
705           'suppress_wildcard': 1,
706           'type': 'none',
707           'dependencies': [
708             'chrome',
709             'linux_installer_configs',
710           ],
711           'actions': [
712             {
713               'variables': {
714                 'channel': 'trunk',
715               },
716               'action_name': 'deb_packages_<(channel)',
717               'process_outputs_as_sources': 1,
718               'inputs': [
719                 '<(deb_build)',
720                 '<@(packaging_files_binaries)',
721                 '<@(packaging_files_common)',
722                 '<@(packaging_files_deb)',
723               ],
724               'outputs': [
725                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
726               ],
727               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
728             },
729           ],
730         },
731         {
732           'target_name': 'linux_packages_unstable_deb',
733           'suppress_wildcard': 1,
734           'type': 'none',
735           'dependencies': [
736             'chrome',
737             'linux_installer_configs',
738           ],
739           'actions': [
740             {
741               'variables': {
742                 'channel': 'unstable',
743               },
744               'action_name': 'deb_packages_<(channel)',
745               'process_outputs_as_sources': 1,
746               'inputs': [
747                 '<(deb_build)',
748                 '<@(packaging_files_binaries)',
749                 '<@(packaging_files_common)',
750                 '<@(packaging_files_deb)',
751               ],
752               'outputs': [
753                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
754               ],
755               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
756             },
757           ],
758         },
759         {
760           'target_name': 'linux_packages_beta_deb',
761           'suppress_wildcard': 1,
762           'type': 'none',
763           'dependencies': [
764             'chrome',
765             'linux_installer_configs',
766           ],
767           'actions': [
768             {
769               'variables': {
770                 'channel': 'beta',
771               },
772               'action_name': 'deb_packages_<(channel)',
773               'process_outputs_as_sources': 1,
774               'inputs': [
775                 '<(deb_build)',
776                 '<@(packaging_files_binaries)',
777                 '<@(packaging_files_common)',
778                 '<@(packaging_files_deb)',
779               ],
780               'outputs': [
781                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
782               ],
783               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
784             },
785           ],
786         },
787         {
788           'target_name': 'linux_packages_stable_deb',
789           'suppress_wildcard': 1,
790           'type': 'none',
791           'dependencies': [
792             'chrome',
793             'linux_installer_configs',
794           ],
795           'actions': [
796             {
797               'variables': {
798                 'channel': 'stable',
799               },
800               'action_name': 'deb_packages_<(channel)',
801               'process_outputs_as_sources': 1,
802               'inputs': [
803                 '<(deb_build)',
804                 '<@(packaging_files_binaries)',
805                 '<@(packaging_files_common)',
806                 '<@(packaging_files_deb)',
807               ],
808               'outputs': [
809                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
810               ],
811               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
812             },
813           ],
814         },
815         {
816           'target_name': 'linux_packages_asan_rpm',
817           'suppress_wildcard': 1,
818           'type': 'none',
819           'dependencies': [
820             'chrome',
821             'linux_installer_configs',
822           ],
823           'actions': [
824             {
825               'variables': {
826                 'channel': 'asan',
827               },
828               'action_name': 'rpm_packages_<(channel)',
829               'process_outputs_as_sources': 1,
830               'inputs': [
831                 '<(rpm_build)',
832                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
833                 '<@(packaging_files_binaries)',
834                 '<@(packaging_files_common)',
835                 '<@(packaging_files_rpm)',
836               ],
837               'outputs': [
838                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
839               ],
840               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
841             },
842           ],
843         },
844         {
845           'target_name': 'linux_packages_trunk_rpm',
846           'suppress_wildcard': 1,
847           'type': 'none',
848           'dependencies': [
849             'chrome',
850             'linux_installer_configs',
851           ],
852           'actions': [
853             {
854               'variables': {
855                 'channel': 'trunk',
856               },
857               'action_name': 'rpm_packages_<(channel)',
858               'process_outputs_as_sources': 1,
859               'inputs': [
860                 '<(rpm_build)',
861                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
862                 '<@(packaging_files_binaries)',
863                 '<@(packaging_files_common)',
864                 '<@(packaging_files_rpm)',
865               ],
866               'outputs': [
867                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
868               ],
869               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
870             },
871           ],
872         },
873         {
874           'target_name': 'linux_packages_unstable_rpm',
875           'suppress_wildcard': 1,
876           'type': 'none',
877           'dependencies': [
878             'chrome',
879             'linux_installer_configs',
880           ],
881           'actions': [
882             {
883               'variables': {
884                 'channel': 'unstable',
885               },
886               'action_name': 'rpm_packages_<(channel)',
887               'process_outputs_as_sources': 1,
888               'inputs': [
889                 '<(rpm_build)',
890                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
891                 '<@(packaging_files_binaries)',
892                 '<@(packaging_files_common)',
893                 '<@(packaging_files_rpm)',
894               ],
895               'outputs': [
896                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
897               ],
898               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
899             },
900           ],
901         },
902         {
903           'target_name': 'linux_packages_beta_rpm',
904           'suppress_wildcard': 1,
905           'type': 'none',
906           'dependencies': [
907             'chrome',
908             'linux_installer_configs',
909           ],
910           'actions': [
911             {
912               'variables': {
913                 'channel': 'beta',
914               },
915               'action_name': 'rpm_packages_<(channel)',
916               'process_outputs_as_sources': 1,
917               'inputs': [
918                 '<(rpm_build)',
919                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
920                 '<@(packaging_files_binaries)',
921                 '<@(packaging_files_common)',
922                 '<@(packaging_files_rpm)',
923               ],
924               'outputs': [
925                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
926               ],
927               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
928             },
929           ],
930         },
931         {
932           'target_name': 'linux_packages_stable_rpm',
933           'suppress_wildcard': 1,
934           'type': 'none',
935           'dependencies': [
936             'chrome',
937             'linux_installer_configs',
938           ],
939           'actions': [
940             {
941               'variables': {
942                 'channel': 'stable',
943               },
944               'action_name': 'rpm_packages_<(channel)',
945               'process_outputs_as_sources': 1,
946               'inputs': [
947                 '<(rpm_build)',
948                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
949                 '<@(packaging_files_binaries)',
950                 '<@(packaging_files_common)',
951                 '<@(packaging_files_rpm)',
952               ],
953               'outputs': [
954                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
955               ],
956               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
957             },
958           ],
959         },
960       ],
961     }],
962     ['OS=="mac"', {
963       'variables': {
964         'mac_packaging_dir':
965             '<(PRODUCT_DIR)/<(mac_product_name) Packaging',
966         # <(PRODUCT_DIR) expands to $(BUILT_PRODUCTS_DIR), which doesn't
967         # work properly in a shell script, where ${BUILT_PRODUCTS_DIR} is
968         # needed.
969         'mac_packaging_sh_dir':
970             '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Packaging',
971       }, # variables
972       'targets': [
973         {
974           'target_name': 'installer_packaging',
975           'type': 'none',
976           'dependencies': [
977             'installer/mac/third_party/bsdiff/goobsdiff.gyp:*',
978             'installer/mac/third_party/xz/xz.gyp:*',
979           ],
980           'conditions': [
981             ['buildtype=="Official"', {
982               'actions': [
983                 {
984                   # Create sign.sh, the script that the packaging system will
985                   # use to sign the .app bundle.
986                   'action_name': 'Make sign.sh',
987                   'variables': {
988                     'make_signers_sh_path': 'installer/mac/make_signers.sh',
989                   },
990                   'inputs': [
991                     '<(make_signers_sh_path)',
992                     'installer/mac/sign_app.sh.in',
993                     'installer/mac/sign_versioned_dir.sh.in',
994                     'installer/mac/app_resource_rules.plist.in',
995                     '<(version_path)',
996                   ],
997                   'outputs': [
998                     '<(mac_packaging_dir)/sign_app.sh',
999                     '<(mac_packaging_dir)/sign_versioned_dir.sh',
1000                     '<(mac_packaging_dir)/app_resource_rules.plist',
1001                   ],
1002                   'action': [
1003                     '<(make_signers_sh_path)',
1004                     '<(mac_packaging_sh_dir)',
1005                     '<(mac_product_name)',
1006                     '<(version_full)',
1007                   ],
1008                 },
1009               ],  # actions
1010             }],  # buildtype=="Official"
1011           ],  # conditions
1012           'copies': [
1013             {
1014               # Put the files where the packaging system will find them. The
1015               # packager will use these when building the "full installer"
1016               # disk images and delta/differential update disk images.
1017               'destination': '<(mac_packaging_dir)',
1018               'files': [
1019                 '<(PRODUCT_DIR)/goobsdiff',
1020                 '<(PRODUCT_DIR)/goobspatch',
1021                 '<(PRODUCT_DIR)/liblzma_decompress.dylib',
1022                 '<(PRODUCT_DIR)/xz',
1023                 '<(PRODUCT_DIR)/xzdec',
1024                 'installer/mac/dirdiffer.sh',
1025                 'installer/mac/dirpatcher.sh',
1026                 'installer/mac/dmgdiffer.sh',
1027                 'installer/mac/pkg-dmg',
1028               ],
1029               'conditions': [
1030                 ['mac_keystone==1', {
1031                   'files': [
1032                     'installer/mac/keystone_install.sh',
1033                   ],
1034                 }],  # mac_keystone
1035                 ['branding=="Chrome" and buildtype=="Official"', {
1036                   'files': [
1037                     'app/theme/google_chrome/mac/app_canary.icns',
1038                     'app/theme/google_chrome/mac/document_canary.icns',
1039                     'installer/mac/internal/chrome_canary_dmg_dsstore',
1040                     'installer/mac/internal/chrome_canary_dmg_icon.icns',
1041                     'installer/mac/internal/chrome_dmg_background.png',
1042                     'installer/mac/internal/chrome_dmg_dsstore',
1043                     'installer/mac/internal/chrome_dmg_icon.icns',
1044                     'installer/mac/internal/generate_dmgs',
1045                   ],
1046                 }],  # branding=="Chrome" and buildtype=="Official"
1047               ],  # conditions
1048             },
1049           ],  # copies
1050         },  # target: installer_packaging
1051         {
1052           'target_name': 'gcapi_lib',
1053           'type': 'static_library',
1054           'include_dirs': [
1055             '..',
1056           ],
1057           'sources': [
1058             'installer/gcapi_mac/gcapi.h',
1059             'installer/gcapi_mac/gcapi.mm',
1060           ],
1061           'link_settings': {
1062             'libraries': [
1063               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
1064             ],
1065           },
1066           'xcode_settings': {
1067             'ARCHS': [ 'i386', 'x86_64' ],
1068             'MACOSX_DEPLOYMENT_TARGET': '10.4',
1069             'GCC_ENABLE_OBJC_GC': 'supported',
1070           },
1071         },
1072         {
1073           'target_name': 'gcapi_example',
1074           'type': 'executable',
1075           'dependencies': [
1076             'gcapi_lib',
1077           ],
1078           'include_dirs': [
1079             '..',
1080           ],
1081           'sources': [
1082             'installer/gcapi_mac/gcapi_example_client.mm',
1083           ],
1084         },
1085       ],  # targets
1086     }],  # OS=="mac"
1087     [ 'branding == "Chrome"', {
1088       'variables': {
1089          'branding_dir': 'app/theme/google_chrome',
1090          'branding_dir_100': 'app/theme/default_100_percent/google_chrome',
1091       },
1092     }, { # else branding!="Chrome"
1093       'variables': {
1094          'branding_dir': 'app/theme/chromium',
1095          'branding_dir_100': 'app/theme/default_100_percent/chromium',
1096       },
1097     }],
1098   ],