Only copy the Elevation Service executable for Google Chrome builds.
BUG=180589,833687
Change-Id: I4af08c2124ea8857f2ad860c268913b87297da7a
Reviewed-on: https://chromium-review.googlesource.com/c/1373131
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: S. Ganesh <ganesh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616386}
diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn
index fc89ee2..8d19c74 100644
--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -156,7 +156,7 @@
"--resource_file_path",
rebase_path(packed_files_rc_file, root_build_dir),
"--target_arch=$current_cpu",
- "--distribution=_google_chrome",
+ "--distribution=_${branding_path_component}",
"--output_dir",
rebase_path(output_dir, root_build_dir),
"--chrome_runtime_deps",
diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release
index b236b68..3edd3c20 100644
--- a/chrome/installer/mini_installer/chrome.release
+++ b/chrome/installer/mini_installer/chrome.release
@@ -24,7 +24,6 @@
chrome_elf.dll: %(VersionDir)s\
chrome_watcher.dll: %(VersionDir)s\
d3dcompiler_47.dll: %(VersionDir)s\
-elevation_service.exe: %(VersionDir)s\
eventlog_provider.dll: %(VersionDir)s\
ffmpeg.dll: %(VersionDir)s\
icudt.dll: %(VersionDir)s\
@@ -74,6 +73,9 @@
[TOUCH]
[GOOGLE_CHROME]
+# The elevation service is only installed for Google Chrome builds.
+elevation_service.exe: %(VersionDir)s\
+
#
# Widevine CDM sub-dir
#
diff --git a/chrome/test/mini_installer/config/chrome_multi_system_installed.prop b/chrome/test/mini_installer/config/chrome_multi_system_installed.prop
index 093a92f..b945781 100644
--- a/chrome/test/mini_installer/config/chrome_multi_system_installed.prop
+++ b/chrome/test/mini_installer/config/chrome_multi_system_installed.prop
@@ -7,6 +7,14 @@
{"exists": true},
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\chrome_elf.dll":
{"exists": true},
+ "$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\elevation_service.exe": {
+ "condition": "'$CHROME_SHORT_NAME' == 'Chrome'",
+ "exists": true
+ },
+ "$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\elevation_service.exe": {
+ "condition": "'$CHROME_SHORT_NAME' != 'Chrome'",
+ "exists": false
+ },
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\Installer\\chrome.7z":
{"exists": true},
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\Installer\\setup.exe":
diff --git a/chrome/test/mini_installer/config/chrome_system_installed.prop b/chrome/test/mini_installer/config/chrome_system_installed.prop
index 6260f07..235d383f 100644
--- a/chrome/test/mini_installer/config/chrome_system_installed.prop
+++ b/chrome/test/mini_installer/config/chrome_system_installed.prop
@@ -7,6 +7,14 @@
{"exists": true},
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$MINI_INSTALLER_FILE_VERSION\\chrome_elf.dll":
{"exists": true},
+ "$PROGRAM_FILES\\$CHROME_DIR\\Application\\$MINI_INSTALLER_FILE_VERSION\\elevation_service.exe": {
+ "condition": "'$CHROME_SHORT_NAME' == 'Chrome'",
+ "exists": true
+ },
+ "$PROGRAM_FILES\\$CHROME_DIR\\Application\\$MINI_INSTALLER_FILE_VERSION\\elevation_service.exe": {
+ "condition": "'$CHROME_SHORT_NAME' != 'Chrome'",
+ "exists": false
+ },
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$MINI_INSTALLER_FILE_VERSION\\Installer\\chrome.7z":
{"exists": true},
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$MINI_INSTALLER_FILE_VERSION\\Installer\\setup.exe":
diff --git a/chrome/test/mini_installer/config/previous_chrome_system_installed.prop b/chrome/test/mini_installer/config/previous_chrome_system_installed.prop
index affe252..51728b5f 100644
--- a/chrome/test/mini_installer/config/previous_chrome_system_installed.prop
+++ b/chrome/test/mini_installer/config/previous_chrome_system_installed.prop
@@ -7,6 +7,14 @@
{"exists": true},
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\chrome_elf.dll":
{"exists": true},
+ "$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\elevation_service.exe": {
+ "condition": "'$CHROME_SHORT_NAME' == 'Chrome'",
+ "exists": true
+ },
+ "$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\elevation_service.exe": {
+ "condition": "'$CHROME_SHORT_NAME' != 'Chrome'",
+ "exists": false
+ },
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\Installer\\chrome.7z":
{"exists": true},
"$PROGRAM_FILES\\$CHROME_DIR\\Application\\$PREVIOUS_VERSION_MINI_INSTALLER_FILE_VERSION\\Installer\\setup.exe":
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py
index 0e12f2a1..5162a926 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -104,8 +104,11 @@
if distribution:
if len(distribution) > 1 and distribution[0] == '_':
distribution = distribution[1:]
- CopySectionFilesToStagingDir(config, distribution.upper(),
- staging_dir, build_dir)
+
+ distribution = distribution.upper()
+ if config.has_section(distribution):
+ CopySectionFilesToStagingDir(config, distribution,
+ staging_dir, build_dir)
if enable_hidpi == '1':
CopySectionFilesToStagingDir(config, 'HIDPI', staging_dir, build_dir)