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