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