# Copyright 2014 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. import("//build/config/chrome_build.gni") import("//testing/test.gni") static_library("util") { deps = [ "//base", "//chrome:strings", "//chrome/common:constants", "//chrome/common:result_codes", "//components/variations", "//content/public/common:result_codes", ] if (is_win) { # TODO(GYP) installer_util on Windows. # This is a bit tricky. It seems that what's currently called # installer_util_nacl_win64 should be a different target with a different # name ("installer_util_minimal"?) since it's not strictly the 64-bit build # of that target. sources = [ "chrome_binaries_operations.cc", "chrome_binaries_operations.h", "chrome_browser_operations.cc", "chrome_browser_operations.h", "chrome_browser_sxs_operations.cc", "chrome_browser_sxs_operations.h", "chrome_frame_operations.cc", "chrome_frame_operations.h", "compat_checks.cc", "compat_checks.h", "delete_after_reboot_helper.cc", "delete_after_reboot_helper.h", "google_chrome_distribution.cc", "google_chrome_distribution.h", "html_dialog.h", "html_dialog_impl.cc", "installation_validator.cc", "installation_validator.h", "logging_installer.cc", "logging_installer.h", "lzma_util.cc", "lzma_util.h", "master_preferences.cc", "master_preferences.h", "product.cc", "product.h", "product_operations.h", "self_cleaning_temp_dir.cc", "self_cleaning_temp_dir.h", "shell_util.cc", "shell_util.h", "uninstall_metrics.cc", "uninstall_metrics.h", "user_experiment.cc", "user_experiment.h", ] deps += [ ":strings", "//base/third_party/dynamic_annotations", "//components/metrics", "//courgette:courgette_lib", "//crypto", "//third_party/bspatch", "//third_party/icu", "//third_party/lzma_sdk", ] configs += [ "//build/config:precompiled_headers", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. "//build/config/compiler:no_size_t_to_int_warning", ] # TODO(GYP) hook up corresponding version of installer_util_nacl_win64 in GN sources += [ "advanced_firewall_manager_win.cc", "advanced_firewall_manager_win.h", "app_command.cc", "app_command.h", "app_commands.cc", "app_commands.h", "app_registration_data.h", "auto_launch_util.cc", "auto_launch_util.h", "beacons.cc", "beacons.h", "browser_distribution.cc", "browser_distribution.h", "callback_work_item.cc", "callback_work_item.h", "channel_info.cc", "channel_info.h", "chrome_frame_distribution.cc", "chrome_frame_distribution.h", "chromium_binaries_distribution.cc", "chromium_binaries_distribution.h", "conditional_work_item_list.cc", "conditional_work_item_list.h", "copy_tree_work_item.cc", "copy_tree_work_item.h", "create_dir_work_item.cc", "create_dir_work_item.h", "create_reg_key_work_item.cc", "create_reg_key_work_item.h", "delete_reg_key_work_item.cc", "delete_reg_key_work_item.h", "delete_reg_value_work_item.cc", "delete_reg_value_work_item.h", "delete_tree_work_item.cc", "delete_tree_work_item.h", "duplicate_tree_detector.cc", "duplicate_tree_detector.h", "firewall_manager_win.cc", "firewall_manager_win.h", "google_chrome_binaries_distribution.cc", "google_chrome_binaries_distribution.h", "google_chrome_sxs_distribution.cc", "google_chrome_sxs_distribution.h", "google_update_constants.cc", "google_update_constants.h", "google_update_settings.cc", "google_update_settings.h", "google_update_util.cc", "google_update_util.h", "helper.cc", "helper.h", "install_util.cc", "install_util.h", "installation_state.cc", "installation_state.h", "installer_state.cc", "installer_state.h", "l10n_string_util.cc", "l10n_string_util.h", "language_selector.cc", "language_selector.h", "legacy_firewall_manager_win.cc", "legacy_firewall_manager_win.h", "master_preferences_constants.cc", "master_preferences_constants.h", "move_tree_work_item.cc", "move_tree_work_item.h", "non_updating_app_registration_data.cc", "non_updating_app_registration_data.h", "registry_key_backup.cc", "registry_key_backup.h", "self_reg_work_item.cc", "self_reg_work_item.h", "set_reg_value_work_item.cc", "set_reg_value_work_item.h", "updating_app_registration_data.cc", "updating_app_registration_data.h", "util_constants.cc", "util_constants.h", "wmi.cc", "wmi.h", "work_item.cc", "work_item.h", "work_item_list.cc", "work_item_list.h", ] } else { sources = [ "master_preferences.cc", "master_preferences.h", "master_preferences_constants.cc", "master_preferences_constants.h", ] } } action("generate_strings") { visibility = [ ":strings" ] script = "prebuild/create_string_rc.py" if (is_chrome_branded) { grdfile = "//chrome/app/google_chrome_strings.grd" } else { grdfile = "//chrome/app/chromium_strings.grd" } inputs = [ grdfile, ] outputs = [ "$target_gen_dir/installer_util_strings.h", "$target_gen_dir/installer_util_strings.rc", ] args = [ "-i", rebase_path(grdfile, root_build_dir) + ":resources", "-n", "installer_util_strings", "-o", rebase_path(target_gen_dir, root_build_dir), ] } # Compile the generated .rc file. source_set("strings") { sources = get_target_outputs(":generate_strings") deps = [ ":generate_strings", ] } if (is_win) { test("installer_util_unittests") { sources = [ "../setup/compat_checks_unittest.cc", "../setup/setup_constants.cc", "advanced_firewall_manager_win_unittest.cc", "beacons_unittest.cc", "callback_work_item_unittest.cc", "channel_info_unittest.cc", "copy_tree_work_item_unittest.cc", "create_dir_work_item_unittest.cc", "create_reg_key_work_item_unittest.cc", "delete_after_reboot_helper_unittest.cc", "delete_reg_key_work_item_unittest.cc", "delete_reg_value_work_item_unittest.cc", "delete_tree_work_item_unittest.cc", "duplicate_tree_detector_unittest.cc", "fake_installation_state.h", "fake_product_state.h", "google_update_settings_unittest.cc", "install_util_unittest.cc", "installation_validation_helper.cc", "installation_validation_helper.h", "installation_validator_unittest.cc", "installer_state_unittest.cc", "installer_util_test_common.cc", "installer_util_test_common.h", "language_selector_unittest.cc", "legacy_firewall_manager_win_unittest.cc", "logging_installer_unittest.cc", "lzma_util_unittest.cc", "master_preferences_unittest.cc", "move_tree_work_item_unittest.cc", "product_state_unittest.cc", "product_unittest.cc", "product_unittest.h", "registry_key_backup_unittest.cc", "registry_test_data.cc", "registry_test_data.h", "run_all_unittests.cc", "self_cleaning_temp_dir_unittest.cc", "set_reg_value_work_item_unittest.cc", "shell_util_unittest.cc", "test_app_registration_data.cc", "test_app_registration_data.h", "uninstall_metrics_unittest.cc", "wmi_unittest.cc", "work_item_list_unittest.cc", ] deps = [ ":strings", ":util", "//base", "//base:i18n", "//base/test:test_support", "//chrome:other_version", "//chrome/common", "//chrome/installer/test:alternate_version_generator_lib", "//components/variations", "//content/public/common", # TODO(rockot): Remove this hack when we fix mojo environment deps. # See http://crbug.com/501385 "//mojo/environment:chromium", "//testing/gmock", "//testing/gtest", ] # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest } } # is_win