From 4d7c64e6b9a1dbcd1157946eb5e5e961c8743672 Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Fri, 28 Apr 2023 18:17:47 -0500 Subject: [PATCH] add welcome page --- infra/initial_preferences | 3 +++ setup.sh | 3 +++ src/chrome/installer/linux/common/installer.include | 3 ++- src/chrome/installer/mini_installer/chrome.release | 4 +++- src/third_party/blink/common/features.cc | 5 ----- 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 infra/initial_preferences diff --git a/infra/initial_preferences b/infra/initial_preferences new file mode 100644 index 00000000..f1744de3 --- /dev/null +++ b/infra/initial_preferences @@ -0,0 +1,3 @@ +{ + "first_run_tabs": [ "https://thorium.rocks/welcome/" ] +} diff --git a/setup.sh b/setup.sh index 17737ceb..0c597097 100755 --- a/setup.sh +++ b/setup.sh @@ -74,6 +74,9 @@ cp -r -v pak_src/bin/pak-win/. $HOME/chromium/src/out/thorium/ && mkdir -v -p $HOME/chromium/src/out/thorium/default_apps && cp -r -v infra/default_apps/. $HOME/chromium/src/out/thorium/default_apps/ && +# Add initial preferences file to open Thorium welcome page on first run. +cp -v infra/initial_preferences $HOME/chromium/src/out/thorium/ && + echo " # Workaround for DevTools" && mkdir -v -p $HOME/chromium/src/out/thorium/gen/third_party/devtools-frontend/src/front_end/Images/ && cp -r -v src/third_party/devtools-frontend/src/front_end/Images/src/chromeSelectDark.svg $HOME/chromium/src/out/thorium/gen/third_party/devtools-frontend/src/front_end/Images/ && diff --git a/src/chrome/installer/linux/common/installer.include b/src/chrome/installer/linux/common/installer.include index e367386f..627c4ab8 100644 --- a/src/chrome/installer/linux/common/installer.include +++ b/src/chrome/installer/linux/common/installer.include @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Alex313031 +# Copyright (c) 2023 Alex313031 and Iridium # Shows the output of a given command only on failure, or when VERBOSE is set. log_cmd() { if [ "${VERBOSE:-}" ]; then @@ -180,6 +180,7 @@ stage_install_common() { install -m 755 "${OUTPUTDIR}/thorium-shell" "${STAGEDIR}/usr/bin/" install -m 755 "${OUTPUTDIR}/chromedriver" "${STAGEDIR}/${INSTALLDIR}/" install -m 755 "${OUTPUTDIR}/pak" "${STAGEDIR}/usr/bin/" + install -m 644 "${OUTPUTDIR}/initial_preferences" "${STAGEDIR}/${INSTALLDIR}/" else install -m 644 "${OUTPUTDIR}/theme_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/" install -m 644 "${OUTPUTDIR}/ui_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/" diff --git a/src/chrome/installer/mini_installer/chrome.release b/src/chrome/installer/mini_installer/chrome.release index 8583988c..e45ccaac 100644 --- a/src/chrome/installer/mini_installer/chrome.release +++ b/src/chrome/installer/mini_installer/chrome.release @@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors and Alex313031 and gz83 +# Copyright 2023 The Chromium Authors, Alex313031, and gz83 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -8,6 +8,8 @@ # thorium.exe: %(ChromeDir)s\ chrome_proxy.exe: %(ChromeDir)s\ +# initial_preferences file, to show Thorium welcome page on first start +initial_preferences %(ChromeDir)s\ # # Chrome version dir assembly manifest. # The name of this file must match the name of the version dir, so we cannot diff --git a/src/third_party/blink/common/features.cc b/src/third_party/blink/common/features.cc index 2f317715..ccd46a53 100644 --- a/src/third_party/blink/common/features.cc +++ b/src/third_party/blink/common/features.cc @@ -1775,11 +1775,6 @@ BASE_FEATURE(kQuoteEmptySecChUaStringHeadersConsistently, "QuoteEmptySecChUaStringHeadersConsistently", base::FEATURE_ENABLED_BY_DEFAULT); -BASE_FEATURE(kStorageAccessAPI, - "StorageAccessAPI", - base::FEATURE_ENABLED_BY_DEFAULT -); - const base::FeatureParam kStorageAccessAPIImplicitGrantLimit{ &kStorageAccessAPI, "storage-access-api-implicit-grant-limit", 5}; const base::FeatureParam kStorageAccessAPIAutoGrantInFPS{