[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / installer / util / BUILD.gn
blobceedefd1ac017675d5e80c1d5fd2a9e3b90f3ef2
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     "//content/public/common:result_codes",
15   ]
17   if (is_win) {
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
22     # of that target.
23     sources = [
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",
32       "compat_checks.cc",
33       "compat_checks.h",
34       "delete_after_reboot_helper.cc",
35       "delete_after_reboot_helper.h",
36       "google_chrome_distribution.cc",
37       "google_chrome_distribution.h",
38       "html_dialog.h",
39       "html_dialog_impl.cc",
40       "installation_validator.cc",
41       "installation_validator.h",
42       "logging_installer.cc",
43       "logging_installer.h",
44       "lzma_util.cc",
45       "lzma_util.h",
46       "master_preferences.cc",
47       "master_preferences.h",
48       "product.cc",
49       "product.h",
50       "product_operations.h",
51       "self_cleaning_temp_dir.cc",
52       "self_cleaning_temp_dir.h",
53       "shell_util.cc",
54       "shell_util.h",
55       "uninstall_metrics.cc",
56       "uninstall_metrics.h",
57       "user_experiment.cc",
58       "user_experiment.h",
59     ]
60     deps += [
61       ":strings",
62       "//base/third_party/dynamic_annotations",
63       "//components/metrics",
64       "//courgette:courgette_lib",
65       "//crypto",
66       "//third_party/bspatch",
67       "//third_party/icu",
68       "//third_party/lzma_sdk",
69     ]
71     configs += [
72       "//build/config:precompiled_headers",
74       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
75       "//build/config/compiler:no_size_t_to_int_warning",
76     ]
78     # TODO(GYP) hook up corresponding version of installer_util_nacl_win64 in GN
79     sources += [
80       "advanced_firewall_manager_win.cc",
81       "advanced_firewall_manager_win.h",
82       "app_command.cc",
83       "app_command.h",
84       "app_commands.cc",
85       "app_commands.h",
86       "app_registration_data.h",
87       "auto_launch_util.cc",
88       "auto_launch_util.h",
89       "beacons.cc",
90       "beacons.h",
91       "browser_distribution.cc",
92       "browser_distribution.h",
93       "callback_work_item.cc",
94       "callback_work_item.h",
95       "channel_info.cc",
96       "channel_info.h",
97       "chrome_frame_distribution.cc",
98       "chrome_frame_distribution.h",
99       "chromium_binaries_distribution.cc",
100       "chromium_binaries_distribution.h",
101       "conditional_work_item_list.cc",
102       "conditional_work_item_list.h",
103       "copy_tree_work_item.cc",
104       "copy_tree_work_item.h",
105       "create_dir_work_item.cc",
106       "create_dir_work_item.h",
107       "create_reg_key_work_item.cc",
108       "create_reg_key_work_item.h",
109       "delete_reg_key_work_item.cc",
110       "delete_reg_key_work_item.h",
111       "delete_reg_value_work_item.cc",
112       "delete_reg_value_work_item.h",
113       "delete_tree_work_item.cc",
114       "delete_tree_work_item.h",
115       "duplicate_tree_detector.cc",
116       "duplicate_tree_detector.h",
117       "firewall_manager_win.cc",
118       "firewall_manager_win.h",
119       "google_chrome_binaries_distribution.cc",
120       "google_chrome_binaries_distribution.h",
121       "google_chrome_sxs_distribution.cc",
122       "google_chrome_sxs_distribution.h",
123       "google_update_constants.cc",
124       "google_update_constants.h",
125       "google_update_experiment_util.cc",
126       "google_update_experiment_util.h",
127       "google_update_settings.cc",
128       "google_update_settings.h",
129       "google_update_util.cc",
130       "google_update_util.h",
131       "helper.cc",
132       "helper.h",
133       "install_util.cc",
134       "install_util.h",
135       "installation_state.cc",
136       "installation_state.h",
137       "installer_state.cc",
138       "installer_state.h",
139       "l10n_string_util.cc",
140       "l10n_string_util.h",
141       "language_selector.cc",
142       "language_selector.h",
143       "legacy_firewall_manager_win.cc",
144       "legacy_firewall_manager_win.h",
145       "master_preferences_constants.cc",
146       "master_preferences_constants.h",
147       "move_tree_work_item.cc",
148       "move_tree_work_item.h",
149       "non_updating_app_registration_data.cc",
150       "non_updating_app_registration_data.h",
151       "registry_key_backup.cc",
152       "registry_key_backup.h",
153       "self_reg_work_item.cc",
154       "self_reg_work_item.h",
155       "set_reg_value_work_item.cc",
156       "set_reg_value_work_item.h",
157       "updating_app_registration_data.cc",
158       "updating_app_registration_data.h",
159       "util_constants.cc",
160       "util_constants.h",
161       "wmi.cc",
162       "wmi.h",
163       "work_item.cc",
164       "work_item.h",
165       "work_item_list.cc",
166       "work_item_list.h",
167     ]
168   } else {
169     sources = [
170       "google_update_experiment_util.cc",
171       "google_update_experiment_util.h",
172       "master_preferences.cc",
173       "master_preferences.h",
174       "master_preferences_constants.cc",
175       "master_preferences_constants.h",
176     ]
177   }
180 action("generate_strings") {
181   visibility = [ ":strings" ]
182   script = "prebuild/create_string_rc.py"
184   if (is_chrome_branded) {
185     grdfile = "//chrome/app/google_chrome_strings.grd"
186   } else {
187     grdfile = "//chrome/app/chromium_strings.grd"
188   }
190   inputs = [
191     grdfile,
192   ]
194   outputs = [
195     "$target_gen_dir/installer_util_strings.h",
196     "$target_gen_dir/installer_util_strings.rc",
197   ]
199   args = [
200     "-i",
201     rebase_path(grdfile, root_build_dir) + ":resources",
202     "-n",
203     "installer_util_strings",
204     "-o",
205     rebase_path(target_gen_dir, root_build_dir),
206   ]
209 # Compile the generated .rc file.
210 source_set("strings") {
211   sources = get_target_outputs(":generate_strings")
212   deps = [
213     ":generate_strings",
214   ]
217 if (is_win) {
218   test("installer_util_unittests") {
219     sources = [
220       "../setup/compat_checks_unittest.cc",
221       "../setup/setup_constants.cc",
222       "advanced_firewall_manager_win_unittest.cc",
223       "beacons_unittest.cc",
224       "callback_work_item_unittest.cc",
225       "channel_info_unittest.cc",
226       "copy_tree_work_item_unittest.cc",
227       "create_dir_work_item_unittest.cc",
228       "create_reg_key_work_item_unittest.cc",
229       "delete_after_reboot_helper_unittest.cc",
230       "delete_reg_key_work_item_unittest.cc",
231       "delete_reg_value_work_item_unittest.cc",
232       "delete_tree_work_item_unittest.cc",
233       "duplicate_tree_detector_unittest.cc",
234       "fake_installation_state.h",
235       "fake_product_state.h",
236       "google_update_settings_unittest.cc",
237       "install_util_unittest.cc",
238       "installation_validation_helper.cc",
239       "installation_validation_helper.h",
240       "installation_validator_unittest.cc",
241       "installer_state_unittest.cc",
242       "installer_util_test_common.cc",
243       "installer_util_test_common.h",
244       "language_selector_unittest.cc",
245       "legacy_firewall_manager_win_unittest.cc",
246       "logging_installer_unittest.cc",
247       "lzma_util_unittest.cc",
248       "master_preferences_unittest.cc",
249       "move_tree_work_item_unittest.cc",
250       "product_state_unittest.cc",
251       "product_unittest.cc",
252       "product_unittest.h",
253       "registry_key_backup_unittest.cc",
254       "registry_test_data.cc",
255       "registry_test_data.h",
256       "run_all_unittests.cc",
257       "self_cleaning_temp_dir_unittest.cc",
258       "set_reg_value_work_item_unittest.cc",
259       "shell_util_unittest.cc",
260       "test_app_registration_data.cc",
261       "test_app_registration_data.h",
262       "uninstall_metrics_unittest.cc",
263       "wmi_unittest.cc",
264       "work_item_list_unittest.cc",
265     ]
267     deps = [
268       ":strings",
269       ":util",
270       "//base",
271       "//base:i18n",
272       "//base/test:test_support",
273       "//chrome:other_version",
274       "//chrome/common",
275       "//chrome/installer/test:alternate_version_generator_lib",
276       "//content/public/common",
278       # TODO(rockot): Remove this hack when we fix mojo environment deps.
279       # See http://crbug.com/501385
280       "//mojo/environment:chromium",
281       "//testing/gmock",
282       "//testing/gtest",
283     ]
285     # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest
286   }
287 }  # is_win