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