Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / installer / util / BUILD.gn
blob7b20c75525b48a26a084169b41f7e3fa33166ca7
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") {
9   deps = [
10     "//base",
11     "//chrome:strings",
12     "//chrome/common:constants",
13     "//chrome/common:result_codes",
14     "//components/variations",
15     "//content/public/common:result_codes",
16   ]
18   if (is_win) {
19     # TODO(GYP) installer_util on Windows.
20     # This is a bit tricky. It seems that what's currently called
21     # installer_util_nacl_win64 should be a different target with a different
22     # name ("installer_util_minimal"?) since it's not strictly the 64-bit build
23     # of that target.
24     sources = [
25       "chrome_binaries_operations.cc",
26       "chrome_binaries_operations.h",
27       "chrome_browser_operations.cc",
28       "chrome_browser_operations.h",
29       "chrome_browser_sxs_operations.cc",
30       "chrome_browser_sxs_operations.h",
31       "chrome_frame_operations.cc",
32       "chrome_frame_operations.h",
33       "compat_checks.cc",
34       "compat_checks.h",
35       "delete_after_reboot_helper.cc",
36       "delete_after_reboot_helper.h",
37       "google_chrome_distribution.cc",
38       "google_chrome_distribution.h",
39       "html_dialog.h",
40       "html_dialog_impl.cc",
41       "installation_validator.cc",
42       "installation_validator.h",
43       "logging_installer.cc",
44       "logging_installer.h",
45       "lzma_util.cc",
46       "lzma_util.h",
47       "master_preferences.cc",
48       "master_preferences.h",
49       "product.cc",
50       "product.h",
51       "product_operations.h",
52       "self_cleaning_temp_dir.cc",
53       "self_cleaning_temp_dir.h",
54       "shell_util.cc",
55       "shell_util.h",
56       "uninstall_metrics.cc",
57       "uninstall_metrics.h",
58       "user_experiment.cc",
59       "user_experiment.h",
60     ]
61     deps += [
62       ":strings",
63       "//base/third_party/dynamic_annotations",
64       "//components/metrics",
65       "//courgette:courgette_lib",
66       "//crypto",
67       "//third_party/bspatch",
68       "//third_party/icu",
69       "//third_party/lzma_sdk",
70     ]
72     configs += [
73       "//build/config:precompiled_headers",
75       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
76       "//build/config/compiler:no_size_t_to_int_warning",
77     ]
79     # TODO(GYP) hook up corresponding version of installer_util_nacl_win64 in GN
80     sources += [
81       "advanced_firewall_manager_win.cc",
82       "advanced_firewall_manager_win.h",
83       "app_command.cc",
84       "app_command.h",
85       "app_commands.cc",
86       "app_commands.h",
87       "app_registration_data.h",
88       "auto_launch_util.cc",
89       "auto_launch_util.h",
90       "beacons.cc",
91       "beacons.h",
92       "browser_distribution.cc",
93       "browser_distribution.h",
94       "callback_work_item.cc",
95       "callback_work_item.h",
96       "channel_info.cc",
97       "channel_info.h",
98       "chrome_frame_distribution.cc",
99       "chrome_frame_distribution.h",
100       "chromium_binaries_distribution.cc",
101       "chromium_binaries_distribution.h",
102       "conditional_work_item_list.cc",
103       "conditional_work_item_list.h",
104       "copy_tree_work_item.cc",
105       "copy_tree_work_item.h",
106       "create_dir_work_item.cc",
107       "create_dir_work_item.h",
108       "create_reg_key_work_item.cc",
109       "create_reg_key_work_item.h",
110       "delete_reg_key_work_item.cc",
111       "delete_reg_key_work_item.h",
112       "delete_reg_value_work_item.cc",
113       "delete_reg_value_work_item.h",
114       "delete_tree_work_item.cc",
115       "delete_tree_work_item.h",
116       "duplicate_tree_detector.cc",
117       "duplicate_tree_detector.h",
118       "firewall_manager_win.cc",
119       "firewall_manager_win.h",
120       "google_chrome_binaries_distribution.cc",
121       "google_chrome_binaries_distribution.h",
122       "google_chrome_sxs_distribution.cc",
123       "google_chrome_sxs_distribution.h",
124       "google_update_constants.cc",
125       "google_update_constants.h",
126       "google_update_settings.cc",
127       "google_update_settings.h",
128       "google_update_util.cc",
129       "google_update_util.h",
130       "helper.cc",
131       "helper.h",
132       "install_util.cc",
133       "install_util.h",
134       "installation_state.cc",
135       "installation_state.h",
136       "installer_state.cc",
137       "installer_state.h",
138       "l10n_string_util.cc",
139       "l10n_string_util.h",
140       "language_selector.cc",
141       "language_selector.h",
142       "legacy_firewall_manager_win.cc",
143       "legacy_firewall_manager_win.h",
144       "master_preferences_constants.cc",
145       "master_preferences_constants.h",
146       "move_tree_work_item.cc",
147       "move_tree_work_item.h",
148       "non_updating_app_registration_data.cc",
149       "non_updating_app_registration_data.h",
150       "registry_key_backup.cc",
151       "registry_key_backup.h",
152       "self_reg_work_item.cc",
153       "self_reg_work_item.h",
154       "set_reg_value_work_item.cc",
155       "set_reg_value_work_item.h",
156       "updating_app_registration_data.cc",
157       "updating_app_registration_data.h",
158       "util_constants.cc",
159       "util_constants.h",
160       "wmi.cc",
161       "wmi.h",
162       "work_item.cc",
163       "work_item.h",
164       "work_item_list.cc",
165       "work_item_list.h",
166     ]
167   } else {
168     sources = [
169       "master_preferences.cc",
170       "master_preferences.h",
171       "master_preferences_constants.cc",
172       "master_preferences_constants.h",
173     ]
174   }
177 action("generate_strings") {
178   visibility = [ ":strings" ]
179   script = "prebuild/create_string_rc.py"
181   if (is_chrome_branded) {
182     grdfile = "//chrome/app/google_chrome_strings.grd"
183   } else {
184     grdfile = "//chrome/app/chromium_strings.grd"
185   }
187   inputs = [
188     grdfile,
189   ]
191   outputs = [
192     "$target_gen_dir/installer_util_strings.h",
193     "$target_gen_dir/installer_util_strings.rc",
194   ]
196   args = [
197     "-i",
198     rebase_path(grdfile, root_build_dir) + ":resources",
199     "-n",
200     "installer_util_strings",
201     "-o",
202     rebase_path(target_gen_dir, root_build_dir),
203   ]
206 # Compile the generated .rc file.
207 source_set("strings") {
208   sources = get_target_outputs(":generate_strings")
209   deps = [
210     ":generate_strings",
211   ]
214 if (is_win) {
215   test("installer_util_unittests") {
216     sources = [
217       "../setup/compat_checks_unittest.cc",
218       "../setup/setup_constants.cc",
219       "advanced_firewall_manager_win_unittest.cc",
220       "beacons_unittest.cc",
221       "callback_work_item_unittest.cc",
222       "channel_info_unittest.cc",
223       "copy_tree_work_item_unittest.cc",
224       "create_dir_work_item_unittest.cc",
225       "create_reg_key_work_item_unittest.cc",
226       "delete_after_reboot_helper_unittest.cc",
227       "delete_reg_key_work_item_unittest.cc",
228       "delete_reg_value_work_item_unittest.cc",
229       "delete_tree_work_item_unittest.cc",
230       "duplicate_tree_detector_unittest.cc",
231       "fake_installation_state.h",
232       "fake_product_state.h",
233       "google_update_settings_unittest.cc",
234       "install_util_unittest.cc",
235       "installation_validation_helper.cc",
236       "installation_validation_helper.h",
237       "installation_validator_unittest.cc",
238       "installer_state_unittest.cc",
239       "installer_util_test_common.cc",
240       "installer_util_test_common.h",
241       "language_selector_unittest.cc",
242       "legacy_firewall_manager_win_unittest.cc",
243       "logging_installer_unittest.cc",
244       "lzma_util_unittest.cc",
245       "master_preferences_unittest.cc",
246       "move_tree_work_item_unittest.cc",
247       "product_state_unittest.cc",
248       "product_unittest.cc",
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",
259       "wmi_unittest.cc",
260       "work_item_list_unittest.cc",
261     ]
263     deps = [
264       ":strings",
265       ":util",
266       "//base",
267       "//base:i18n",
268       "//base/test:test_support",
269       "//chrome:other_version",
270       "//chrome/common",
271       "//chrome/installer/test:alternate_version_generator_lib",
272       "//components/variations",
273       "//content/public/common",
275       # TODO(rockot): Remove this hack when we fix mojo environment deps.
276       # See http://crbug.com/501385
277       "//mojo/environment:chromium",
278       "//testing/gmock",
279       "//testing/gtest",
280     ]
282     # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest
283   }
284 }  # is_win