# Copyright (c) 2011 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': '<(SHARED_INTERMEDIATE_DIR)/build/LASTCHANGE', # 'branding_dir' is set in the 'conditions' section at the bottom. }, 'conditions': [ ['OS=="win"', { 'targets': [ { 'target_name': 'gcapi_dll', 'type': 'loadable_module', 'dependencies': [ '<(DEPTH)/google_update/google_update.gyp:google_update', ], 'include_dirs': [ '<(DEPTH)', ], 'sources': [ 'installer/gcapi/gcapi.cc', 'installer/gcapi/gcapi.h', ], }, { 'target_name': 'gcapi_lib', 'type': 'static_library', 'dependencies': [ '<(DEPTH)/google_update/google_update.gyp:google_update', ], 'include_dirs': [ '<(DEPTH)', ], 'sources': [ 'installer/gcapi/gcapi.cc', 'installer/gcapi/gcapi.h', ], }, { 'target_name': 'gcapi_test', 'type': 'executable', 'dependencies': [ 'gcapi_dll', 'gcapi_lib', ], 'include_dirs': [ '<(DEPTH)', ], 'sources': [ 'installer/gcapi/gcapi_test.cc', 'installer/gcapi/gcapi_test.rc', 'installer/gcapi/resource.h', ], }, { 'target_name': 'installer_util_unittests', 'type': 'executable', 'dependencies': [ 'installer_util', 'installer_util_strings', '../content/content.gyp:content_common', '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:test_support_base', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/testing/gmock.gyp:gmock', '<(DEPTH)/testing/gtest.gyp:gtest', ], 'include_dirs': [ '<(DEPTH)', ], 'sources': [ 'installer/setup/compat_checks_unittest.cc', 'installer/setup/setup_constants.cc', 'installer/util/browser_distribution_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_chrome_distribution_unittest.cc', 'installer/util/google_update_settings_unittest.cc', 'installer/util/install_util_unittest.cc', 'installer/util/installation_validator_unittest.cc', 'installer/util/installation_validation_helper.cc', 'installer/util/installation_validation_helper.h', 'installer/util/installer_state_unittest.cc', 'installer/util/installer_util_unittests.rc', 'installer/util/installer_util_unittests_resource.h', 'installer/util/language_selector_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_unittest.h', 'installer/util/product_unittest.cc', 'installer/util/product_state_unittest.cc', '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/wmi_unittest.cc', 'installer/util/work_item_list_unittest.cc', ], 'msvs_settings': { 'VCManifestTool': { 'AdditionalManifestFiles': '$(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest', }, }, }, { 'target_name': 'installer_util_strings', 'type': 'none', 'rules': [ { 'rule_name': 'installer_util_strings', 'extension': 'grd', 'variables': { 'create_string_rc_py' : 'installer/util/prebuild/create_string_rc.py', }, 'inputs': [ '<(create_string_rc_py)', '<(RULE_INPUT_PATH)', ], 'outputs': [ # Don't use <(RULE_INPUT_ROOT) to create the output file # name, because the base name of the input # (generated_resources.grd) doesn't match the generated file # (installer_util_strings.h). '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.h', ], 'action': ['python', '<(create_string_rc_py)', '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings', '<(branding)',], 'message': 'Generating resources from <(RULE_INPUT_PATH)', }, ], 'sources': [ 'app/chromium_strings.grd', ], 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings', ], }, }, { 'target_name': 'mini_installer_test', 'type': 'executable', 'dependencies': [ 'installer_util', 'installer_util_strings', '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:test_support_base', '<(DEPTH)/chrome/chrome.gyp:test_support_common', '<(DEPTH)/testing/gtest.gyp:gtest', ], 'include_dirs': [ '<(DEPTH)', ], 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc', 'installer/util/installation_validation_helper.cc', 'installer/util/installation_validation_helper.h', 'test/mini_installer_test/run_all_unittests.cc', 'test/mini_installer_test/chrome_mini_installer.cc', 'test/mini_installer_test/chrome_mini_installer.h', 'test/mini_installer_test/mini_installer_test_constants.cc', 'test/mini_installer_test/mini_installer_test_constants.h', 'test/mini_installer_test/mini_installer_test_util.cc', 'test/mini_installer_test/mini_installer_test_util.h', 'test/mini_installer_test/test.cc', ], 'msvs_settings': { 'VCManifestTool': { 'AdditionalManifestFiles': '$(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest', }, }, }, { 'target_name': 'setup', 'type': 'executable', 'dependencies': [ 'installer_util', 'installer_util_strings', '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/build/util/build_util.gyp:lastchange', '<(DEPTH)/build/util/support/support.gyp:*', '<(DEPTH)/build/win/system.gyp:cygwin', '<(DEPTH)/chrome_frame/chrome_frame.gyp:chrome_tab_idl', '<(DEPTH)/chrome_frame/chrome_frame.gyp:npchrome_frame', '<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler', '<(DEPTH)/rlz/rlz.gyp:rlz_lib', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib', ], 'include_dirs': [ '<(DEPTH)', '<(INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)/setup', ], 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/setup', ], }, 'sources': [ 'installer/mini_installer/chrome.release', 'installer/setup/chrome_frame_quick_enable.cc', 'installer/setup/chrome_frame_quick_enable.h', 'installer/setup/chrome_frame_ready_mode.cc', 'installer/setup/chrome_frame_ready_mode.h', 'installer/setup/install.cc', 'installer/setup/install.h', 'installer/setup/install_worker.cc', 'installer/setup/install_worker.h', 'installer/setup/setup_main.cc', '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_resource.h', 'installer/setup/setup_util.cc', 'installer/setup/setup_util.h', 'installer/setup/uninstall.cc', 'installer/setup/uninstall.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)/chrome/tools/build/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' }, { 'rule_name': 'server_dlls', 'extension': 'release', 'variables': { 'scan_server_dlls_py' : 'tools/build/win/scan_server_dlls.py', 'template_file': 'mini_installer/chrome.release', }, 'inputs': [ '<(scan_server_dlls_py)', '<(template_file)' ], 'outputs': [ '<(INTERMEDIATE_DIR)/registered_dlls.h', ], 'action': [ 'python', '<(scan_server_dlls_py)', '--output_dir=<(PRODUCT_DIR)', '--input_file=<(RULE_INPUT_PATH)', '--header_output_dir=<(INTERMEDIATE_DIR)', # TODO(sgk): may just use environment variables #'--distribution=$(CHROMIUM_BUILD)', '--distribution=_google_chrome', ], }, ], 'conditions': [ # TODO(mark): <(branding_dir) should be defined by the # global condition block at the bottom of the file, but # this doesn't work due to the following issue: # # http://code.google.com/p/gyp/issues/detail?id=22 # # Remove this block once the above issue is fixed. [ 'branding == "Chrome"', { 'variables': { 'branding_dir': 'app/theme/google_chrome', }, }, { # else branding!="Chrome" 'variables': { 'branding_dir': 'app/theme/chromium', }, }], ], }, { 'target_name': 'setup_unittests', 'type': 'executable', 'dependencies': [ 'installer_util', 'installer_util_strings', '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:test_support_base', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/chrome_frame/chrome_frame.gyp:chrome_tab_idl', '<(DEPTH)/testing/gmock.gyp:gmock', '<(DEPTH)/testing/gtest.gyp:gtest', ], 'include_dirs': [ '<(DEPTH)', '<(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': [ 'installer/mini_installer/decompress.cc', 'installer/mini_installer/decompress.h', 'installer/mini_installer/decompress_test.cc', 'installer/mini_installer/mini_string.cc', 'installer/mini_installer/mini_string.h', 'installer/mini_installer/mini_string_test.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_unittests.rc', 'installer/setup/setup_unittests_resource.h', 'installer/setup/setup_util.cc', 'installer/setup/setup_util_unittest.cc', ], }, ], }], ['OS=="linux" and branding=="Chrome"', { 'variables': { # Always google_chrome since this only applies to branding==Chrome. 'branding_dir': 'app/theme/google_chrome', 'version' : '