diff --git a/aliases b/aliases.txt
similarity index 84%
rename from aliases
rename to aliases.txt
index 793a5318..06a12a83 100755
--- a/aliases
+++ b/aliases.txt
@@ -1,28 +1,11 @@
-export NINJA_SUMMARIZE_BUILD=1
-export NINJA_STATUS="[%r processes, %f/%t @ %o/s | %e sec. ] "
-
-export EDITOR=nano
-
-export VISUAL=nano
-
alias origin='git checkout -f origin/main'
-
alias gfetch='git fetch --tags'
-
alias rebase='git rebase-update'
-
alias gsync='gclient sync --with_branch_heads --with_tags -f -R -D'
-
alias gnls='gn ls out/thorium'
-
alias show='git show-ref'
-
alias runhooks='gclient runhooks'
-
alias pgo='python3 tools/update_pgo_profiles.py --target=linux update --gs-url-base=chromium-optimization-profiles/pgo_profiles'
-
alias pgow='python3 tools/update_pgo_profiles.py --target=win64 update --gs-url-base=chromium-optimization-profiles/pgo_profiles'
-
alias pgom='python3 tools/update_pgo_profiles.py --target=mac update --gs-url-base=chromium-optimization-profiles/pgo_profiles'
-
alias pgomac-arm='python3 tools/update_pgo_profiles.py --target=mac-arm update --gs-url-base=chromium-optimization-profiles/pgo_profiles'
diff --git a/build_mac.sh b/build_mac.sh
index 10cee521..48e40459 100755
--- a/build_mac.sh
+++ b/build_mac.sh
@@ -35,6 +35,7 @@ buildShell () {
# Build Thorium
export NINJA_SUMMARIZE_BUILD=1 &&
+ export NINJA_STATUS="[%r processes, %f/%t @ %o/s | %e sec. ] " &&
cd ${CR_SRC_DIR} &&
autoninja -C out/thorium thorium chromedriver thorium_shell policy_templates -j$@ &&
diff --git a/other/ftp-support-thorium.patch b/other/ftp-support-thorium.patch
index 3d7dfd97..45b17153 100644
--- a/other/ftp-support-thorium.patch
+++ b/other/ftp-support-thorium.patch
@@ -40,7 +40,7 @@ index ceabbced0f67e..c298005d46bc3 100644
Date Modified
+
-+ Oh, no! This server is sending data $1Google Chrome can't understand. Please <a href="http://code.google.com/p/chromium/issues/entry">report a bug</a></a>, and include the <a href="LOCATION">raw listing</a>.
++ Oh, no! This server is sending data $1Thorium can't understand. Please <a href="https://issues.chromium.org/issues/new">report a bug</a></a>, and include the <a href="LOCATION">raw listing</a>.
+
diff --git a/setup.sh b/setup.sh
index 6efda0d9..d8221592 100755
--- a/setup.sh
+++ b/setup.sh
@@ -84,10 +84,11 @@ cp -r -v thorium_shell/. ${CR_SRC_DIR}/out/thorium/ &&
cp -r -v pak_src/binaries/pak ${CR_SRC_DIR}/out/thorium/ &&
cp -r -v pak_src/binaries/pak-win/. ${CR_SRC_DIR}/out/thorium/ &&
-patchFFMPEG () {
+patchThor () {
cp -v other/add-hevc-ffmpeg-decoder-parser.patch ${CR_SRC_DIR}/third_party/ffmpeg/ &&
cp -v other/fix-policy-templates.patch ${CR_SRC_DIR}/ &&
cp -v other/ftp-support-thorium.patch ${CR_SRC_DIR}/ &&
+ cp -v other/thorium-2024-ui.patch ${CR_SRC_DIR}/ &&
printf "\n" &&
printf "${YEL}Patching FFMPEG for HEVC...${c0}\n" &&
@@ -102,9 +103,24 @@ patchFFMPEG () {
printf "\n" &&
printf "${YEL}Patching FTP support...${c0}\n" &&
cd ${CR_SRC_DIR} &&
- git apply --reject ./ftp-support-thorium.patch
+ git apply --reject ./ftp-support-thorium.patch &&
+
+ printf "\n" &&
+ printf "${YEL}Patching for Thorium 2024 UI...${c0}\n" &&
+ cd ${CR_SRC_DIR} &&
+ git apply --reject ./thorium-2024-ui.patch
+}
+[ -f ${CR_SRC_DIR}/third_party/ffmpeg/add-hevc-ffmpeg-decoder-parser.patch ] || patchThor;
+
+patchAC3 () {
+ cp -v other/ffmpeg_hevc_ac3.patch ${CR_SRC_DIR}/third_party/ffmpeg/ &&
+
+ printf "\n" &&
+ printf "${YEL}Patching FFMPEG for AC3 & E-AC3...${c0}\n" &&
+ cd ${CR_SRC_DIR}/third_party/ffmpeg &&
+ git apply --reject ./ffmpeg_hevc_ac3.patch &&
+ cd ~/thorium
}
-[ -f ${CR_SRC_DIR}/third_party/ffmpeg/add-hevc-ffmpeg-decoder-parser.patch ] || patchFFMPEG;
cd ~/thorium &&
@@ -174,6 +190,7 @@ copyAVX512 () {
cp -r -v other/AVX512/third_party/* ${CR_SRC_DIR}/third_party/ &&
cp -v other/AVX512/thor_ver ${CR_SRC_DIR}/out/thorium/ &&
cp -v infra/thor_ver_linux/wrapper-avx512 ${CR_SRC_DIR}/chrome/installer/linux/common/wrapper &&
+ [ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
printf "\n"
}
case $1 in
@@ -188,6 +205,7 @@ copyAVX2 () {
cp -r -v other/AVX2/third_party/* ${CR_SRC_DIR}/third_party/ &&
cp -v other/AVX2/thor_ver ${CR_SRC_DIR}/out/thorium/ &&
cp -v infra/thor_ver_linux/wrapper-avx2 ${CR_SRC_DIR}/chrome/installer/linux/common/wrapper &&
+ [ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
printf "\n"
}
case $1 in
@@ -201,6 +219,7 @@ copySSE4 () {
cp -r -v other/SSE4.1/build/config/* ${CR_SRC_DIR}/build/config/ &&
cp -v other/SSE4.1/thor_ver ${CR_SRC_DIR}/out/thorium/ &&
cp -v infra/thor_ver_linux/wrapper-sse4 ${CR_SRC_DIR}/chrome/installer/linux/common/wrapper &&
+ [ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
printf "\n"
}
case $1 in
@@ -214,6 +233,7 @@ copySSE3 () {
cp -r -v other/SSE3/build/config/* ${CR_SRC_DIR}/build/config/ &&
cp -v other/SSE3/thor_ver ${CR_SRC_DIR}/out/thorium/ &&
cp -v infra/thor_ver_linux/wrapper-sse3 ${CR_SRC_DIR}/chrome/installer/linux/common/wrapper &&
+ [ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
printf "\n"
}
case $1 in
@@ -227,6 +247,7 @@ copySSE2 () {
cp -r -v other/SSE2/build/config/* ${CR_SRC_DIR}/build/config/ &&
cp -v other/SSE2/thor_ver ${CR_SRC_DIR}/out/thorium/ &&
cp -v infra/thor_ver_linux/wrapper-sse2 ${CR_SRC_DIR}/chrome/installer/linux/common/wrapper &&
+ [ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
printf "\n"
}
case $1 in
@@ -275,6 +296,7 @@ copyCros () {
printf "\n" &&
printf "${YEL}Copying ChromiumOS build files...${c0}\n" &&
cp -r -v other/CrOS/* ${CR_SRC_DIR}/ &&
+ [ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
printf "\n"
}
case $1 in
@@ -282,37 +304,38 @@ case $1 in
esac
cd ${CR_SRC_DIR} &&
+printf "${YEL}Workaround for Ask.com favicon ▾${c0}\n" &&
python3 ./tools/search_engine_choice/download_search_engine_icons.py &&
cd ~/thorium &&
-printf "${GRE}Done!\n" &&
printf "\n" &&
+printf "${GRE}Done!${c0}\n" &&
-printf "${YEL}Exporting variables and setting handy aliases...${c0}\n" &&
+#. ~/thorium/aliases.txt &&
-. ~/thorium/aliases &&
+#printf "\n" &&
+#printf "export ${CYA}NINJA_SUMMARIZE_BUILD=1${c0}\n" &&
+#printf "export ${CYA}EDITOR=nano${c0}\n" &&
+#printf "export ${CYA}VISUAL=nano${c0}\n" &&
+#printf "\n" &&
+#printf "alias ${YEL}origin${c0} = ${CYA}git checkout -f origin/main${c0}\n" &&
+#printf "alias ${YEL}gfetch${c0} = ${CYA}git fetch --tags${c0}\n" &&
+#printf "alias ${YEL}rebase${c0} = ${CYA}git rebase-update${c0}\n" &&
+#printf "alias ${YEL}gsync${c0} = ${CYA}gclient sync --with_branch_heads --with_tags -f -R -D${c0}\n" &&
+#printf "alias ${YEL}args${c0} = ${CYA}gn args out/thorium${c0}\n" &&
+#printf "alias ${YEL}gnls${c0} = ${CYA}gn ls out/thorium${c0}\n" &&
+#printf "alias ${YEL}show${c0} = ${CYA}git show-ref${c0}\n" &&
+#printf "alias ${YEL}runhooks${c0} = ${CYA}gclient runhooks${c0}\n" &&
+#printf "alias ${YEL}pgo${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=linux update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
+#printf "alias ${YEL}pgow${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=win64 update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
+#printf "alias ${YEL}pgom${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=mac update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
+#printf "alias ${YEL}pgomac-arm${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=mac-arm update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
+#printf "\n" &&
+cat ./logos/thorium_ascii_art.txt &&
+
+printf "${YEL}Tip: See the ${CYA}aliases.txt${YEL} file for some handy bash aliases.${c0}\n" &&
printf "\n" &&
-printf "export ${CYA}NINJA_SUMMARIZE_BUILD=1${c0}\n" &&
-printf "export ${CYA}EDITOR=nano${c0}\n" &&
-printf "export ${CYA}VISUAL=nano${c0}\n" &&
-printf "\n" &&
-printf "alias ${YEL}origin${c0} = ${CYA}git checkout -f origin/main${c0}\n" &&
-printf "alias ${YEL}gfetch${c0} = ${CYA}git fetch --tags${c0}\n" &&
-printf "alias ${YEL}rebase${c0} = ${CYA}git rebase-update${c0}\n" &&
-printf "alias ${YEL}gsync${c0} = ${CYA}gclient sync --with_branch_heads --with_tags -f -R -D${c0}\n" &&
-printf "alias ${YEL}args${c0} = ${CYA}gn args out/thorium${c0}\n" &&
-printf "alias ${YEL}gnls${c0} = ${CYA}gn ls out/thorium${c0}\n" &&
-printf "alias ${YEL}show${c0} = ${CYA}git show-ref${c0}\n" &&
-printf "alias ${YEL}runhooks${c0} = ${CYA}gclient runhooks${c0}\n" &&
-printf "alias ${YEL}pgo${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=linux update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
-printf "alias ${YEL}pgow${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=win64 update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
-printf "alias ${YEL}pgom${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=mac update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
-printf "alias ${YEL}pgomac-arm${c0} = ${CYA}python3 tools/update_pgo_profiles.py --target=mac-arm update --gs-url-base=chromium-optimization-profiles/pgo_profiles${c0}\n" &&
-printf "\n" &&
-
-cat logos/thorium_ascii_art.txt &&
-
-printf "${GRE}Enjoy Thorium!\n" &&
+printf "${GRE} Enjoy Thorium!\n" &&
printf "\n" &&
tput sgr0
diff --git a/src/chrome/common/media/cdm_registration.cc b/src/chrome/common/media/cdm_registration.cc
index ff5adc9f..bfa82fea 100644
--- a/src/chrome/common/media/cdm_registration.cc
+++ b/src/chrome/common/media/cdm_registration.cc
@@ -428,3 +428,11 @@ void RegisterCdmInfo(std::vector* cdms) {
DVLOG(3) << __func__ << " done with " << cdms->size() << " cdms";
}
+
+#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX)
+std::vector GetSoftwareSecureWidevineForTesting() {
+ std::vector cdms;
+ AddSoftwareSecureWidevine(&cdms);
+ return cdms;
+}
+#endif // BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX)