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