Do not announce robot account token before account ID is available
[chromium-blink-merge.git] / chrome / installer / util / BUILD.gn
bloba73f9207eab74716ce7990adc647fee9b0b60064
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 static_library("util") {
6   deps = [
7     "//base",
8     "//chrome:resources",
9     "//chrome:strings",
10   ]
12   if (is_win) {
13     # TODO(GYP) installer_util on Windows.
14     # This is a bit tricky. It seems that what's currently called
15     # installer_util_nacl_win64 should be a different target with a different
16     # name ("installer_util_minimal"?) since it's not strictly the 64-bit build
17     # of that target.
18     sources = [
19       "chrome_binaries_operations.cc",
20       "chrome_binaries_operations.h",
21       "chrome_browser_operations.cc",
22       "chrome_browser_operations.h",
23       "chrome_browser_sxs_operations.cc",
24       "chrome_browser_sxs_operations.h",
25       "chrome_frame_operations.cc",
26       "chrome_frame_operations.h",
27       "compat_checks.cc",
28       "compat_checks.h",
29       "delete_after_reboot_helper.cc",
30       "delete_after_reboot_helper.h",
31       "google_chrome_distribution.cc",
32       "google_chrome_distribution.h",
33       "html_dialog.h",
34       "html_dialog_impl.cc",
35       "installation_validator.cc",
36       "installation_validator.h",
37       "logging_installer.cc",
38       "logging_installer.h",
39       "lzma_util.cc",
40       "lzma_util.h",
41       "master_preferences.cc",
42       "master_preferences.h",
43       "product.cc",
44       "product.h",
45       "product_operations.h",
46       "self_cleaning_temp_dir.cc",
47       "self_cleaning_temp_dir.h",
48       "shell_util.cc",
49       "shell_util.h",
50       "uninstall_metrics.cc",
51       "uninstall_metrics.h",
52       "user_experiment.cc",
53       "user_experiment.h",
54     ]
55     deps += [
56       ":strings",
57       "//base/third_party/dynamic_annotations",
58       "//chrome/common:constants",
59       "//components/metrics",
60       "//courgette:courgette_lib",
61       "//crypto",
62       "//third_party/bspatch",
63       "//third_party/icu",
64       "//third_party/lzma_sdk",
65     ]
66     include_dirs = [ "$root_gen_dir/installer_util_strings" ]
68     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
69     cflags = [ "/wd4267" ]
71     # TODO(GYP) hook up corresponding version of installer_util_nacl_win64 in GN
72     sources += [
73       "advanced_firewall_manager_win.cc",
74       "advanced_firewall_manager_win.h",
75       "app_command.cc",
76       "app_command.h",
77       "app_commands.cc",
78       "app_commands.h",
79       "app_registration_data.h",
80       "auto_launch_util.cc",
81       "auto_launch_util.h",
82       "browser_distribution.cc",
83       "browser_distribution.h",
84       "callback_work_item.cc",
85       "callback_work_item.h",
86       "channel_info.cc",
87       "channel_info.h",
88       "chrome_frame_distribution.cc",
89       "chrome_frame_distribution.h",
90       "chromium_binaries_distribution.cc",
91       "chromium_binaries_distribution.h",
92       "conditional_work_item_list.cc",
93       "conditional_work_item_list.h",
94       "copy_tree_work_item.cc",
95       "copy_tree_work_item.h",
96       "create_dir_work_item.cc",
97       "create_dir_work_item.h",
98       "create_reg_key_work_item.cc",
99       "create_reg_key_work_item.h",
100       "delete_reg_key_work_item.cc",
101       "delete_reg_key_work_item.h",
102       "delete_reg_value_work_item.cc",
103       "delete_reg_value_work_item.h",
104       "delete_tree_work_item.cc",
105       "delete_tree_work_item.h",
106       "duplicate_tree_detector.cc",
107       "duplicate_tree_detector.h",
108       "firewall_manager_win.cc",
109       "firewall_manager_win.h",
110       "google_chrome_binaries_distribution.cc",
111       "google_chrome_binaries_distribution.h",
112       "google_chrome_sxs_distribution.cc",
113       "google_chrome_sxs_distribution.h",
114       "google_update_constants.cc",
115       "google_update_constants.h",
116       "google_update_experiment_util.cc",
117       "google_update_experiment_util.h",
118       "google_update_settings.cc",
119       "google_update_settings.h",
120       "google_update_util.cc",
121       "google_update_util.h",
122       "helper.cc",
123       "helper.h",
124       "install_util.cc",
125       "install_util.h",
126       "installation_state.cc",
127       "installation_state.h",
128       "installer_state.cc",
129       "installer_state.h",
130       "l10n_string_util.cc",
131       "l10n_string_util.h",
132       "language_selector.cc",
133       "language_selector.h",
134       "legacy_firewall_manager_win.cc",
135       "legacy_firewall_manager_win.h",
136       "master_preferences_constants.cc",
137       "master_preferences_constants.h",
138       "move_tree_work_item.cc",
139       "move_tree_work_item.h",
140       "non_updating_app_registration_data.cc",
141       "non_updating_app_registration_data.h",
142       "registry_key_backup.cc",
143       "registry_key_backup.h",
144       "self_reg_work_item.cc",
145       "self_reg_work_item.h",
146       "set_reg_value_work_item.cc",
147       "set_reg_value_work_item.h",
148       "updating_app_registration_data.cc",
149       "updating_app_registration_data.h",
150       "util_constants.cc",
151       "util_constants.h",
152       "wmi.cc",
153       "wmi.h",
154       "work_item.cc",
155       "work_item.h",
156       "work_item_list.cc",
157       "work_item_list.h",
158     ]
159   } else {
160     sources = [
161       "google_update_experiment_util.cc",
162       "google_update_experiment_util.h",
163       "master_preferences.cc",
164       "master_preferences.h",
165       "master_preferences_constants.cc",
166       "master_preferences_constants.h",
167     ]
168   }
171 action("strings") {
172   script = "prebuild/create_string_rc.py"
174   if (is_chrome_branded) {
175     grdfile = "//chrome/app/google_chrome_strings.grd"
176   } else {
177     grdfile = "//chrome/app/chromium_strings.grd"
178   }
180   inputs = [
181     grdfile,
182   ]
184   # TODO(brettw) move to target_gen_dir
185   outdir = "$root_gen_dir/installer_util_strings"
186   outputs = [
187     "$outdir/installer_util_strings.h",
188     "$outdir/installer_util_strings.rc",
189   ]
191   args = [
192     "-i",
193     rebase_path(grdfile, root_build_dir) + ":resources",
194     "-n",
195     "installer_util_strings",
196     "-o",
197     rebase_path(outdir, root_build_dir),
198   ]