Fixed compile warnings.
[chromium-blink-merge.git] / chrome / chrome_installer.gypi
blobad3d1eadbc4b6d9d49ae097a45a32d207f9ad2a1
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': '<(DEPTH)/build/util/LASTCHANGE',
8     # 'branding_dir' is set in the 'conditions' section at the bottom.
9   },
10   'conditions': [
11     ['OS=="win"', {
12       'targets': [
13         {
14           'target_name': 'gcapi_dll',
15           'type': 'loadable_module',
16           'dependencies': [
17             'installer_util',
18             '<(DEPTH)/base/base.gyp:base',
19             '<(DEPTH)/google_update/google_update.gyp:google_update',
20           ],
21           'include_dirs': [
22             '<(DEPTH)',
23           ],
24           'sources': [
25             'installer/gcapi/gcapi.cc',
26             'installer/gcapi/gcapi.def',
27             'installer/gcapi/gcapi.h',
28             'installer/gcapi/gcapi_omaha_experiment.cc',
29             'installer/gcapi/gcapi_omaha_experiment.h',
30             'installer/gcapi/gcapi_reactivation.cc',
31             'installer/gcapi/gcapi_reactivation.h',
32           ],
33         },
34         {
35           'target_name': 'gcapi_lib',
36           'type': 'static_library',
37           'dependencies': [
38             'installer_util',
39             '<(DEPTH)/base/base.gyp:base',
40             '<(DEPTH)/google_update/google_update.gyp:google_update',
41           ],
42           'include_dirs': [
43             '<(DEPTH)',
44           ],
45           'sources': [
46             'installer/gcapi/gcapi.cc',
47             'installer/gcapi/gcapi.h',
48             'installer/gcapi/gcapi_omaha_experiment.cc',
49             'installer/gcapi/gcapi_omaha_experiment.h',
50             'installer/gcapi/gcapi_reactivation.cc',
51             'installer/gcapi/gcapi_reactivation.h',
52           ],
53         },
54         {
55           'target_name': 'gcapi_test',
56           'type': 'executable',
57           'dependencies': [   
58             'common',
59             'gcapi_dll',
60             'gcapi_lib',
61             'installer_util',
62             '<(DEPTH)/base/base.gyp:base',
63             '<(DEPTH)/base/base.gyp:test_support_base',
64             '<(DEPTH)/testing/gtest.gyp:gtest',
65           ],
66           'include_dirs': [
67             '<(DEPTH)',
68           ],
69           'sources': [
70             'installer/gcapi/gcapi_last_run_test.cc',
71             'installer/gcapi/gcapi_reactivation_test.cc',
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             '<(DEPTH)/base/base.gyp:base',
84             '<(DEPTH)/base/base.gyp:base_i18n',
85             '<(DEPTH)/base/base.gyp:test_support_base',
86             '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
87             '<(DEPTH)/content/content.gyp:content_common',
88             '<(DEPTH)/testing/gmock.gyp:gmock',
89             '<(DEPTH)/testing/gtest.gyp:gtest',
90           ],
91           'include_dirs': [
92             '<(DEPTH)',
93           ],
94           'sources': [
95             'installer/setup/compat_checks_unittest.cc',
96             'installer/setup/setup_constants.cc',
97             'installer/util/browser_distribution_unittest.cc',
98             'installer/util/channel_info_unittest.cc',
99             'installer/util/copy_reg_key_work_item_unittest.cc',
100             'installer/util/copy_tree_work_item_unittest.cc',
101             'installer/util/create_dir_work_item_unittest.cc',
102             'installer/util/create_reg_key_work_item_unittest.cc',
103             'installer/util/delete_after_reboot_helper_unittest.cc',
104             'installer/util/delete_reg_key_work_item_unittest.cc',
105             'installer/util/delete_reg_value_work_item_unittest.cc',
106             'installer/util/delete_tree_work_item_unittest.cc',
107             'installer/util/duplicate_tree_detector_unittest.cc',
108             'installer/util/fake_installation_state.h',
109             'installer/util/fake_product_state.h',
110             'installer/util/google_chrome_distribution_unittest.cc',
111             'installer/util/google_update_settings_unittest.cc',
112             'installer/util/install_util_unittest.cc',
113             'installer/util/installation_validator_unittest.cc',
114             'installer/util/installation_validation_helper.cc',
115             'installer/util/installation_validation_helper.h',
116             'installer/util/installer_state_unittest.cc',
117             'installer/util/installer_util_unittests.rc',
118             'installer/util/installer_util_unittests_resource.h',
119             'installer/util/language_selector_unittest.cc',
120             'installer/util/logging_installer_unittest.cc',
121             'installer/util/lzma_util_unittest.cc',
122             'installer/util/master_preferences_unittest.cc',
123             'installer/util/move_tree_work_item_unittest.cc',
124             'installer/util/product_unittest.h',
125             'installer/util/product_unittest.cc',
126             'installer/util/product_state_unittest.cc',
127             'installer/util/registry_key_backup_unittest.cc',
128             'installer/util/registry_test_data.cc',
129             'installer/util/registry_test_data.h',
130             'installer/util/run_all_unittests.cc',
131             'installer/util/self_cleaning_temp_dir_unittest.cc',
132             'installer/util/set_reg_value_work_item_unittest.cc',
133             'installer/util/shell_util_unittest.cc',
134             'installer/util/wmi_unittest.cc',
135             'installer/util/work_item_list_unittest.cc',
136           ],
137           'msvs_settings': {
138             'VCManifestTool': {
139               'AdditionalManifestFiles': '$(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest',
140             },
141           },
142         },
143         {
144           'target_name': 'installer_util_strings',
145           'type': 'none',
146           'rules': [
147             {
148               'rule_name': 'installer_util_strings',
149               'extension': 'grd',
150               'variables': {
151                 'create_string_rc_py' : 'installer/util/prebuild/create_string_rc.py',
152               },
153               'inputs': [
154                 '<(create_string_rc_py)',
155                 '<(RULE_INPUT_PATH)',
156               ],
157               'outputs': [
158                 # Don't use <(RULE_INPUT_ROOT) to create the output file
159                 # name, because the base name of the input
160                 # (generated_resources.grd) doesn't match the generated file
161                 # (installer_util_strings.h).
162                 '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.h',
163               ],
164               'action': ['python',
165                          '<(create_string_rc_py)',
166                          '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings',
167                          '<(branding)',],
168               'message': 'Generating resources from <(RULE_INPUT_PATH)',
169             },
170           ],
171           'sources': [
172             'app/chromium_strings.grd',
173           ],
174           'direct_dependent_settings': {
175             'include_dirs': [
176               '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings',
177             ],
178           },
179         },
180         {
181           'target_name': 'mini_installer_test',
182           'type': 'executable',
183           'dependencies': [
184             'installer_util',
185             'installer_util_strings',
186             '<(DEPTH)/base/base.gyp:base',
187             '<(DEPTH)/base/base.gyp:base_i18n',
188             '<(DEPTH)/base/base.gyp:test_support_base',
189             '<(DEPTH)/chrome/chrome.gyp:test_support_common',
190             '<(DEPTH)/testing/gtest.gyp:gtest',
191           ],
192           'include_dirs': [
193             '<(DEPTH)',
194           ],
195           'sources': [
196             '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc',
197             'installer/util/installation_validation_helper.cc',
198             'installer/util/installation_validation_helper.h',
199             'test/mini_installer_test/installer_path_provider.cc',
200             'test/mini_installer_test/installer_path_provider.h',
201             'test/mini_installer_test/installer_test_util.cc',
202             'test/mini_installer_test/installer_test_util.h',
203             'test/mini_installer_test/mini_installer_test_constants.cc',
204             'test/mini_installer_test/mini_installer_test_constants.h',
205             'test/mini_installer_test/run_all_unittests.cc',
206             'test/mini_installer_test/switch_builder.cc',
207             'test/mini_installer_test/switch_builder.h',
208             'test/mini_installer_test/test.cc',
209           ],
210           'msvs_settings': {
211             'VCManifestTool': {
212               'AdditionalManifestFiles': '$(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest',
213             },
214           },
215         },
216         {
217           'target_name': 'setup',
218           'type': 'executable',
219           'dependencies': [
220             'installer_util',
221             'installer_util_strings',
222             '<(DEPTH)/base/base.gyp:base',
223             '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
224             '<(DEPTH)/build/util/build_util.gyp:lastchange#target',
225             '<(DEPTH)/build/util/support/support.gyp:*',
226             '<(DEPTH)/chrome_frame/chrome_frame.gyp:chrome_tab_idl',
227             '<(DEPTH)/chrome_frame/chrome_frame.gyp:npchrome_frame',
228             '<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler',
229             '<(DEPTH)/rlz/rlz.gyp:rlz_lib',
230             '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
231           ],
232           'include_dirs': [
233             '<(DEPTH)',
234             '<(INTERMEDIATE_DIR)',
235             '<(SHARED_INTERMEDIATE_DIR)/setup',
236           ],
237           'direct_dependent_settings': {
238             'include_dirs': [
239               '<(SHARED_INTERMEDIATE_DIR)/setup',
240             ],
241           },
242           'sources': [
243             'installer/mini_installer/chrome.release',
244             'installer/setup/chrome_frame_quick_enable.cc',
245             'installer/setup/chrome_frame_quick_enable.h',
246             'installer/setup/chrome_frame_ready_mode.cc',
247             'installer/setup/chrome_frame_ready_mode.h',
248             'installer/setup/install.cc',
249             'installer/setup/install.h',
250             'installer/setup/install_worker.cc',
251             'installer/setup/install_worker.h',
252             'installer/setup/setup_main.cc',
253             'installer/setup/setup.ico',
254             'installer/setup/setup.rc',
255             'installer/setup/setup_constants.cc',
256             'installer/setup/setup_constants.h',
257             'installer/setup/setup_exe_version.rc.version',
258             'installer/setup/setup_resource.h',
259             'installer/setup/setup_util.cc',
260             'installer/setup/setup_util.h',
261             'installer/setup/uninstall.cc',
262             'installer/setup/uninstall.h',
263           ],
264           'msvs_settings': {
265             'VCLinkerTool': {
266               'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
267             },
268             'VCManifestTool': {
269               'AdditionalManifestFiles': '$(ProjectDir)\\installer\\setup\\setup.exe.manifest',
270             },
271           },
272           'rules': [
273             {
274               'rule_name': 'setup_version',
275               'extension': 'version',
276               'variables': {
277                 'version_py_path': '<(DEPTH)/chrome/tools/build/version.py',
278                 'template_input_path': 'installer/setup/setup_exe_version.rc.version',
279               },
280               'inputs': [
281                 '<(template_input_path)',
282                 '<(version_path)',
283                 '<(lastchange_path)',
284                 '<(branding_dir)/BRANDING',
285               ],
286               'outputs': [
287                 '<(SHARED_INTERMEDIATE_DIR)/setup/setup_exe_version.rc',
288               ],
289               'action': [
290                 'python', '<(version_py_path)',
291                 '-f', '<(version_path)',
292                 '-f', '<(lastchange_path)',
293                 '-f', '<(branding_dir)/BRANDING',
294                 '<(template_input_path)',
295                 '<@(_outputs)',
296               ],
297               'process_outputs_as_sources': 1,
298               'message': 'Generating version information'
299             },
300             {
301               'rule_name': 'server_dlls',
302               'extension': 'release',
303               'variables': {
304                 'scan_server_dlls_py' : 'tools/build/win/scan_server_dlls.py',
305                 'template_file': 'mini_installer/chrome.release',
306               },
307               'inputs': [
308                 '<(scan_server_dlls_py)',
309                 '<(template_file)'
310               ],
311               'outputs': [
312                 '<(INTERMEDIATE_DIR)/registered_dlls.h',
313               ],
314               'action': [
315                 'python',
316                 '<(scan_server_dlls_py)',
317                 '--output_dir=<(PRODUCT_DIR)',
318                 '--input_file=<(RULE_INPUT_PATH)',
319                 '--header_output_dir=<(INTERMEDIATE_DIR)',
320                 # TODO(sgk):  may just use environment variables
321                 #'--distribution=$(CHROMIUM_BUILD)',
322                 '--distribution=_google_chrome',
323               ],
324             },
325           ],
326           'conditions': [
327             # TODO(mark):  <(branding_dir) should be defined by the
328             # global condition block at the bottom of the file, but
329             # this doesn't work due to the following issue:
330             #
331             #   http://code.google.com/p/gyp/issues/detail?id=22
332             #
333             # Remove this block once the above issue is fixed.
334             [ 'branding == "Chrome"', {
335               'variables': {
336                  'branding_dir': 'app/theme/google_chrome',
337               },
338             }, { # else branding!="Chrome"
339               'variables': {
340                  'branding_dir': 'app/theme/chromium',
341               },
342             }],
343           ],
344         },
345         {
346           'target_name': 'setup_unittests',
347           'type': 'executable',
348           'dependencies': [
349             'installer_util',
350             'installer_util_strings',
351             '<(DEPTH)/base/base.gyp:base',
352             '<(DEPTH)/base/base.gyp:base_i18n',
353             '<(DEPTH)/base/base.gyp:test_support_base',
354             '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
355             '<(DEPTH)/chrome_frame/chrome_frame.gyp:chrome_tab_idl',
356             '<(DEPTH)/testing/gmock.gyp:gmock',
357             '<(DEPTH)/testing/gtest.gyp:gtest',
358           ],
359           'include_dirs': [
360             '<(DEPTH)',
361             '<(INTERMEDIATE_DIR)',
362           ],
363           # TODO(robertshield): Move the items marked with "Move to lib"
364           # below into a separate lib and then link both setup.exe and
365           # setup_unittests.exe against that.
366           'sources': [
367             'installer/mini_installer/appid.h',
368             'installer/mini_installer/chrome_appid.cc',
369             'installer/mini_installer/configuration.cc',
370             'installer/mini_installer/configuration.h',
371             'installer/mini_installer/configuration_test.cc',
372             'installer/mini_installer/decompress.cc',
373             'installer/mini_installer/decompress.h',
374             'installer/mini_installer/decompress_test.cc',
375             'installer/mini_installer/mini_string.cc',
376             'installer/mini_installer/mini_string.h',
377             'installer/mini_installer/mini_string_test.cc',
378             'installer/setup/install_worker.cc',    # Move to lib
379             'installer/setup/install_worker.h',     # Move to lib
380             'installer/setup/install_worker_unittest.cc',
381             'installer/setup/run_all_unittests.cc',
382             'installer/setup/setup_constants.cc',   # Move to lib
383             'installer/setup/setup_constants.h',    # Move to lib
384             'installer/setup/setup_unittests.rc',
385             'installer/setup/setup_unittests_resource.h',
386             'installer/setup/setup_util.cc',
387             'installer/setup/setup_util_unittest.cc',
388           ],
389         },
390       ],
391     }],
392     ['OS=="linux" and branding=="Chrome"', {
393       'variables': {
394         # Always google_chrome since this only applies to branding==Chrome.
395         'branding_dir': 'app/theme/google_chrome',
396         'version' : '<!(python <(version_py_path) -f <(DEPTH)/chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
397         'revision' : '<!(python <(DEPTH)/build/util/lastchange.py --revision-only)',
398         'packaging_files_common': [
399           'installer/linux/internal/common/apt.include',
400           'installer/linux/internal/common/default-app.template',
401           'installer/linux/internal/common/default-app-block.template',
402           'installer/linux/internal/common/desktop.template',
403           'installer/linux/internal/common/google-chrome/google-chrome.info',
404           'installer/linux/internal/common/installer.include',
405           'installer/linux/internal/common/postinst.include',
406           'installer/linux/internal/common/prerm.include',
407           'installer/linux/internal/common/repo.cron',
408           'installer/linux/internal/common/rpm.include',
409           'installer/linux/internal/common/rpmrepo.cron',
410           'installer/linux/internal/common/updater',
411           'installer/linux/internal/common/variables.include',
412           'installer/linux/internal/common/wrapper',
413         ],
414         'packaging_files_deb': [
415           'installer/linux/internal/debian/build.sh',
416           'installer/linux/internal/debian/changelog.template',
417           'installer/linux/internal/debian/control.template',
418           'installer/linux/internal/debian/debian.menu',
419           'installer/linux/internal/debian/expected_deps',
420           'installer/linux/internal/debian/postinst',
421           'installer/linux/internal/debian/postrm',
422           'installer/linux/internal/debian/prerm',
423         ],
424         'packaging_files_rpm': [
425           'installer/linux/internal/rpm/build.sh',
426           'installer/linux/internal/rpm/chrome.spec.template',
427         ],
428         'packaging_files_binaries': [
429           # TODO(mmoss) Any convenient way to get all the relevant build
430           # files? (e.g. all locales, resources, etc.)
431           '<(PRODUCT_DIR)/chrome',
432           '<(PRODUCT_DIR)/chrome.pak',
433           '<(PRODUCT_DIR)/chrome_sandbox',
434           '<(PRODUCT_DIR)/libffmpegsumo.so',
435           '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
436           '<(PRODUCT_DIR)/xdg-mime',
437           '<(PRODUCT_DIR)/xdg-settings',
438           '<(PRODUCT_DIR)/locales/en-US.pak',
439           '<(PRODUCT_DIR)/nacl_helper',
440           '<(PRODUCT_DIR)/nacl_helper_bootstrap',
441           '<(PRODUCT_DIR)/PepperFlash/libpepflashplayer.so',
442           '<(PRODUCT_DIR)/PepperFlash/manifest.json',
443           '<@(default_apps_list_linux_dest)',
444         ],
445         'flock_bash': ['flock', '--', '/tmp/linux_package_lock', 'bash'],
446         'deb_build': '<(PRODUCT_DIR)/installer/debian/build.sh',
447         'rpm_build': '<(PRODUCT_DIR)/installer/rpm/build.sh',
448         'deb_cmd': ['<@(flock_bash)', '<(deb_build)', '-o' '<(PRODUCT_DIR)',
449                     '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'],
450         'rpm_cmd': ['<@(flock_bash)', '<(rpm_build)', '-o' '<(PRODUCT_DIR)',
451                     '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'],
452         'conditions': [
453           ['target_arch=="ia32"', {
454             'deb_arch': 'i386',
455             'rpm_arch': 'i386',
456             'packaging_files_binaries': [
457               '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
458             ],
459           }],
460           ['target_arch=="x64"', {
461             'deb_arch': 'amd64',
462             'rpm_arch': 'x86_64',
463             'packaging_files_binaries': [
464               '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
465             ],
466           }],
467           ['target_arch=="arm"', {
468             'deb_arch': 'arm',
469             'rpm_arch': 'arm',
470           }],
471           ['internal_pdf', {
472             'packaging_files_binaries': [
473               '<(PRODUCT_DIR)/libpdf.so',
474             ],
475           }],
476         ],
477       },
478       'targets': [
479         {
480           'target_name': 'linux_installer_configs',
481           'type': 'none',
482           # Add these files to the build output so the build archives will be
483           # "hermetic" for packaging. This is only for branding="Chrome" since
484           # we only create packages for official builds.
485           'copies': [
486             {
487               'destination': '<(PRODUCT_DIR)/installer/debian/',
488               'files': [
489                 '<@(packaging_files_deb)',
490               ]
491             },
492             {
493               'destination': '<(PRODUCT_DIR)/installer/rpm/',
494               'files': [
495                 '<@(packaging_files_rpm)',
496               ]
497             },
498             {
499               'destination': '<(PRODUCT_DIR)/installer/common/',
500               'files': [
501                 '<@(packaging_files_common)',
502               ]
503             },
504             # Additional theme resources needed for package building.
505             {
506               'destination': '<(PRODUCT_DIR)/installer/theme/',
507               'files': [
508                 '<(branding_dir)/product_logo_16.png',
509                 '<(branding_dir)/product_logo_22.png',
510                 '<(branding_dir)/product_logo_24.png',
511                 '<(branding_dir)/product_logo_32.png',
512                 '<(branding_dir)/product_logo_48.png',
513                 '<(branding_dir)/product_logo_64.png',
514                 '<(branding_dir)/product_logo_128.png',
515                 '<(branding_dir)/product_logo_256.png',
516                 '<(branding_dir)/product_logo_32.xpm',
517                 '<(branding_dir)/BRANDING',
518               ],
519             },
520           ],
521           'actions': [
522             {
523               'action_name': 'save_build_info',
524               'inputs': [
525                 '<(branding_dir)/BRANDING',
526                 '<(version_path)',
527                 '<(lastchange_path)',
528               ],
529               'outputs': [
530                 '<(PRODUCT_DIR)/installer/version.txt',
531               ],
532               # Just output the default version info variables.
533               'action': [
534                 'python', '<(version_py_path)',
535                 '-f', '<(branding_dir)/BRANDING',
536                 '-f', '<(version_path)',
537                 '-f', '<(lastchange_path)',
538                 '-o', '<@(_outputs)'
539               ],
540             },
541           ],
542         },
543         {
544           'target_name': 'linux_packages_all',
545           'suppress_wildcard': 1,
546           'type': 'none',
547           'dependencies': [
548             'linux_packages_unstable',
549             'linux_packages_beta',
550             'linux_packages_stable',
551           ],
552         },
553         {
554           # 'trunk' is a developer, testing-only package, so it shouldn't be
555           # included in the 'linux_packages_all' collection.
556           'target_name': 'linux_packages_trunk',
557           'suppress_wildcard': 1,
558           'type': 'none',
559           'dependencies': [
560             'linux_packages_trunk_deb',
561           ],
562           # ChromeOS doesn't care about RPM packages.
563           'conditions': [
564             ['chromeos==0', {
565               'dependencies': [
566                 'linux_packages_trunk_rpm',
567               ],
568             }],
569           ],
570         },
571         {
572           'target_name': 'linux_packages_unstable',
573           'suppress_wildcard': 1,
574           'type': 'none',
575           'dependencies': [
576             'linux_packages_unstable_deb',
577           ],
578           # ChromeOS doesn't care about RPM packages.
579           'conditions': [
580             ['chromeos==0', {
581               'dependencies': [
582                 'linux_packages_unstable_rpm',
583               ],
584             }],
585           ],
586         },
587         {
588           'target_name': 'linux_packages_beta',
589           'suppress_wildcard': 1,
590           'type': 'none',
591           'dependencies': [
592             'linux_packages_beta_deb',
593           ],
594           # ChromeOS doesn't care about RPM packages.
595           'conditions': [
596             ['chromeos==0', {
597               'dependencies': [
598                 'linux_packages_beta_rpm',
599               ],
600             }],
601           ],
602         },
603         {
604           'target_name': 'linux_packages_stable',
605           'suppress_wildcard': 1,
606           'type': 'none',
607           'dependencies': [
608             'linux_packages_stable_deb',
609           ],
610           # ChromeOS doesn't care about RPM packages.
611           'conditions': [
612             ['chromeos==0', {
613               'dependencies': [
614                 'linux_packages_stable_rpm',
615               ],
616             }],
617           ],
618         },
619         # TODO(mmoss) gyp looping construct would be handy here ...
620         # These package actions are the same except for the 'channel' variable.
621         {
622           'target_name': 'linux_packages_trunk_deb',
623           'suppress_wildcard': 1,
624           'type': 'none',
625           'dependencies': [
626             'chrome',
627             'linux_installer_configs',
628           ],
629           'actions': [
630             {
631               'variables': {
632                 'channel': 'trunk',
633               },
634               'action_name': 'deb_packages_<(channel)',
635               'process_outputs_as_sources': 1,
636               'inputs': [
637                 '<(deb_build)',
638                 '<@(packaging_files_binaries)',
639                 '<@(packaging_files_common)',
640                 '<@(packaging_files_deb)',
641               ],
642               'outputs': [
643                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-r<(revision)_<(deb_arch).deb',
644               ],
645               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
646             },
647           ],
648         },
649         {
650           'target_name': 'linux_packages_unstable_deb',
651           'suppress_wildcard': 1,
652           'type': 'none',
653           'dependencies': [
654             'chrome',
655             'linux_installer_configs',
656           ],
657           'actions': [
658             {
659               'variables': {
660                 'channel': 'unstable',
661               },
662               'action_name': 'deb_packages_<(channel)',
663               'process_outputs_as_sources': 1,
664               'inputs': [
665                 '<(deb_build)',
666                 '<@(packaging_files_binaries)',
667                 '<@(packaging_files_common)',
668                 '<@(packaging_files_deb)',
669               ],
670               'outputs': [
671                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-r<(revision)_<(deb_arch).deb',
672               ],
673               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
674             },
675           ],
676         },
677         {
678           'target_name': 'linux_packages_beta_deb',
679           'suppress_wildcard': 1,
680           'type': 'none',
681           'dependencies': [
682             'chrome',
683             'linux_installer_configs',
684           ],
685           'actions': [
686             {
687               'variables': {
688                 'channel': 'beta',
689               },
690               'action_name': 'deb_packages_<(channel)',
691               'process_outputs_as_sources': 1,
692               'inputs': [
693                 '<(deb_build)',
694                 '<@(packaging_files_binaries)',
695                 '<@(packaging_files_common)',
696                 '<@(packaging_files_deb)',
697               ],
698               'outputs': [
699                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-r<(revision)_<(deb_arch).deb',
700               ],
701               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
702             },
703           ],
704         },
705         {
706           'target_name': 'linux_packages_stable_deb',
707           'suppress_wildcard': 1,
708           'type': 'none',
709           'dependencies': [
710             'chrome',
711             'linux_installer_configs',
712           ],
713           'actions': [
714             {
715               'variables': {
716                 'channel': 'stable',
717               },
718               'action_name': 'deb_packages_<(channel)',
719               'process_outputs_as_sources': 1,
720               'inputs': [
721                 '<(deb_build)',
722                 '<@(packaging_files_binaries)',
723                 '<@(packaging_files_common)',
724                 '<@(packaging_files_deb)',
725               ],
726               'outputs': [
727                 '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-r<(revision)_<(deb_arch).deb',
728               ],
729               'action': [ '<@(deb_cmd)', '-c', '<(channel)', ],
730             },
731           ],
732         },
733         {
734           'target_name': 'linux_packages_trunk_rpm',
735           'suppress_wildcard': 1,
736           'type': 'none',
737           'dependencies': [
738             'chrome',
739             'linux_installer_configs',
740           ],
741           'actions': [
742             {
743               'variables': {
744                 'channel': 'trunk',
745               },
746               'action_name': 'rpm_packages_<(channel)',
747               'process_outputs_as_sources': 1,
748               'inputs': [
749                 '<(rpm_build)',
750                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
751                 '<@(packaging_files_binaries)',
752                 '<@(packaging_files_common)',
753                 '<@(packaging_files_rpm)',
754               ],
755               'outputs': [
756                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm',
757               ],
758               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
759             },
760           ],
761         },
762         {
763           'target_name': 'linux_packages_unstable_rpm',
764           'suppress_wildcard': 1,
765           'type': 'none',
766           'dependencies': [
767             'chrome',
768             'linux_installer_configs',
769           ],
770           'actions': [
771             {
772               'variables': {
773                 'channel': 'unstable',
774               },
775               'action_name': 'rpm_packages_<(channel)',
776               'process_outputs_as_sources': 1,
777               'inputs': [
778                 '<(rpm_build)',
779                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
780                 '<@(packaging_files_binaries)',
781                 '<@(packaging_files_common)',
782                 '<@(packaging_files_rpm)',
783               ],
784               'outputs': [
785                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm',
786               ],
787               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
788             },
789           ],
790         },
791         {
792           'target_name': 'linux_packages_beta_rpm',
793           'suppress_wildcard': 1,
794           'type': 'none',
795           'dependencies': [
796             'chrome',
797             'linux_installer_configs',
798           ],
799           'actions': [
800             {
801               'variables': {
802                 'channel': 'beta',
803               },
804               'action_name': 'rpm_packages_<(channel)',
805               'process_outputs_as_sources': 1,
806               'inputs': [
807                 '<(rpm_build)',
808                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
809                 '<@(packaging_files_binaries)',
810                 '<@(packaging_files_common)',
811                 '<@(packaging_files_rpm)',
812               ],
813               'outputs': [
814                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm',
815               ],
816               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
817             },
818           ],
819         },
820         {
821           'target_name': 'linux_packages_stable_rpm',
822           'suppress_wildcard': 1,
823           'type': 'none',
824           'dependencies': [
825             'chrome',
826             'linux_installer_configs',
827           ],
828           'actions': [
829             {
830               'variables': {
831                 'channel': 'stable',
832               },
833               'action_name': 'rpm_packages_<(channel)',
834               'process_outputs_as_sources': 1,
835               'inputs': [
836                 '<(rpm_build)',
837                 '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template',
838                 '<@(packaging_files_binaries)',
839                 '<@(packaging_files_common)',
840                 '<@(packaging_files_rpm)',
841               ],
842               'outputs': [
843                 '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm',
844               ],
845               'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ],
846             },
847           ],
848         },
849       ],
850     }],
851     ['OS=="mac"', {
852       'variables': {
853         'mac_packaging_dir':
854             '<(PRODUCT_DIR)/<(mac_product_name) Packaging',
855         # <(PRODUCT_DIR) expands to $(BUILT_PRODUCTS_DIR), which doesn't
856         # work properly in a shell script, where ${BUILT_PRODUCTS_DIR} is
857         # needed.
858         'mac_packaging_sh_dir':
859             '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Packaging',
860       }, # variables
861       'targets': [
862         {
863           'target_name': 'installer_packaging',
864           'type': 'none',
865           'dependencies': [
866             'installer/mac/third_party/bsdiff/goobsdiff.gyp:*',
867             'installer/mac/third_party/xz/xz.gyp:*',
868           ],
869           'conditions': [
870             ['buildtype=="Official"', {
871               'actions': [
872                 {
873                   # Create sign.sh, the script that the packaging system will
874                   # use to sign the .app bundle.
875                   'action_name': 'Make sign.sh',
876                   'variables': {
877                     'make_signers_sh_path': 'installer/mac/make_signers.sh',
878                   },
879                   'inputs': [
880                     '<(make_signers_sh_path)',
881                     'installer/mac/sign_app.sh.in',
882                     'installer/mac/sign_versioned_dir.sh.in',
883                     'installer/mac/app_resource_rules.plist.in',
884                     '<(version_path)',
885                   ],
886                   'outputs': [
887                     '<(mac_packaging_dir)/sign_app.sh',
888                     '<(mac_packaging_dir)/sign_versioned_dir.sh',
889                     '<(mac_packaging_dir)/app_resource_rules.plist',
890                   ],
891                   'action': [
892                     '<(make_signers_sh_path)',
893                     '<(mac_packaging_sh_dir)',
894                     '<(mac_product_name)',
895                     '<(version_full)',
896                   ],
897                 },
898               ],  # actions
899             }],  # buildtype=="Official"
900           ],  # conditions
901           'copies': [
902             {
903               # Put the files where the packaging system will find them. The
904               # packager will use these when building the "full installer"
905               # disk images and delta/differential update disk images.
906               'destination': '<(mac_packaging_dir)',
907               'files': [
908                 '<(PRODUCT_DIR)/goobsdiff',
909                 '<(PRODUCT_DIR)/goobspatch',
910                 '<(PRODUCT_DIR)/liblzma_decompress.dylib',
911                 '<(PRODUCT_DIR)/xz',
912                 '<(PRODUCT_DIR)/xzdec',
913                 'installer/mac/dirdiffer.sh',
914                 'installer/mac/dirpatcher.sh',
915                 'installer/mac/dmgdiffer.sh',
916                 'installer/mac/pkg-dmg',
917               ],
918               'conditions': [
919                 ['mac_keystone==1', {
920                   'files': [
921                     'installer/mac/keystone_install.sh',
922                   ],
923                 }],  # mac_keystone
924                 ['branding=="Chrome" and buildtype=="Official"', {
925                   'files': [
926                     'app/theme/google_chrome/app_canary.icns',
927                     'app/theme/google_chrome/document_canary.icns',
928                     'installer/mac/internal/chrome_canary_dmg_dsstore',
929                     'installer/mac/internal/chrome_canary_dmg_icon.icns',
930                     'installer/mac/internal/chrome_dmg_background.png',
931                     'installer/mac/internal/chrome_dmg_dsstore',
932                     'installer/mac/internal/chrome_dmg_icon.icns',
933                     'installer/mac/internal/generate_dmgs',
934                   ],
935                 }],  # branding=="Chrome" and buildtype=="Official"
936               ],  # conditions
937             },
938           ],  # copies
939         },  # target: installer_packaging
940       ],  # targets
941     }],  # OS=="mac"
942     [ 'branding == "Chrome"', {
943       'variables': {
944          'branding_dir': 'app/theme/google_chrome',
945       },
946     }, { # else branding!="Chrome"
947       'variables': {
948          'branding_dir': 'app/theme/chromium',
949       },
950     }],
951   ],