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