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