Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: chrome/installer/util/BUILD.gn

Issue 1534903002: Split GN installer_util into one that has no strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_watcher/BUILD.gn ('k') | win8/delegate_execute/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 7
8 static_library("util") { 8 # Generally you should depend on this target, see below for discussion.
9 group("util") {
10 public_deps = [
11 ":with_no_strings_some_things_wont_work",
12 ]
13 if (is_win) {
14 public_deps += [ ":strings" ]
15 }
16 }
17
18 # chrome/installer/util has generated strings on Windows. These appear as
grt (UTC plus 2) 2015/12/18 19:02:15 I think this comment is incorrect. Chrome calls ma
brettw 2015/12/21 17:33:00 This comment is referring specifically to chrome.e
grt (UTC plus 2) 2015/12/21 19:45:06 Ah, now I see what you mean. :-(
brettw 2015/12/21 22:56:22 I made this distinction more clear in the comment
19 # Windows resources and are fairly large (~200KB). They are generated by the
20 # ":generate_strings" target and compiled by the ":strings" target.
21 #
22 # Some code, like the Windows chrome.exe code uses installer_util functions
23 # without calling any functions that use the strings. And historitally in the
Dirk Pranke 2015/12/20 19:53:46 nit: s/historitally/historically
24 # GYP build the strings resource had to be manually linked, so the strings
25 # never ended up being in chrome.exe and everything was fine.
26 #
27 # However, this is obviously a fragile and confusing situation. If you depend
28 # on this target rather than going through the ":util" version that links the
29 # strings above, anything that uses localized strings won't work. There is
30 # no definition of what works and doesn't work, and this may also change over
31 # time. As an example at the time of this writing, chrome.exe calls
32 # BrowserDistribution::GetRegistryPath. This function doesn't use any strings,
33 # but lots of other functions in BrowserDistribution do use localized strings.
34 #
35 # Ideally, this should be cleaved in two parts: the main "installer util" and
36 # some kind of mini installer util that just contains the functions needed by
37 # chrome.exe and any other clients that don't need the strings.
38 static_library("with_no_strings_some_things_wont_work") {
9 deps = [ 39 deps = [
10 "//base", 40 "//base",
11 "//chrome:strings", 41 "//chrome:strings",
12 "//chrome/common:constants", 42 "//chrome/common:constants",
13 "//components/variations", 43 "//components/variations",
14 "//content/public/common:result_codes", 44 "//content/public/common:result_codes",
15 ] 45 ]
16 46
17 # The constants target checks the Chrome distribution from this target. Both 47 # The constants target checks the Chrome distribution from this target. Both
18 # targets have to be linked together in practice. 48 # targets have to be linked together in practice.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 "self_cleaning_temp_dir.cc", 89 "self_cleaning_temp_dir.cc",
60 "self_cleaning_temp_dir.h", 90 "self_cleaning_temp_dir.h",
61 "shell_util.cc", 91 "shell_util.cc",
62 "shell_util.h", 92 "shell_util.h",
63 "uninstall_metrics.cc", 93 "uninstall_metrics.cc",
64 "uninstall_metrics.h", 94 "uninstall_metrics.h",
65 "user_experiment.cc", 95 "user_experiment.cc",
66 "user_experiment.h", 96 "user_experiment.h",
67 ] 97 ]
68 98
69 public_deps = [
70 ":strings",
71 ]
72 deps += [ 99 deps += [
100 # Need to depend on the generated strings target since files here
101 # depend on the generated header, but only depend on the ":strings"
102 # target (which actually compiles and causes the generated code to be
103 # linked) from the ":util" target.
104 ":generate_strings",
73 "//base/third_party/dynamic_annotations", 105 "//base/third_party/dynamic_annotations",
74 "//components/metrics", 106 "//components/metrics",
75 "//courgette:courgette_lib", 107 "//courgette:courgette_lib",
76 "//crypto", 108 "//crypto",
77 "//third_party/bspatch", 109 "//third_party/bspatch",
78 "//third_party/icu", 110 "//third_party/icu",
79 "//third_party/lzma_sdk", 111 "//third_party/lzma_sdk",
80 ] 112 ]
81 113
82 configs += [ 114 configs += [
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 sources = [ 212 sources = [
181 "master_preferences.cc", 213 "master_preferences.cc",
182 "master_preferences.h", 214 "master_preferences.h",
183 "master_preferences_constants.cc", 215 "master_preferences_constants.cc",
184 "master_preferences_constants.h", 216 "master_preferences_constants.h",
185 ] 217 ]
186 } 218 }
187 } 219 }
188 220
189 action("generate_strings") { 221 action("generate_strings") {
190 visibility = [ ":strings" ] 222 visibility = [
223 ":strings",
224 ":with_no_strings_some_things_wont_work",
225 ]
191 script = "prebuild/create_string_rc.py" 226 script = "prebuild/create_string_rc.py"
192 227
193 if (is_chrome_branded) { 228 if (is_chrome_branded) {
194 grdfile = "//chrome/app/google_chrome_strings.grd" 229 grdfile = "//chrome/app/google_chrome_strings.grd"
195 } else { 230 } else {
196 grdfile = "//chrome/app/chromium_strings.grd" 231 grdfile = "//chrome/app/chromium_strings.grd"
197 } 232 }
198 233
199 inputs = [ 234 inputs = [
200 grdfile, 235 grdfile,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 "//chrome/installer/test:alternate_version_generator_lib", 319 "//chrome/installer/test:alternate_version_generator_lib",
285 "//components/variations", 320 "//components/variations",
286 "//content/public/common", 321 "//content/public/common",
287 "//testing/gmock", 322 "//testing/gmock",
288 "//testing/gtest", 323 "//testing/gtest",
289 ] 324 ]
290 325
291 # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_install er.exe.manifest 326 # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_install er.exe.manifest
292 } 327 }
293 } # is_win 328 } # is_win
OLDNEW
« no previous file with comments | « chrome/chrome_watcher/BUILD.gn ('k') | win8/delegate_execute/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698