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