# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'lastchange_path': '../build/util/LASTCHANGE', 'branding_dir': 'app/theme/<(branding_path_component)', 'branding_dir_100': 'app/theme/default_100_percent/<(branding_path_component)', }, 'conditions': [ ['OS=="win"', { 'targets': [ { 'target_name': 'gcapi_dll', 'type': 'loadable_module', 'dependencies': [ 'gcapi_lib', ], 'include_dirs': [ '..', ], 'sources': [ 'installer/gcapi/gcapi.def', 'installer/gcapi/gcapi_dll.cc', ], }, { 'target_name': 'gcapi_lib', 'type': 'static_library', 'dependencies': [ 'installer_util', '../base/base.gyp:base', '../chrome/chrome.gyp:launcher_support', '../components/components.gyp:variations', '../google_update/google_update.gyp:google_update', ], 'include_dirs': [ '..', ], 'sources': [ 'installer/gcapi/gcapi.cc', 'installer/gcapi/gcapi.h', 'installer/gcapi/gcapi_omaha_experiment.cc', 'installer/gcapi/gcapi_omaha_experiment.h', 'installer/gcapi/gcapi_reactivation.cc', 'installer/gcapi/gcapi_reactivation.h', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [ 4267, ], }, { 'target_name': 'gcapi_test', 'type': 'executable', 'dependencies': [ 'common', 'gcapi_dll', 'gcapi_lib', 'installer_util', '../base/base.gyp:base', '../base/base.gyp:test_support_base', '../components/components.gyp:variations', '../testing/gtest.gyp:gtest', ], 'include_dirs': [ '..', ], 'sources': [ 'installer/gcapi/gcapi_last_run_test.cc', 'installer/gcapi/gcapi_omaha_experiment_test.cc', 'installer/gcapi/gcapi_reactivation_test.cc', 'installer/gcapi/gcapi_test.cc', 'installer/gcapi/gcapi_test.rc', 'installer/gcapi/gcapi_test_registry_overrider.cc', 'installer/gcapi/gcapi_test_registry_overrider.h', 'installer/gcapi/resource.h', ], }, { # GN version: //chrome/installer/util:installer_util_unittests 'target_name': 'installer_util_unittests', 'type': 'executable', 'dependencies': [ 'installer_util', 'installer_util_strings', 'installer/upgrade_test.gyp:alternate_version_generator_lib', '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../base/base.gyp:test_support_base', '../chrome/chrome.gyp:chrome_version_resources', '../components/components.gyp:variations', '../content/content.gyp:content_common', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', ], 'include_dirs': [ '..', ], 'sources': [ # List duplicated in GN build. '<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc', '<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util/installer_util_strings.rc', 'installer/setup/compat_checks_unittest.cc', 'installer/setup/setup_constants.cc', 'installer/util/advanced_firewall_manager_win_unittest.cc', 'installer/util/beacons_unittest.cc', 'installer/util/callback_work_item_unittest.cc', 'installer/util/channel_info_unittest.cc', 'installer/util/copy_tree_work_item_unittest.cc', 'installer/util/create_dir_work_item_unittest.cc', 'installer/util/create_reg_key_work_item_unittest.cc', 'installer/util/delete_after_reboot_helper_unittest.cc', 'installer/util/delete_reg_key_work_item_unittest.cc', 'installer/util/delete_reg_value_work_item_unittest.cc', 'installer/util/delete_tree_work_item_unittest.cc', 'installer/util/duplicate_tree_detector_unittest.cc', 'installer/util/fake_installation_state.h', 'installer/util/fake_product_state.h', 'installer/util/google_update_settings_unittest.cc', 'installer/util/install_util_unittest.cc', 'installer/util/installation_validation_helper.cc', 'installer/util/installation_validation_helper.h', 'installer/util/installation_validator_unittest.cc', 'installer/util/installer_state_unittest.cc', 'installer/util/installer_util_test_common.cc', 'installer/util/installer_util_test_common.h', 'installer/util/language_selector_unittest.cc', 'installer/util/legacy_firewall_manager_win_unittest.cc', 'installer/util/logging_installer_unittest.cc', 'installer/util/lzma_util_unittest.cc', 'installer/util/master_preferences_unittest.cc', 'installer/util/move_tree_work_item_unittest.cc', 'installer/util/product_state_unittest.cc', 'installer/util/product_unittest.cc', 'installer/util/registry_key_backup_unittest.cc', 'installer/util/registry_test_data.cc', 'installer/util/registry_test_data.h', 'installer/util/run_all_unittests.cc', 'installer/util/self_cleaning_temp_dir_unittest.cc', 'installer/util/set_reg_value_work_item_unittest.cc', 'installer/util/shell_util_unittest.cc', 'installer/util/test_app_registration_data.cc', 'installer/util/test_app_registration_data.h', 'installer/util/uninstall_metrics_unittest.cc', 'installer/util/wmi_unittest.cc', 'installer/util/work_item_list_unittest.cc', ], 'msvs_settings': { 'VCManifestTool': { 'AdditionalManifestFiles': [ '$(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest', ], }, }, }, { # GN version: //chrome/installer/util:strings 'target_name': 'installer_util_strings', 'type': 'none', 'actions': [ { 'action_name': 'installer_util_strings', 'variables': { 'create_string_rc_py': 'installer/util/prebuild/create_string_rc.py', 'brand_strings': '<(branding_path_component)_strings', 'gen_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util', }, 'inputs': [ '<(create_string_rc_py)', 'app/<(brand_strings).grd', ], 'outputs': [ '<(gen_dir)/installer_util_strings.h', '<(gen_dir)/installer_util_strings.rc', ], 'action': ['python', '<(create_string_rc_py)', '-i', 'app/<(brand_strings).grd:resources', '-n', 'installer_util_strings', '-o', '<(gen_dir)',], 'message': 'Generating installer_util_strings', }, ], 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)', ], }, }, { # GN version: //chrome/installer/launcher_support 'target_name': 'launcher_support', 'type': 'static_library', 'include_dirs': [ '..', ], 'direct_dependent_settings': { 'include_dirs': [ '..', ], }, 'dependencies': [ '<(DEPTH)/base/base.gyp:base', ], 'sources': [ 'installer/launcher_support/chrome_launcher_support.cc', 'installer/launcher_support/chrome_launcher_support.h', ], }, { # GN version: //chrome/installer/setup 'target_name': 'setup', 'type': 'executable', 'dependencies': [ 'chrome_version_header', 'installer_util', 'installer_util_strings', '../base/base.gyp:base', '../breakpad/breakpad.gyp:breakpad_handler', '../chrome/common_constants.gyp:common_constants', '../chrome_elf/chrome_elf.gyp:chrome_elf_constants', '../rlz/rlz.gyp:rlz_lib', '../third_party/zlib/zlib.gyp:zlib', ], 'include_dirs': [ '..', '<(INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)/setup', ], 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/setup', ], }, 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util/installer_util_strings.rc', 'installer/mini_installer/chrome.release', 'installer/setup/app_launcher_installer.cc', 'installer/setup/app_launcher_installer.h', 'installer/setup/archive_patch_helper.cc', 'installer/setup/archive_patch_helper.h', 'installer/setup/install.cc', 'installer/setup/install.h', 'installer/setup/install_worker.cc', 'installer/setup/install_worker.h', 'installer/setup/setup.ico', 'installer/setup/setup.rc', 'installer/setup/setup_constants.cc', 'installer/setup/setup_constants.h', 'installer/setup/setup_exe_version.rc.version', 'installer/setup/setup_main.cc', 'installer/setup/setup_main.h', 'installer/setup/setup_resource.h', 'installer/setup/setup_util.cc', 'installer/setup/setup_util.h', 'installer/setup/uninstall.cc', 'installer/setup/uninstall.h', 'installer/setup/update_active_setup_version_work_item.cc', 'installer/setup/update_active_setup_version_work_item.h', ], 'msvs_settings': { 'VCLinkerTool': { 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS }, 'VCManifestTool': { 'AdditionalManifestFiles': [ '$(ProjectDir)\\installer\\setup\\setup.exe.manifest', ], }, }, 'rules': [ { 'rule_name': 'setup_version', 'extension': 'version', 'variables': { 'version_py_path': '<(DEPTH)/build/util/version.py', 'template_input_path': 'installer/setup/setup_exe_version.rc.version', }, 'inputs': [ '<(template_input_path)', '<(version_path)', '<(lastchange_path)', '<(branding_dir)/BRANDING', ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/setup/setup_exe_version.rc', ], 'action': [ 'python', '<(version_py_path)', '-f', '<(version_path)', '-f', '<(lastchange_path)', '-f', '<(branding_dir)/BRANDING', '<(template_input_path)', '<@(_outputs)', ], 'process_outputs_as_sources': 1, 'message': 'Generating version information' }, ], 'conditions': [ ['target_arch=="ia32"', { 'msvs_settings': { 'VCCLCompilerTool': { 'EnableEnhancedInstructionSet': '4', # NoExtensions }, }, }], ], }, { # GN version: //chrome/installer/setup:setup_unittests 'target_name': 'setup_unittests', 'type': 'executable', 'dependencies': [ 'installer_util', 'installer_util_strings', '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../base/base.gyp:test_support_base', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', ], 'include_dirs': [ '..', '<(INTERMEDIATE_DIR)', ], # TODO(robertshield): Move the items marked with "Move to lib" # below into a separate lib and then link both setup.exe and # setup_unittests.exe against that. 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util/installer_util_strings.rc', 'installer/mini_installer/chrome.release', # Move to lib 'installer/mini_installer/appid.h', 'installer/mini_installer/chrome_appid.cc', 'installer/mini_installer/configuration.cc', 'installer/mini_installer/configuration.h', 'installer/mini_installer/configuration_test.cc', 'installer/mini_installer/decompress.cc', 'installer/mini_installer/decompress.h', 'installer/mini_installer/decompress_test.cc', 'installer/mini_installer/mini_installer_constants.cc', 'installer/mini_installer/mini_installer_constants.h', 'installer/mini_installer/mini_string.cc', 'installer/mini_installer/mini_string.h', 'installer/mini_installer/mini_string_test.cc', 'installer/mini_installer/regkey.cc', 'installer/mini_installer/regkey.h', 'installer/setup/app_launcher_installer.cc', # Move to lib 'installer/setup/app_launcher_installer.h', # Move to lib 'installer/setup/archive_patch_helper.cc', # Move to lib 'installer/setup/archive_patch_helper.h', # Move to lib 'installer/setup/archive_patch_helper_unittest.cc', 'installer/setup/install.cc', # Move to lib 'installer/setup/install.h', # Move to lib 'installer/setup/install_unittest.cc', 'installer/setup/install_worker.cc', # Move to lib 'installer/setup/install_worker.h', # Move to lib 'installer/setup/install_worker_unittest.cc', 'installer/setup/run_all_unittests.cc', 'installer/setup/setup_constants.cc', # Move to lib 'installer/setup/setup_constants.h', # Move to lib 'installer/setup/setup_util.cc', 'installer/setup/setup_util_unittest.cc', 'installer/setup/setup_util_unittest.h', 'installer/setup/update_active_setup_version_work_item.cc', # Move to lib 'installer/setup/update_active_setup_version_work_item.h', # Move to lib 'installer/setup/update_active_setup_version_work_item_unittest.cc', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [ 4267, ], }, ], }], ['OS=="win" and target_arch=="ia32"', { 'targets': [ { 'target_name': 'launcher_support64', 'type': 'static_library', 'include_dirs': [ '..', ], 'direct_dependent_settings': { 'include_dirs': [ '..', ], }, 'defines': [ '<@(nacl_win64_defines)', ], 'dependencies': [ '<(DEPTH)/base/base.gyp:base_win64', ], 'configurations': { 'Common_Base': { 'msvs_target_platform': 'x64', }, }, 'sources': [ 'installer/launcher_support/chrome_launcher_support.cc', 'installer/launcher_support/chrome_launcher_support.h', ], }, ], }], ['OS=="linux" and branding=="Chrome"', { 'variables': { # Always google_chrome since this only applies to branding==Chrome. 'branding_dir': 'app/theme/google_chrome', 'branding_dir_100': 'app/theme/default_100_percent/google_chrome', 'version' : '