[BackgroundSync] Clean up some tests
[chromium-blink-merge.git] / chrome / chrome_installer.gypi
blobcc1a33205c759eae5b4e238c47339ad3d80084a3
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           ],
257           'msvs_settings': {
258             'VCLinkerTool': {
259               'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
260             },
261             'VCManifestTool': {
262               'AdditionalManifestFiles': [
263                 '$(ProjectDir)\\installer\\setup\\setup.exe.manifest',
264               ],
265             },
266           },
267           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
268           'msvs_disabled_warnings': [ 4267, ],
269           'rules': [
270             {
271               'rule_name': 'setup_version',
272               'extension': 'version',
273               'variables': {
274                 'version_py_path': '<(DEPTH)/build/util/version.py',
275                 'template_input_path': 'installer/setup/setup_exe_version.rc.version',
276               },
277               'inputs': [
278                 '<(template_input_path)',
279                 '<(version_path)',
280                 '<(lastchange_path)',
281                 '<(branding_dir)/BRANDING',
282               ],
283               'outputs': [
284                 '<(SHARED_INTERMEDIATE_DIR)/setup/setup_exe_version.rc',
285               ],
286               'action': [
287                 'python', '<(version_py_path)',
288                 '-f', '<(version_path)',
289                 '-f', '<(lastchange_path)',
290                 '-f', '<(branding_dir)/BRANDING',
291                 '<(template_input_path)',
292                 '<@(_outputs)',
293               ],
294               'process_outputs_as_sources': 1,
295               'message': 'Generating version information'
296             },
297           ],
298           'conditions': [
299             ['target_arch=="ia32"', {
300               'msvs_settings': {
301                 'VCCLCompilerTool': {
302                   'EnableEnhancedInstructionSet': '4',  # NoExtensions
303                 },
304               },
305             }],
306           ],
307         },
308         {
309           'target_name': 'setup_unittests',
310           'type': 'executable',
311           'dependencies': [
312             'installer_util',
313             'installer_util_strings',
314             '../base/base.gyp:base',
315             '../base/base.gyp:base_i18n',
316             '../base/base.gyp:test_support_base',
317             '../testing/gmock.gyp:gmock',
318             '../testing/gtest.gyp:gtest',
319           ],
320           'include_dirs': [
321             '..',
322             '<(INTERMEDIATE_DIR)',
323           ],
324           # TODO(robertshield): Move the items marked with "Move to lib"
325           # below into a separate lib and then link both setup.exe and
326           # setup_unittests.exe against that.
327           'sources': [
328             'installer/mini_installer/chrome.release',  # Move to lib
329             'installer/mini_installer/appid.h',
330             'installer/mini_installer/chrome_appid.cc',
331             'installer/mini_installer/configuration.cc',
332             'installer/mini_installer/configuration.h',
333             'installer/mini_installer/configuration_test.cc',
334             'installer/mini_installer/decompress.cc',
335             'installer/mini_installer/decompress.h',
336             'installer/mini_installer/decompress_test.cc',
337             'installer/mini_installer/mini_string.cc',
338             'installer/mini_installer/mini_string.h',
339             'installer/mini_installer/mini_string_test.cc',
340             'installer/setup/app_launcher_installer.cc',  # Move to lib
341             'installer/setup/app_launcher_installer.h',  # Move to lib
342             'installer/setup/archive_patch_helper.cc',  # Move to lib
343             'installer/setup/archive_patch_helper.h',   # Move to lib
344             'installer/setup/archive_patch_helper_unittest.cc',
345             'installer/setup/install.cc',               # Move to lib
346             'installer/setup/install.h',                # Move to lib
347             'installer/setup/install_unittest.cc',
348             'installer/setup/install_worker.cc',        # Move to lib
349             'installer/setup/install_worker.h',         # Move to lib
350             'installer/setup/install_worker_unittest.cc',
351             'installer/setup/run_all_unittests.cc',
352             'installer/setup/setup_constants.cc',       # Move to lib
353             'installer/setup/setup_constants.h',        # Move to lib
354             'installer/setup/setup_unittests.rc',
355             'installer/setup/setup_unittests_resource.h',
356             'installer/setup/setup_util.cc',
357             'installer/setup/setup_util_unittest.cc',
358             'installer/setup/setup_util_unittest.h',
359           ],
360           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
361           'msvs_disabled_warnings': [ 4267, ],
362         },
363       ],
364     }],
365     ['OS=="win" and target_arch=="ia32"', {
366       'targets': [
367         {
368           'target_name': 'launcher_support64',
369           'type': 'static_library',
370           'include_dirs': [
371             '..',
372           ],
373           'direct_dependent_settings': {
374             'include_dirs': [
375               '..',
376             ],
377           },
378           'defines': [
379               '<@(nacl_win64_defines)',
380           ],
381               'dependencies': [
382               '<(DEPTH)/base/base.gyp:base_win64',
383           ],
384           'configurations': {
385             'Common_Base': {
386               'msvs_target_platform': 'x64',
387             },
388           },
389           'sources': [
390             'installer/launcher_support/chrome_launcher_support.cc',
391             'installer/launcher_support/chrome_launcher_support.h',
392           ],
393         },
394       ],
395     }],
396     ['OS=="linux" and branding=="Chrome"', {
397       'variables': {
398         # Always google_chrome since this only applies to branding==Chrome.
399         'branding_dir': 'app/theme/google_chrome',
400         'branding_dir_100': 'app/theme/default_100_percent/google_chrome',
401         'version' : '<!(python <(version_py_path) -f ../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
402         'revision' : '<!(python ../build/util/lastchange.py --revision-only)',
403         'packaging_files_common': [
404           'installer/linux/common/apt.include',
405           'installer/linux/common/default-app.template',
406           'installer/linux/common/default-app-block.template',
407           'installer/linux/common/desktop.template',
408           'installer/linux/common/google-chrome/google-chrome.info',
409           'installer/linux/common/installer.include',
410           'installer/linux/common/postinst.include',
411           'installer/linux/common/prerm.include',
412           'installer/linux/common/repo.cron',
413           'installer/linux/common/rpm.include',
414           'installer/linux/common/rpmrepo.cron',
415           'installer/linux/common/symlinks.include',
416           'installer/linux/common/variables.include',
417           'installer/linux/common/wrapper',
418         ],
419         'packaging_files_deb': [
420           'installer/linux/debian/build.sh',
421           'installer/linux/debian/changelog.template',
422           'installer/linux/debian/control.template',
423           'installer/linux/debian/debian.menu',
424           'installer/linux/debian/expected_deps_ia32',
425           'installer/linux/debian/expected_deps_x64',
426           'installer/linux/debian/postinst',
427           'installer/linux/debian/postrm',
428           'installer/linux/debian/prerm',
429         ],
430         'packaging_files_rpm': [
431           'installer/linux/rpm/build.sh',
432           'installer/linux/rpm/chrome.spec.template',
433           'installer/linux/rpm/expected_deps_i386',
434           'installer/linux/rpm/expected_deps_x86_64',
435         ],
436         'packaging_files_binaries': [
437           # TODO(mmoss) Any convenient way to get all the relevant build
438           # files? (e.g. all locales, resources, etc.)
439           '<(PRODUCT_DIR)/chrome',
440           '<(PRODUCT_DIR)/chrome_sandbox',
441           '<(PRODUCT_DIR)/libffmpegsumo.so',
442           '<(PRODUCT_DIR)/xdg-mime',
443           '<(PRODUCT_DIR)/xdg-settings',
444           '<(PRODUCT_DIR)/locales/en-US.pak',
445           '<(PRODUCT_DIR)/nacl_helper',
446           '<(PRODUCT_DIR)/nacl_helper_bootstrap',
447           '<(PRODUCT_DIR)/PepperFlash/libpepflashplayer.so',
448           '<(PRODUCT_DIR)/PepperFlash/manifest.json',
449           '<@(default_apps_list_linux_dest)',
450         ],
451         'flock_bash': ['flock', '--', '/tmp/linux_package_lock', 'bash'],
452         'deb_build': '<(PRODUCT_DIR)/installer/debian/build.sh',
453         'rpm_build': '<(PRODUCT_DIR)/installer/rpm/build.sh',
454         'deb_cmd': ['<@(flock_bash)', '<(deb_build)', '-o' '<(PRODUCT_DIR)',
455                     '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'],
456         'rpm_cmd': ['<@(flock_bash)', '<(rpm_build)', '-o' '<(PRODUCT_DIR)',
457                     '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'],
458         'conditions': [
459           ['target_arch=="ia32"', {
460             'deb_arch': 'i386',
461             'rpm_arch': 'i386',
462             'packaging_files_binaries': [
463               '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
464               '<(PRODUCT_DIR)/libwidevinecdmadapter.so',
465               '<(PRODUCT_DIR)/libwidevinecdm.so',
466             ],
467             'packaging_files_common': [
468               '<(DEPTH)/build/linux/bin/eu-strip',
469             ],
470           }],
471           ['target_arch=="x64"', {
472             'deb_arch': 'amd64',
473             'rpm_arch': 'x86_64',
474             'packaging_files_binaries': [
475               '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
476               '<(PRODUCT_DIR)/libwidevinecdmadapter.so',
477               '<(PRODUCT_DIR)/libwidevinecdm.so',
478             ],
479             'packaging_files_common': [
480               '<!(which eu-strip)',
481             ],
482           }],
483           ['target_arch=="arm"', {
484             'deb_arch': 'arm',
485             'rpm_arch': 'arm',
486           }],
487           ['libpeer_target_type!="static_library"', {
488             'packaging_files_binaries': [
489               '<(PRODUCT_DIR)/lib/libpeerconnection.so',
490             ],
491           }],
492           ['asan==1', {
493             'packaging_files_binaries': [
494               '<(PRODUCT_DIR)/lib/libc++.so',
495             ],
496           }],
497         ],
498       },
499       'targets': [
500         {
501           'target_name': 'linux_installer_configs',
502           'type': 'none',
503           # Add these files to the build output so the build archives will be
504           # "hermetic" for packaging. This is only for branding="Chrome" since
505           # we only create packages for official builds.
506           'copies': [
507             {
508               'destination': '<(PRODUCT_DIR)/installer/debian/',
509               'files': [
510                 '<@(packaging_files_deb)',
511               ]
512             },
513             {
514               'destination': '<(PRODUCT_DIR)/installer/rpm/',
515               'files': [
516                 '<@(packaging_files_rpm)',
517               ]
518             },
519             {
520               'destination': '<(PRODUCT_DIR)/installer/common/',
521               'files': [
522                 '<@(packaging_files_common)',
523               ]
524             },
525             # Additional theme resources needed for package building.
526             {
527               'destination': '<(PRODUCT_DIR)/installer/theme/',
528               'files': [
529                 '<(branding_dir_100)/product_logo_16.png',
530                 '<(branding_dir)/product_logo_22.png',
531                 '<(branding_dir)/product_logo_24.png',
532                 '<(branding_dir_100)/product_logo_32.png',
533                 '<(branding_dir)/product_logo_48.png',
534                 '<(branding_dir)/product_logo_64.png',
535                 '<(branding_dir)/product_logo_128.png',
536                 '<(branding_dir)/product_logo_256.png',
537                 '<(branding_dir)/product_logo_32.xpm',
538                 '<(branding_dir)/BRANDING',
539               ],
540             },
541           ],
542           'actions': [
543             {
544               'action_name': 'save_build_info',
545               'inputs': [
546                 '<(branding_dir)/BRANDING',
547                 '<(version_path)',
548                 '<(lastchange_path)',
549               ],
550               'outputs': [
551                 '<(PRODUCT_DIR)/installer/version.txt',
552               ],
553               # Just output the default version info variables.
554               'action': [
555                 'python', '<(version_py_path)',
556                 '-f', '<(branding_dir)/BRANDING',
557                 '-f', '<(version_path)',
558                 '-f', '<(lastchange_path)',
559                 '-o', '<@(_outputs)'
560               ],
561             },
562           ],
563         },
564         {
565           'target_name': 'linux_packages_all',
566           'suppress_wildcard': 1,
567           'type': 'none',
568           'dependencies': [
569             'linux_packages_unstable',
570             'linux_packages_beta',
571             'linux_packages_stable',
572           ],
573         },
574         {
575           # 'asan' is a developer, testing-only package, so it shouldn't be
576           # included in the 'linux_packages_all' collection.
577           'target_name': 'linux_packages_asan',
578           'suppress_wildcard': 1,
579           'type': 'none',
580           'dependencies': [
581             'linux_packages_asan_deb',
582           ],
583           # ChromeOS doesn't care about RPM packages.
584           'conditions': [
585             ['chromeos==0', {
586               'dependencies': [
587                 'linux_packages_asan_rpm',
588               ],
589             }],
590           ],
591         },
592         {
593           # 'trunk' is a developer, testing-only package, so it shouldn't be
594           # included in the 'linux_packages_all' collection.
595           'target_name': 'linux_packages_trunk',
596           'suppress_wildcard': 1,
597           'type': 'none',
598           'dependencies': [
599             'linux_packages_trunk_deb',
600           ],
601           # ChromeOS doesn't care about RPM packages.
602           'conditions': [
603             ['chromeos==0', {
604               'dependencies': [
605                 'linux_packages_trunk_rpm',
606               ],
607             }],
608           ],
609         },
610         {
611           'target_name': 'linux_packages_unstable',
612           'suppress_wildcard': 1,
613           'type': 'none',
614           'dependencies': [
615             'linux_packages_unstable_deb',
616           ],
617           # ChromeOS doesn't care about RPM packages.
618           'conditions': [
619             ['chromeos==0', {
620               'dependencies': [
621                 'linux_packages_unstable_rpm',
622               ],
623             }],
624           ],
625         },
626         {
627           'target_name': 'linux_packages_beta',
628           'suppress_wildcard': 1,
629           'type': 'none',
630           'dependencies': [
631             'linux_packages_beta_deb',
632           ],
633           # ChromeOS doesn't care about RPM packages.
634           'conditions': [
635             ['chromeos==0', {
636               'dependencies': [
637                 'linux_packages_beta_rpm',
638               ],
639             }],
640           ],
641         },
642         {
643           'target_name': 'linux_packages_stable',
644           'suppress_wildcard': 1,
645           'type': 'none',
646           'dependencies': [
647             'linux_packages_stable_deb',
648           ],
649           # ChromeOS doesn't care about RPM packages.
650           'conditions': [
651             ['chromeos==0', {
652               'dependencies': [
653                 'linux_packages_stable_rpm',
654               ],
655             }],
656           ],
657         },
658         # TODO(mmoss) gyp looping construct would be handy here ...
659         # These package actions are the same except for the 'channel' variable.
660         {
661           'target_name': 'linux_packages_asan_deb',
662           'suppress_wildcard': 1,
663           'type': 'none',
664           'dependencies': [
665             'chrome',
666             'linux_installer_configs',
667           ],
668           'actions': [
669             {
670               'variables': {
671                 'channel': 'asan',
672               },
673               'action_name': 'deb_packages_<(channel)',
674               'process_outputs_as_sources': 1,
675               'inputs': [
676                 '<(deb_build)',
677                 '<@(packaging_files_binaries)',
678                 '<@(packaging_files_common)',
679                 '<@(packaging_files_deb)',
680               ],
681               'outputs': [
682                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
683               ],
684               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
685             },
686           ],
687         },
688         {
689           'target_name': 'linux_packages_trunk_deb',
690           'suppress_wildcard': 1,
691           'type': 'none',
692           'dependencies': [
693             'chrome',
694             'linux_installer_configs',
695           ],
696           'actions': [
697             {
698               'variables': {
699                 'channel': 'trunk',
700               },
701               'action_name': 'deb_packages_<(channel)',
702               'process_outputs_as_sources': 1,
703               'inputs': [
704                 '<(deb_build)',
705                 '<@(packaging_files_binaries)',
706                 '<@(packaging_files_common)',
707                 '<@(packaging_files_deb)',
708               ],
709               'outputs': [
710                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
711               ],
712               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
713             },
714           ],
715         },
716         {
717           'target_name': 'linux_packages_unstable_deb',
718           'suppress_wildcard': 1,
719           'type': 'none',
720           'dependencies': [
721             'chrome',
722             'linux_installer_configs',
723           ],
724           'actions': [
725             {
726               'variables': {
727                 'channel': 'unstable',
728               },
729               'action_name': 'deb_packages_<(channel)',
730               'process_outputs_as_sources': 1,
731               'inputs': [
732                 '<(deb_build)',
733                 '<@(packaging_files_binaries)',
734                 '<@(packaging_files_common)',
735                 '<@(packaging_files_deb)',
736               ],
737               'outputs': [
738                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
739               ],
740               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
741             },
742           ],
743         },
744         {
745           'target_name': 'linux_packages_beta_deb',
746           'suppress_wildcard': 1,
747           'type': 'none',
748           'dependencies': [
749             'chrome',
750             'linux_installer_configs',
751           ],
752           'actions': [
753             {
754               'variables': {
755                 'channel': 'beta',
756               },
757               'action_name': 'deb_packages_<(channel)',
758               'process_outputs_as_sources': 1,
759               'inputs': [
760                 '<(deb_build)',
761                 '<@(packaging_files_binaries)',
762                 '<@(packaging_files_common)',
763                 '<@(packaging_files_deb)',
764               ],
765               'outputs': [
766                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
767               ],
768               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
769             },
770           ],
771         },
772         {
773           'target_name': 'linux_packages_stable_deb',
774           'suppress_wildcard': 1,
775           'type': 'none',
776           'dependencies': [
777             'chrome',
778             'linux_installer_configs',
779           ],
780           'actions': [
781             {
782               'variables': {
783                 'channel': 'stable',
784               },
785               'action_name': 'deb_packages_<(channel)',
786               'process_outputs_as_sources': 1,
787               'inputs': [
788                 '<(deb_build)',
789                 '<@(packaging_files_binaries)',
790                 '<@(packaging_files_common)',
791                 '<@(packaging_files_deb)',
792               ],
793               'outputs': [
794                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-1_<(deb_arch).deb',
795               ],
796               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
797             },
798           ],
799         },
800         {
801           'target_name': 'linux_packages_asan_rpm',
802           'suppress_wildcard': 1,
803           'type': 'none',
804           'dependencies': [
805             'chrome',
806             'linux_installer_configs',
807           ],
808           'actions': [
809             {
810               'variables': {
811                 'channel': 'asan',
812               },
813               'action_name': 'rpm_packages_<(channel)',
814               'process_outputs_as_sources': 1,
815               'inputs': [
816                 '<(rpm_build)',
817                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
818                 '<@(packaging_files_binaries)',
819                 '<@(packaging_files_common)',
820                 '<@(packaging_files_rpm)',
821               ],
822               'outputs': [
823                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
824               ],
825               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
826             },
827           ],
828         },
829         {
830           'target_name': 'linux_packages_trunk_rpm',
831           'suppress_wildcard': 1,
832           'type': 'none',
833           'dependencies': [
834             'chrome',
835             'linux_installer_configs',
836           ],
837           'actions': [
838             {
839               'variables': {
840                 'channel': 'trunk',
841               },
842               'action_name': 'rpm_packages_<(channel)',
843               'process_outputs_as_sources': 1,
844               'inputs': [
845                 '<(rpm_build)',
846                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
847                 '<@(packaging_files_binaries)',
848                 '<@(packaging_files_common)',
849                 '<@(packaging_files_rpm)',
850               ],
851               'outputs': [
852                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
853               ],
854               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
855             },
856           ],
857         },
858         {
859           'target_name': 'linux_packages_unstable_rpm',
860           'suppress_wildcard': 1,
861           'type': 'none',
862           'dependencies': [
863             'chrome',
864             'linux_installer_configs',
865           ],
866           'actions': [
867             {
868               'variables': {
869                 'channel': 'unstable',
870               },
871               'action_name': 'rpm_packages_<(channel)',
872               'process_outputs_as_sources': 1,
873               'inputs': [
874                 '<(rpm_build)',
875                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
876                 '<@(packaging_files_binaries)',
877                 '<@(packaging_files_common)',
878                 '<@(packaging_files_rpm)',
879               ],
880               'outputs': [
881                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
882               ],
883               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
884             },
885           ],
886         },
887         {
888           'target_name': 'linux_packages_beta_rpm',
889           'suppress_wildcard': 1,
890           'type': 'none',
891           'dependencies': [
892             'chrome',
893             'linux_installer_configs',
894           ],
895           'actions': [
896             {
897               'variables': {
898                 'channel': 'beta',
899               },
900               'action_name': 'rpm_packages_<(channel)',
901               'process_outputs_as_sources': 1,
902               'inputs': [
903                 '<(rpm_build)',
904                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
905                 '<@(packaging_files_binaries)',
906                 '<@(packaging_files_common)',
907                 '<@(packaging_files_rpm)',
908               ],
909               'outputs': [
910                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
911               ],
912               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
913             },
914           ],
915         },
916         {
917           'target_name': 'linux_packages_stable_rpm',
918           'suppress_wildcard': 1,
919           'type': 'none',
920           'dependencies': [
921             'chrome',
922             'linux_installer_configs',
923           ],
924           'actions': [
925             {
926               'variables': {
927                 'channel': 'stable',
928               },
929               'action_name': 'rpm_packages_<(channel)',
930               'process_outputs_as_sources': 1,
931               'inputs': [
932                 '<(rpm_build)',
933                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
934                 '<@(packaging_files_binaries)',
935                 '<@(packaging_files_common)',
936                 '<@(packaging_files_rpm)',
937               ],
938               'outputs': [
939                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-1.<(rpm_arch).rpm',
940               ],
941               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
942             },
943           ],
944         },
945       ],
946     }],
947     ['OS=="mac"', {
948       'variables': {
949         'mac_packaging_dir':
950             '<(PRODUCT_DIR)/<(mac_product_name) Packaging',
951         # <(PRODUCT_DIR) expands to $(BUILT_PRODUCTS_DIR), which doesn't
952         # work properly in a shell script, where ${BUILT_PRODUCTS_DIR} is
953         # needed.
954         'mac_packaging_sh_dir':
955             '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Packaging',
956       }, # variables
957       'targets': [
958         {
959           'target_name': 'installer_packaging',
960           'type': 'none',
961           'dependencies': [
962             'installer/mac/third_party/bsdiff/goobsdiff.gyp:*',
963             'installer/mac/third_party/xz/xz.gyp:*',
964           ],
965           'conditions': [
966             ['buildtype=="Official"', {
967               'actions': [
968                 {
969                   # Create sign.sh, the script that the packaging system will
970                   # use to sign the .app bundle.
971                   'action_name': 'Make sign.sh',
972                   'variables': {
973                     'make_signers_sh_path': 'installer/mac/make_signers.sh',
974                   },
975                   'inputs': [
976                     '<(make_signers_sh_path)',
977                     'installer/mac/sign_app.sh.in',
978                     'installer/mac/sign_versioned_dir.sh.in',
979                     'installer/mac/app_resource_rules.plist.in',
980                     '<(version_path)',
981                   ],
982                   'outputs': [
983                     '<(mac_packaging_dir)/sign_app.sh',
984                     '<(mac_packaging_dir)/sign_versioned_dir.sh',
985                     '<(mac_packaging_dir)/app_resource_rules.plist',
986                   ],
987                   'action': [
988                     '<(make_signers_sh_path)',
989                     '<(mac_packaging_sh_dir)',
990                     '<(mac_product_name)',
991                     '<(version_full)',
992                   ],
993                 },
994               ],  # actions
995             }],  # buildtype=="Official"
996           ],  # conditions
997           'copies': [
998             {
999               # Put the files where the packaging system will find them. The
1000               # packager will use these when building the "full installer"
1001               # disk images and delta/differential update disk images.
1002               'destination': '<(mac_packaging_dir)',
1003               'files': [
1004                 '<(PRODUCT_DIR)/goobsdiff',
1005                 '<(PRODUCT_DIR)/goobspatch',
1006                 '<(PRODUCT_DIR)/liblzma_decompress.dylib',
1007                 '<(PRODUCT_DIR)/xz',
1008                 '<(PRODUCT_DIR)/xzdec',
1009                 'installer/mac/dirdiffer.sh',
1010                 'installer/mac/dirpatcher.sh',
1011                 'installer/mac/dmgdiffer.sh',
1012                 'installer/mac/pkg-dmg',
1013               ],
1014               'conditions': [
1015                 ['mac_keystone==1', {
1016                   'files': [
1017                     'installer/mac/keystone_install.sh',
1018                   ],
1019                 }],  # mac_keystone
1020                 ['branding=="Chrome" and buildtype=="Official"', {
1021                   'files': [
1022                     'app/theme/google_chrome/mac/app_canary.icns',
1023                     'app/theme/google_chrome/mac/document_canary.icns',
1024                     'installer/mac/internal/chrome_canary_dmg_dsstore',
1025                     'installer/mac/internal/chrome_canary_dmg_icon.icns',
1026                     'installer/mac/internal/chrome_dmg_background.png',
1027                     'installer/mac/internal/chrome_dmg_dsstore',
1028                     'installer/mac/internal/chrome_dmg_icon.icns',
1029                     'installer/mac/internal/generate_dmgs',
1030                   ],
1031                 }],  # branding=="Chrome" and buildtype=="Official"
1032               ],  # conditions
1033             },
1034           ],  # copies
1035         },  # target: installer_packaging
1036         {
1037           'target_name': 'gcapi_lib',
1038           'type': 'static_library',
1039           'include_dirs': [
1040             '..',
1041           ],
1042           'sources': [
1043             'installer/gcapi_mac/gcapi.h',
1044             'installer/gcapi_mac/gcapi.mm',
1045           ],
1046           'link_settings': {
1047             'libraries': [
1048               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
1049             ],
1050           },
1051           'xcode_settings': {
1052             'ARCHS': [ 'i386', 'x86_64' ],
1053             'MACOSX_DEPLOYMENT_TARGET': '10.5',
1054             'GCC_ENABLE_OBJC_GC': 'supported',
1055           },
1056         },
1057         {
1058           'target_name': 'gcapi_example',
1059           'type': 'executable',
1060           'dependencies': [
1061             'gcapi_lib',
1062           ],
1063           'include_dirs': [
1064             '..',
1065           ],
1066           'sources': [
1067             'installer/gcapi_mac/gcapi_example_client.mm',
1068           ],
1069         },
1070       ],  # targets
1071     }],  # OS=="mac"
1072   ],