Commit 9bd54160 authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Chromium LUCI CQ

Simplify the logic in the mini_installer BUILD.gn file

A lot of the logic in this file dates from the Syzygy days, as we don't
use it anymore there's no need to template the target that generates the
installer.

Change-Id: I810e059b6eb733324096389dca53853f080c672d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613328
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841558}
parent ff74cf9d
...@@ -111,38 +111,16 @@ group("setup_runtime_deps") { ...@@ -111,38 +111,16 @@ group("setup_runtime_deps") {
data_deps = [ "//chrome/installer/setup" ] data_deps = [ "//chrome/installer/setup" ]
} }
# Generates a mini installer. packed_files_rc_file = "$target_gen_dir/mini_installer/packed_files.rc"
#
# out_dir (required) # TODO(crbug.com/1112471): Get this to run cleanly under Python 3.
# The output directory out_dir where the mini_installer image should be python2_action("mini_installer_archive") {
# written.
#
# chrome_dll_file (required)
# The path to the version of chrome.dll that should be included in the
# installer archive.
#
# chrome_dll_target (required)
# The target that generated chrome_dll_file.
#
# deps (required)
# Normal meaning.
template("generate_mini_installer") {
chrome_dll_file = invoker.chrome_dll_file
chrome_dll_target = invoker.chrome_dll_target
output_dir = invoker.out_dir
packed_files_rc_file = "$target_gen_dir/$target_name/packed_files.rc"
archive_name = target_name + "_archive"
staging_dir = "$target_gen_dir/$target_name"
# TODO(crbug.com/1112471): Get this to run cleanly under Python 3.
python2_action(archive_name) {
script = "//chrome/tools/build/win/create_installer_archive.py" script = "//chrome/tools/build/win/create_installer_archive.py"
release_file = "chrome.release" release_file = "chrome.release"
inputs = [ inputs = [
"$chrome_dll_file", "$root_out_dir/chrome.dll",
"$root_out_dir/chrome.exe", "$root_out_dir/chrome.exe",
"$root_out_dir/locales/en-US.pak", "$root_out_dir/locales/en-US.pak",
"$root_out_dir/setup.exe", "$root_out_dir/setup.exe",
...@@ -152,15 +130,15 @@ template("generate_mini_installer") { ...@@ -152,15 +130,15 @@ template("generate_mini_installer") {
outputs = [ outputs = [
# See also chrome.packed.7z conditionally added below. # See also chrome.packed.7z conditionally added below.
"$output_dir/chrome.7z", "$root_out_dir/chrome.7z",
"$output_dir/setup.ex_", "$root_out_dir/setup.ex_",
packed_files_rc_file, packed_files_rc_file,
] ]
args = [ args = [
"--build_dir", "--build_dir",
rebase_path(root_out_dir, root_build_dir), rebase_path(root_out_dir, root_build_dir),
"--staging_dir", "--staging_dir",
rebase_path(staging_dir, root_build_dir), rebase_path("$target_gen_dir/mini_installer", root_build_dir),
"--input_file", "--input_file",
rebase_path(release_file, root_build_dir), rebase_path(release_file, root_build_dir),
"--resource_file_path", "--resource_file_path",
...@@ -168,7 +146,7 @@ template("generate_mini_installer") { ...@@ -168,7 +146,7 @@ template("generate_mini_installer") {
"--target_arch=$current_cpu", "--target_arch=$current_cpu",
"--distribution=_${branding_path_component}", "--distribution=_${branding_path_component}",
"--output_dir", "--output_dir",
rebase_path(output_dir, root_build_dir), rebase_path(root_out_dir, root_build_dir),
"--chrome_runtime_deps", "--chrome_runtime_deps",
rebase_path(chrome_runtime_deps, root_build_dir), rebase_path(chrome_runtime_deps, root_build_dir),
"--setup_runtime_deps", "--setup_runtime_deps",
...@@ -187,12 +165,12 @@ template("generate_mini_installer") { ...@@ -187,12 +165,12 @@ template("generate_mini_installer") {
":chrome_runtime_deps", ":chrome_runtime_deps",
":setup_runtime_deps", ":setup_runtime_deps",
"//chrome", "//chrome",
"//chrome:chrome_dll",
"//chrome/browser/extensions/default_extensions", "//chrome/browser/extensions/default_extensions",
"//chrome/common/win:eventlog_provider", "//chrome/common/win:eventlog_provider",
"//chrome/installer/setup", "//chrome/installer/setup",
"//mojo/core:shared_library", "//mojo/core:shared_library",
"//third_party/icu:icudata", "//third_party/icu:icudata",
chrome_dll_target,
] ]
if (enable_hidpi) { if (enable_hidpi) {
...@@ -209,7 +187,7 @@ template("generate_mini_installer") { ...@@ -209,7 +187,7 @@ template("generate_mini_installer") {
if (skip_archive_compression) { if (skip_archive_compression) {
args += [ "--skip_archive_compression" ] args += [ "--skip_archive_compression" ]
} else { } else {
outputs += [ "$output_dir/chrome.packed.7z" ] outputs += [ "$root_out_dir/chrome.packed.7z" ]
} }
if (enable_nacl) { if (enable_nacl) {
...@@ -246,10 +224,9 @@ template("generate_mini_installer") { ...@@ -246,10 +224,9 @@ template("generate_mini_installer") {
"--depfile", "--depfile",
rebase_path(depfile, root_build_dir), rebase_path(depfile, root_build_dir),
] ]
} }
executable(target_name) { executable("mini_installer") {
output_name = "mini_installer"
sources = [ sources = [
"mini_installer_exe_main.cc", "mini_installer_exe_main.cc",
packed_files_rc_file, packed_files_rc_file,
...@@ -279,8 +256,8 @@ template("generate_mini_installer") { ...@@ -279,8 +256,8 @@ template("generate_mini_installer") {
libs = [ "setupapi.lib" ] libs = [ "setupapi.lib" ]
deps = [ deps = [
":$archive_name",
":lib", ":lib",
":mini_installer_archive",
":version", ":version",
"//base:clang_profiling_buildflags", "//base:clang_profiling_buildflags",
"//build/win:default_exe_manifest", "//build/win:default_exe_manifest",
...@@ -304,13 +281,6 @@ template("generate_mini_installer") { ...@@ -304,13 +281,6 @@ template("generate_mini_installer") {
no_default_deps = true no_default_deps = true
ldflags += [ "/ENTRY:MainEntryPoint" ] ldflags += [ "/ENTRY:MainEntryPoint" ]
} }
}
}
generate_mini_installer("mini_installer") {
out_dir = root_out_dir
chrome_dll_file = "$root_out_dir/chrome.dll"
chrome_dll_target = "//chrome:chrome_dll"
} }
# previous_version_mini_installer.exe can't be generated in an x86 Debug # previous_version_mini_installer.exe can't be generated in an x86 Debug
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment