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