misc fixes

This commit is contained in:
Alexander Frick 2024-08-17 11:57:19 -05:00
parent 15c4ee0a3f
commit c655491002
5 changed files with 60 additions and 45 deletions

View file

@ -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'

View file

@ -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$@ &&

View file

@ -40,7 +40,7 @@ index ceabbced0f67e..c298005d46bc3 100644
Date Modified
</message>
+ <message name="IDS_DIRECTORY_LISTING_PARSING_ERROR_BOX_TEXT" desc="Text to show in a box when we failed to parse FTP directory listing.">
+ Oh, no! This server is sending data <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> can't understand. Please <ph name="BEGIN_LINK">&lt;a href="http://code.google.com/p/chromium/issues/entry"&gt;</ph>report a bug<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>, and include the <ph name="BEGIN2_LINK">&lt;a href="LOCATION"&gt;</ph>raw listing<ph name="END2_LINK">&lt;/a&gt;</ph>.
+ Oh, no! This server is sending data <ph name="PRODUCT_NAME">$1<ex>Thorium</ex></ph> can't understand. Please <ph name="BEGIN_LINK">&lt;a href="https://issues.chromium.org/issues/new"&gt;</ph>report a bug<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>, and include the <ph name="BEGIN2_LINK">&lt;a href="LOCATION"&gt;</ph>raw listing<ph name="END2_LINK">&lt;/a&gt;</ph>.
+ </message>
<!-- Saving Page-->

View file

@ -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

View file

@ -428,3 +428,11 @@ void RegisterCdmInfo(std::vector<content::CdmInfo>* cdms) {
DVLOG(3) << __func__ << " done with " << cdms->size() << " cdms";
}
#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX)
std::vector<content::CdmInfo> GetSoftwareSecureWidevineForTesting() {
std::vector<content::CdmInfo> cdms;
AddSoftwareSecureWidevine(&cdms);
return cdms;
}
#endif // BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX)