Skip to content

Commit

Permalink
Make Windows silent installer truly silent (#8364)
Browse files Browse the repository at this point in the history
Before this commit, there were two silent installers: a 1 MB online
"stub" installer and a standalone installer. Both opened a Brave window,
so were not truly silent. To fix this, the online installer was removed
entirely. And the standalone installer was updated to be built from a
new version of the Omaha update framework, which passes the flag
`--do-not-launch-chrome` to Brave's installer.
  • Loading branch information
mherrmann authored Apr 13, 2021
1 parent 66362d2 commit 2f6f020
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ deps = {
"vendor/requests": "https://github.com/kennethreitz/requests@e4d59bedfd3c7f4f254f4f5d036587bcd8152458",
"vendor/boto": "https://github.com/boto/boto@f7574aa6cc2c819430c1f05e9a1a1a666ef8169b",
"vendor/python-patch": "https://github.com/brave/python-patch@d8880110be6554686bc08261766538c2926d4e82",
"vendor/omaha": "https://github.com/brave/omaha.git@cd2499ce23b2f8c532e1c504adf41d3e946780d2",
"vendor/omaha": "https://github.com/brave/omaha.git@f1407b11524f110d87fdb7496e153724a9f8d9e4",
"vendor/sparkle": "https://github.com/brave/Sparkle.git@07933da3e178265d0f0ba86e02bbde38e701a04d",
"vendor/bat-native-rapidjson": "https://github.com/brave-intl/bat-native-rapidjson.git@86aafe2ef89835ae71c9ed7c2527e3bb3000930e",
"vendor/bip39wally-core-native": "https://github.com/brave-intl/bip39wally-core-native.git@f5676241d4fdb01807708f0ac67b809d739905bd",
Expand Down
30 changes: 20 additions & 10 deletions build/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ if (brave_exe == "") {
brave_dist_dir = "$root_out_dir/dist"
if (is_win) {
brave_exe = "$brave_exe.exe"
brave_underline_full_version = "_$chrome_version_major" + "_$brave_version_major" + "_$brave_version_minor" + "_$brave_version_build"
brave_underline_full_version =
"_$chrome_version_major" + "_$brave_version_major" +
"_$brave_version_minor" + "_$brave_version_build"
_channel = ""
brave_app_guid = "{AFE6A462-C574-4B8A-AF43-4CC60DF4563B}"
if (is_official_build) {
Expand All @@ -73,12 +75,18 @@ if (is_win) {
_arch = "32"
}
brave_installer_exe = "brave_installer$brave_underline_full_version.exe"
brave_stub_installer_exe = "BraveBrowser$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_silent_stub_installer_exe = "BraveBrowserSilent$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_untagged_stub_installer_exe = "BraveBrowserUntagged$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_standalone_installer_exe = "BraveBrowserStandalone$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_silent_installer_exe = "BraveBrowserStandaloneSilent$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_untagged_installer_exe = "BraveBrowserStandaloneUntagged$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_stub_installer_exe =
"BraveBrowser$_channel" + "Setup$_arch$brave_underline_full_version.exe"
brave_untagged_stub_installer_exe =
"BraveBrowserUntagged$_channel" +
"Setup$_arch$brave_underline_full_version.exe"
brave_standalone_installer_exe =
"BraveBrowserStandalone$_channel" +
"Setup$_arch$brave_underline_full_version.exe"
brave_silent_installer_exe = "BraveBrowserStandaloneSilent$_channel" +
"Setup$_arch$brave_underline_full_version.exe"
brave_untagged_installer_exe = "BraveBrowserStandaloneUntagged$_channel" +
"Setup$_arch$brave_underline_full_version.exe"
} else if (is_mac) {
brave_exe = "$chrome_product_full_name.app"
brave_dmg = "$chrome_product_full_name.dmg"
Expand All @@ -99,10 +107,12 @@ if (is_win) {
} else {
brave_product_dir_name_suffix = "-Development"
}
brave_product_dir_name = "BraveSoftware/Brave-Browser$brave_product_dir_name_suffix"
brave_product_dir_name =
"BraveSoftware/Brave-Browser$brave_product_dir_name_suffix"

if (base_sparkle_update_url == "") {
base_sparkle_update_url = "https://updates.bravesoftware.com/sparkle/Brave-Browser"
base_sparkle_update_url =
"https://updates.bravesoftware.com/sparkle/Brave-Browser"
}
_update_channel = brave_channel
if (_update_channel == "") {
Expand Down Expand Up @@ -130,7 +140,7 @@ if (is_android) {
assert(target_cpu != "arm64" && target_cpu != "x64")
brave_apk_output += "Modern"
} else if (target_cpu == "arm64" || target_cpu == "x64" ||
target_apk_base == "mono") {
target_apk_base == "mono") {
brave_apk_output += "Mono"
}

Expand Down
12 changes: 0 additions & 12 deletions script/test/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ def test_only_returns_nightly_win_x64_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-x64.exe',
'BraveBrowserNightlySetup.exe',
'BraveBrowserSilentNightlySetup.exe',
'BraveBrowserStandaloneNightlySetup.exe',
'BraveBrowserStandaloneSilentNightlySetup.exe',
'BraveBrowserStandaloneUntaggedNightlySetup.exe',
Expand All @@ -255,7 +254,6 @@ def test_only_returns_nightly_win_ia32_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserNightlySetup32.exe',
'BraveBrowserSilentNightlySetup32.exe',
'BraveBrowserStandaloneNightlySetup32.exe',
'BraveBrowserStandaloneSilentNightlySetup32.exe',
'BraveBrowserStandaloneUntaggedNightlySetup32.exe',
Expand All @@ -268,7 +266,6 @@ def test_only_returns_nightly_win_x86_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserNightlySetup32.exe',
'BraveBrowserSilentNightlySetup32.exe',
'BraveBrowserStandaloneNightlySetup32.exe',
'BraveBrowserStandaloneSilentNightlySetup32.exe',
'BraveBrowserStandaloneUntaggedNightlySetup32.exe',
Expand All @@ -281,7 +278,6 @@ def test_only_returns_dev_win_x64_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-x64.exe',
'BraveBrowserDevSetup.exe',
'BraveBrowserSilentDevSetup.exe',
'BraveBrowserStandaloneDevSetup.exe',
'BraveBrowserStandaloneSilentDevSetup.exe',
'BraveBrowserStandaloneUntaggedDevSetup.exe',
Expand All @@ -294,7 +290,6 @@ def test_only_returns_dev_win_ia32_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserDevSetup32.exe',
'BraveBrowserSilentDevSetup32.exe',
'BraveBrowserStandaloneDevSetup32.exe',
'BraveBrowserStandaloneSilentDevSetup32.exe',
'BraveBrowserStandaloneUntaggedDevSetup32.exe',
Expand All @@ -307,7 +302,6 @@ def test_only_returns_dev_win_x86_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserDevSetup32.exe',
'BraveBrowserSilentDevSetup32.exe',
'BraveBrowserStandaloneDevSetup32.exe',
'BraveBrowserStandaloneSilentDevSetup32.exe',
'BraveBrowserStandaloneUntaggedDevSetup32.exe',
Expand All @@ -321,7 +315,6 @@ def test_only_returns_beta_win_x64_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-x64.exe',
'BraveBrowserBetaSetup.exe',
'BraveBrowserSilentBetaSetup.exe',
'BraveBrowserStandaloneBetaSetup.exe',
'BraveBrowserStandaloneSilentBetaSetup.exe',
'BraveBrowserStandaloneUntaggedBetaSetup.exe',
Expand All @@ -335,7 +328,6 @@ def test_only_returns_beta_win_ia32_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserBetaSetup32.exe',
'BraveBrowserSilentBetaSetup32.exe',
'BraveBrowserStandaloneBetaSetup32.exe',
'BraveBrowserStandaloneSilentBetaSetup32.exe',
'BraveBrowserStandaloneUntaggedBetaSetup32.exe',
Expand All @@ -349,7 +341,6 @@ def test_only_returns_beta_win_x86_packages(self):
self.assertEquals(
pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserBetaSetup32.exe',
'BraveBrowserSilentBetaSetup32.exe',
'BraveBrowserStandaloneBetaSetup32.exe',
'BraveBrowserStandaloneSilentBetaSetup32.exe',
'BraveBrowserStandaloneUntaggedBetaSetup32.exe',
Expand All @@ -362,7 +353,6 @@ def test_only_returns_release_win_x64_packages(self):
'release', '1.5.8', 'win32'))
self.assertEquals(pkgs, sorted(['brave_installer-x64.exe',
'BraveBrowserSetup.exe',
'BraveBrowserSilentSetup.exe',
'BraveBrowserStandaloneSetup.exe',
'BraveBrowserStandaloneSilentSetup.exe',
'BraveBrowserStandaloneUntaggedSetup.exe',
Expand All @@ -375,7 +365,6 @@ def test_only_returns_release_win_ia32_packages(self):
'release', '1.5.8', 'win32', 'ia32'))
self.assertEquals(pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserSetup32.exe',
'BraveBrowserSilentSetup32.exe',
'BraveBrowserStandaloneSetup32.exe',
'BraveBrowserStandaloneSilentSetup32.exe',
'BraveBrowserStandaloneUntaggedSetup32.exe',
Expand All @@ -388,7 +377,6 @@ def test_only_returns_release_win_x86_packages(self):
'release', '1.5.8', 'win32', 'x86'))
self.assertEquals(pkgs, sorted(['brave_installer-ia32.exe',
'BraveBrowserSetup32.exe',
'BraveBrowserSilentSetup32.exe',
'BraveBrowserStandaloneSetup32.exe',
'BraveBrowserStandaloneSilentSetup32.exe',
'BraveBrowserStandaloneUntaggedSetup32.exe',
Expand Down
4 changes: 0 additions & 4 deletions script/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def filecopy(file_path, file_desired):
arch = '32' if (target_arch == 'ia32') else ''
channel_arch_extension = channel_capitalized + 'Setup' + arch + '.exe'
file_stub = 'BraveBrowser' + channel_arch_extension
file_stub_silent = 'BraveBrowserSilent' + channel_arch_extension
file_stub_untagged = 'BraveBrowserUntagged' + channel_arch_extension
file_stn = 'BraveBrowserStandalone' + channel_arch_extension
file_stn_silent = 'BraveBrowserStandaloneSilent' + channel_arch_extension
Expand All @@ -209,9 +208,6 @@ def filecopy(file_path, file_desired):
if re.match(r'BraveBrowser' + channel_capitalized + r'Setup' + arch + r'_.*\.exe', file):
filecopy(file_path, file_stub)
pkgs.append(file_stub)
elif re.match(r'BraveBrowserSilent' + channel_capitalized + r'Setup' + arch + r'_.*\.exe', file):
filecopy(file_path, file_stub_silent)
pkgs.append(file_stub_silent)
elif re.match(r'BraveBrowserUntagged' + channel_capitalized + r'Setup' + arch + r'_.*\.exe', file):
filecopy(file_path, file_stub_untagged)
pkgs.append(file_stub_untagged)
Expand Down

0 comments on commit 2f6f020

Please sign in to comment.