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