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

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

Issue 2559053002: Instrument setup.exe in the SyzyAsan builds.
Patch Set: create_installer_archive changes. Created 4 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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/compiler/compiler.gni") 5 import("//build/config/compiler/compiler.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//build/config/ui.gni") 7 import("//build/config/ui.gni")
8 import("//chrome/process_version_rc_template.gni") 8 import("//chrome/process_version_rc_template.gni")
9 import("//chrome/test/mini_installer/mini_installer_test.gni") 9 import("//chrome/test/mini_installer/mini_installer_test.gni")
10 import("//third_party/icu/config.gni") 10 import("//third_party/icu/config.gni")
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ":lib", 68 ":lib",
69 ] 69 ]
70 deps = [ 70 deps = [
71 "//base", 71 "//base",
72 "//testing/gtest", 72 "//testing/gtest",
73 ] 73 ]
74 } 74 }
75 75
76 # The runtime deps are used to tell create_installer_archive what component 76 # The runtime deps are used to tell create_installer_archive what component
77 # DLLs need to be packaged in a component build. 77 # DLLs need to be packaged in a component build.
78 chrome_runtime_deps = "$root_gen_dir/chrome_component.runtime_deps" 78 chrome_runtime_deps_path = "$root_gen_dir/chrome_component.runtime_deps"
79 setup_runtime_deps = "$root_gen_dir/setup.runtime_deps" 79 setup_runtime_deps_path = "$root_gen_dir/setup.runtime_deps"
80
81 setup_syzygy_runtime_deps_path = "$root_gen_dir/setup_syzygy.runtime_deps"
80 82
81 group("chrome_runtime_deps") { 83 group("chrome_runtime_deps") {
82 write_runtime_deps = chrome_runtime_deps 84 write_runtime_deps = chrome_runtime_deps_path
83 data_deps = [ 85 data_deps = [
84 "//chrome", 86 "//chrome",
85 ] 87 ]
86 } 88 }
87 89
88 group("setup_runtime_deps") { 90 group("setup_runtime_deps") {
89 write_runtime_deps = setup_runtime_deps 91 write_runtime_deps = setup_runtime_deps_path
90 data_deps = [ 92 data_deps = [
91 "//chrome/installer/setup", 93 "//chrome/installer/setup",
92 ] 94 ]
93 } 95 }
94 96
97 group("setup_syzygy_runtime_deps") {
98 write_runtime_deps = setup_syzygy_runtime_deps_path
99 deps = [
100 ":setup_runtime_deps",
101 ]
102 data_deps = [
103 "//build/win/syzygy:copy_syzyasan_runtime_binaries",
104 ]
105 }
106
95 # Generates a mini installer. 107 # Generates a mini installer.
96 # 108 #
97 # out_dir (required) 109 # output_dir (required)
98 # The output directory out_dir where the mini_installer image should be 110 # The output directory where the mini_installer image should be
99 # written. 111 # written.
100 # 112 #
101 # chrome_dll_file (required) 113 # chrome_dll_file (required)
102 # The path to the version of chrome.dll that should be included in the 114 # The path to the version of chrome.dll that should be included in the
103 # installer archive. 115 # installer archive.
104 # 116 #
105 # chrome_dll_target (required) 117 # chrome_dll_target (required)
106 # The target that generated chrome_dll_file. 118 # The target that generated chrome_dll_file.
107 # 119 #
108 # deps (required) 120 # setup_exe_file (required)
121 # The path to the version of setup.exe that should be included in the
122 # installer archive.
123 #
124 # setup_exe_target (required)
125 # The target that generated setup_exe_file.
126 #
127 # deps
109 # Normal meaning. 128 # Normal meaning.
110 template("generate_mini_installer") { 129 template("generate_mini_installer") {
111 chrome_dll_file = invoker.chrome_dll_file 130 forward_variables_from(invoker,
112 chrome_dll_target = invoker.chrome_dll_target 131 [
113 output_dir = invoker.out_dir 132 "output_dir",
114 133 "chrome_dll_file",
134 "chrome_dll_target",
135 "setup_exe_file",
136 "setup_exe_target",
137 "setup_runtime_deps",
138 ])
115 packed_files_rc_file = "$target_gen_dir/$target_name/packed_files.rc" 139 packed_files_rc_file = "$target_gen_dir/$target_name/packed_files.rc"
116 archive_name = target_name + "_archive" 140 archive_name = target_name + "_archive"
117 staging_dir = "$target_gen_dir/$target_name" 141 staging_dir = "$target_gen_dir/$target_name"
118 142
119 action(archive_name) { 143 action(archive_name) {
144 forward_variables_from(invoker, [ "deps" ])
120 script = "//chrome/tools/build/win/create_installer_archive.py" 145 script = "//chrome/tools/build/win/create_installer_archive.py"
121 146
122 release_file = "chrome.release" 147 release_file = "chrome.release"
123 148
124 inputs = [ 149 inputs = [
125 "$chrome_dll_file", 150 "$chrome_dll_file",
151 "$setup_exe_file",
126 "$root_out_dir/chrome.exe", 152 "$root_out_dir/chrome.exe",
127 "$root_out_dir/locales/en-US.pak", 153 "$root_out_dir/locales/en-US.pak",
128 "$root_out_dir/setup.exe",
129 release_file, 154 release_file,
130 ] 155 ]
131 156
132 outputs = [ 157 outputs = [
133 # See also chrome.packed.7z conditionally added below. 158 # See also chrome.packed.7z conditionally added below.
134 "$output_dir/chrome.7z", 159 "$output_dir/chrome.7z",
135 "$output_dir/setup.ex_", 160 "$output_dir/setup.ex_",
136 packed_files_rc_file, 161 packed_files_rc_file,
137 ] 162 ]
138 args = [ 163 args = [
139 "--build_dir", 164 "--build_dir",
140 rebase_path(root_out_dir, root_build_dir), 165 rebase_path(root_out_dir, root_build_dir),
141 "--staging_dir", 166 "--staging_dir",
142 rebase_path(staging_dir, root_build_dir), 167 rebase_path(staging_dir, root_build_dir),
143 "--input_file", 168 "--input_file",
144 rebase_path(release_file, root_build_dir), 169 rebase_path(release_file, root_build_dir),
145 "--resource_file_path", 170 "--resource_file_path",
146 rebase_path(packed_files_rc_file, root_build_dir), 171 rebase_path(packed_files_rc_file, root_build_dir),
147 "--target_arch=$current_cpu", 172 "--target_arch=$current_cpu",
148 "--distribution=_google_chrome", 173 "--distribution=_google_chrome",
149 "--output_dir", 174 "--output_dir",
150 rebase_path(output_dir, root_build_dir), 175 rebase_path(output_dir, root_build_dir),
151 "--chrome_runtime_deps", 176 "--chrome_runtime_deps",
152 rebase_path(chrome_runtime_deps, root_build_dir), 177 rebase_path(chrome_runtime_deps_path, root_build_dir),
153 "--setup_runtime_deps", 178 "--setup_runtime_deps",
154 rebase_path(setup_runtime_deps, root_build_dir), 179 rebase_path(setup_runtime_deps, root_build_dir),
155 180
156 # Optional arguments to generate diff installer. 181 # Optional arguments to generate diff installer.
157 #'--last_chrome_installer=C:/Temp/base', 182 #'--last_chrome_installer=C:/Temp/base',
158 #'--setup_exe_format=DIFF', 183 #'--setup_exe_format=DIFF',
159 #'--diff_algorithm=COURGETTE', 184 #'--diff_algorithm=COURGETTE',
160 185
161 # Optional argument for verbose archiving output. 186 # Optional argument for verbose archiving output.
162 #'--verbose', 187 #'--verbose',
163 ] 188 ]
164 189
165 deps = [ 190 if (!defined(deps)) {
191 deps = []
192 }
193 deps += [
166 ":chrome_runtime_deps", 194 ":chrome_runtime_deps",
167 ":setup_runtime_deps",
168 "//chrome", 195 "//chrome",
169 "//chrome/browser/extensions/default_extensions", 196 "//chrome/browser/extensions/default_extensions",
170 "//chrome/installer/setup",
171 "//third_party/icu:icudata", 197 "//third_party/icu:icudata",
172 chrome_dll_target, 198 chrome_dll_target,
199 setup_exe_target,
173 ] 200 ]
174 201
175 if (enable_hidpi) { 202 if (enable_hidpi) {
176 args += [ "--enable_hidpi=1" ] 203 args += [ "--enable_hidpi=1" ]
177 } 204 }
178 if (is_component_build) { 205 if (is_component_build) {
179 args += [ "--component_build=1" ] 206 args += [ "--component_build=1" ]
180 } else { 207 } else {
181 outputs += [ "$output_dir/chrome.packed.7z" ] 208 outputs += [ "$output_dir/chrome.packed.7z" ]
182 } 209 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 ":$archive_name", 277 ":$archive_name",
251 ":lib", 278 ":lib",
252 ":version", 279 ":version",
253 "//build/config/sanitizers:deps", 280 "//build/config/sanitizers:deps",
254 "//build/win:default_exe_manifest", 281 "//build/win:default_exe_manifest",
255 ] 282 ]
256 } 283 }
257 } 284 }
258 285
259 generate_mini_installer("mini_installer") { 286 generate_mini_installer("mini_installer") {
260 out_dir = root_out_dir 287 output_dir = root_out_dir
261 chrome_dll_file = "$root_out_dir/chrome.dll" 288 chrome_dll_file = "$root_out_dir/chrome.dll"
262 chrome_dll_target = "//chrome:main_dll" 289 chrome_dll_target = "//chrome:main_dll"
290 setup_exe_file = "$root_out_dir/setup.exe"
291 setup_exe_target = "//chrome/installer/setup"
292 setup_runtime_deps = setup_runtime_deps_path
293 deps = [
294 ":setup_runtime_deps",
295 ]
263 } 296 }
264 297
265 if (is_syzyasan) { 298 if (is_syzyasan) {
266 generate_mini_installer("mini_installer_syzygy") { 299 generate_mini_installer("mini_installer_syzygy") {
267 out_dir = "$root_out_dir/syzygy/" 300 output_dir = "$root_out_dir/syzygy/"
268 chrome_dll_file = "$root_out_dir/syzygy/chrome.dll" 301 chrome_dll_file = "$root_out_dir/syzygy/chrome.dll"
269 chrome_dll_target = "//chrome/tools/build/win/syzygy:chrome_dll_syzygy" 302 chrome_dll_target = "//chrome/tools/build/win/syzygy:chrome_dll_syzygy"
303 setup_exe_file = "$root_out_dir/syzygy/setup.exe"
304 setup_exe_target = "//chrome/tools/build/win/syzygy:setup_syzygy"
305 setup_runtime_deps = setup_syzygy_runtime_deps_path
306 deps = [
307 ":setup_syzygy_runtime_deps",
308 ]
270 } 309 }
271 } 310 }
272 311
273 # next_version_mini_installer.exe can't be generated in an x86 Debug component 312 # next_version_mini_installer.exe can't be generated in an x86 Debug component
274 # build because it requires too much memory. 313 # build because it requires too much memory.
275 if (!(is_component_build && is_debug && target_cpu == "x86")) { 314 if (!(is_component_build && is_debug && target_cpu == "x86")) {
276 action("next_version_mini_installer") { 315 action("next_version_mini_installer") {
277 script = "generate_next_version_mini_installer.py" 316 script = "generate_next_version_mini_installer.py"
278 testonly = true 317 testonly = true
279 inputs = [ 318 inputs = [
280 "$root_out_dir/alternate_version_generator.exe", 319 "$root_out_dir/alternate_version_generator.exe",
281 "$root_out_dir/mini_installer.exe", 320 "$root_out_dir/mini_installer.exe",
282 ] 321 ]
283 outputs = [ 322 outputs = [
284 "$root_out_dir/$target_name.exe", 323 "$root_out_dir/$target_name.exe",
285 ] 324 ]
286 args = [ 325 args = [
287 "--out", 326 "--out",
288 "$target_name.exe", 327 "$target_name.exe",
289 ] 328 ]
290 deps = [ 329 deps = [
291 ":mini_installer", 330 ":mini_installer",
292 "//chrome/installer/test:alternate_version_generator", 331 "//chrome/installer/test:alternate_version_generator",
293 ] 332 ]
294 } 333 }
295 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698