1 # Copyright 2014 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.
5 import("//build/config/chrome_build.gni")
6 import("//testing/test.gni")
8 static_library("util") {
12 "//chrome/common:constants",
13 "//chrome/common:result_codes",
14 "//content/public/common:result_codes",
18 # TODO(GYP) installer_util on Windows.
19 # This is a bit tricky. It seems that what's currently called
20 # installer_util_nacl_win64 should be a different target with a different
21 # name ("installer_util_minimal"?) since it's not strictly the 64-bit build
24 "chrome_binaries_operations.cc",
25 "chrome_binaries_operations.h",
26 "chrome_browser_operations.cc",
27 "chrome_browser_operations.h",
28 "chrome_browser_sxs_operations.cc",
29 "chrome_browser_sxs_operations.h",
30 "chrome_frame_operations.cc",
31 "chrome_frame_operations.h",
34 "delete_after_reboot_helper.cc",
35 "delete_after_reboot_helper.h",
36 "google_chrome_distribution.cc",
37 "google_chrome_distribution.h",
39 "html_dialog_impl.cc",
40 "installation_validator.cc",
41 "installation_validator.h",
42 "logging_installer.cc",
43 "logging_installer.h",
46 "master_preferences.cc",
47 "master_preferences.h",
50 "product_operations.h",
51 "self_cleaning_temp_dir.cc",
52 "self_cleaning_temp_dir.h",
55 "uninstall_metrics.cc",
56 "uninstall_metrics.h",
62 "//base/third_party/dynamic_annotations",
63 "//components/metrics",
64 "//courgette:courgette_lib",
66 "//third_party/bspatch",
68 "//third_party/lzma_sdk",
71 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
72 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
74 # TODO(GYP) hook up corresponding version of installer_util_nacl_win64 in GN
76 "advanced_firewall_manager_win.cc",
77 "advanced_firewall_manager_win.h",
82 "app_registration_data.h",
83 "auto_launch_util.cc",
87 "browser_distribution.cc",
88 "browser_distribution.h",
89 "callback_work_item.cc",
90 "callback_work_item.h",
93 "chrome_frame_distribution.cc",
94 "chrome_frame_distribution.h",
95 "chromium_binaries_distribution.cc",
96 "chromium_binaries_distribution.h",
97 "conditional_work_item_list.cc",
98 "conditional_work_item_list.h",
99 "copy_tree_work_item.cc",
100 "copy_tree_work_item.h",
101 "create_dir_work_item.cc",
102 "create_dir_work_item.h",
103 "create_reg_key_work_item.cc",
104 "create_reg_key_work_item.h",
105 "delete_reg_key_work_item.cc",
106 "delete_reg_key_work_item.h",
107 "delete_reg_value_work_item.cc",
108 "delete_reg_value_work_item.h",
109 "delete_tree_work_item.cc",
110 "delete_tree_work_item.h",
111 "duplicate_tree_detector.cc",
112 "duplicate_tree_detector.h",
113 "firewall_manager_win.cc",
114 "firewall_manager_win.h",
115 "google_chrome_binaries_distribution.cc",
116 "google_chrome_binaries_distribution.h",
117 "google_chrome_sxs_distribution.cc",
118 "google_chrome_sxs_distribution.h",
119 "google_update_constants.cc",
120 "google_update_constants.h",
121 "google_update_experiment_util.cc",
122 "google_update_experiment_util.h",
123 "google_update_settings.cc",
124 "google_update_settings.h",
125 "google_update_util.cc",
126 "google_update_util.h",
131 "installation_state.cc",
132 "installation_state.h",
133 "installer_state.cc",
135 "l10n_string_util.cc",
136 "l10n_string_util.h",
137 "language_selector.cc",
138 "language_selector.h",
139 "legacy_firewall_manager_win.cc",
140 "legacy_firewall_manager_win.h",
141 "master_preferences_constants.cc",
142 "master_preferences_constants.h",
143 "move_tree_work_item.cc",
144 "move_tree_work_item.h",
145 "non_updating_app_registration_data.cc",
146 "non_updating_app_registration_data.h",
147 "registry_key_backup.cc",
148 "registry_key_backup.h",
149 "self_reg_work_item.cc",
150 "self_reg_work_item.h",
151 "set_reg_value_work_item.cc",
152 "set_reg_value_work_item.h",
153 "updating_app_registration_data.cc",
154 "updating_app_registration_data.h",
166 "google_update_experiment_util.cc",
167 "google_update_experiment_util.h",
168 "master_preferences.cc",
169 "master_preferences.h",
170 "master_preferences_constants.cc",
171 "master_preferences_constants.h",
176 action("generate_strings") {
177 visibility = [ ":strings" ]
178 script = "prebuild/create_string_rc.py"
180 if (is_chrome_branded) {
181 grdfile = "//chrome/app/google_chrome_strings.grd"
183 grdfile = "//chrome/app/chromium_strings.grd"
191 "$target_gen_dir/installer_util_strings.h",
192 "$target_gen_dir/installer_util_strings.rc",
197 rebase_path(grdfile, root_build_dir) + ":resources",
199 "installer_util_strings",
201 rebase_path(target_gen_dir, root_build_dir),
205 # Compile the generated .rc file.
206 source_set("strings") {
207 sources = get_target_outputs(":generate_strings")
214 test("installer_util_unittests") {
216 "../setup/compat_checks_unittest.cc",
217 "../setup/setup_constants.cc",
218 "advanced_firewall_manager_win_unittest.cc",
219 "beacons_unittest.cc",
220 "callback_work_item_unittest.cc",
221 "channel_info_unittest.cc",
222 "copy_tree_work_item_unittest.cc",
223 "create_dir_work_item_unittest.cc",
224 "create_reg_key_work_item_unittest.cc",
225 "delete_after_reboot_helper_unittest.cc",
226 "delete_reg_key_work_item_unittest.cc",
227 "delete_reg_value_work_item_unittest.cc",
228 "delete_tree_work_item_unittest.cc",
229 "duplicate_tree_detector_unittest.cc",
230 "fake_installation_state.h",
231 "fake_product_state.h",
232 "google_update_settings_unittest.cc",
233 "install_util_unittest.cc",
234 "installation_validation_helper.cc",
235 "installation_validation_helper.h",
236 "installation_validator_unittest.cc",
237 "installer_state_unittest.cc",
238 "installer_util_test_common.cc",
239 "installer_util_test_common.h",
240 "language_selector_unittest.cc",
241 "legacy_firewall_manager_win_unittest.cc",
242 "logging_installer_unittest.cc",
243 "lzma_util_unittest.cc",
244 "master_preferences_unittest.cc",
245 "move_tree_work_item_unittest.cc",
246 "product_state_unittest.cc",
247 "product_unittest.cc",
248 "product_unittest.h",
249 "registry_key_backup_unittest.cc",
250 "registry_test_data.cc",
251 "registry_test_data.h",
252 "run_all_unittests.cc",
253 "self_cleaning_temp_dir_unittest.cc",
254 "set_reg_value_work_item_unittest.cc",
255 "shell_util_unittest.cc",
256 "test_app_registration_data.cc",
257 "test_app_registration_data.h",
258 "uninstall_metrics_unittest.cc",
260 "work_item_list_unittest.cc",
268 "//base/test:test_support",
269 "//chrome:other_version",
271 "//chrome/installer/test:alternate_version_generator_lib",
272 "//content/public/common",
274 # TODO(rockot): Remove this hack when we fix mojo environment deps.
275 # See http://crbug.com/501385
276 "//mojo/environment:chromium",
281 # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest