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