diff --git a/check_avx.sh b/check_simd.sh similarity index 73% rename from check_avx.sh rename to check_simd.sh index 7aeb6344..d7537e2d 100755 --- a/check_avx.sh +++ b/check_simd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2022 Alex313031. +# Copyright (c) 2023 Alex313031. program="Thorium Browser." # The program we are checking for. @@ -22,7 +22,7 @@ script_name=${0##*/} check_result() { # Message calls local ret="$1" local msg="$2" - [ "$ret" -ne 0 ] && { printf "${RED}FAIL:" && tput sgr0 && echo " $msg"; exit 1; } + [ "$ret" -ne 0 ] && { printf "${RED}FAIL:" && tput sgr0 && echo " $msg"; } printf "${GRE}SUCCESS:" && tput sgr0 && echo " $msg" } @@ -35,9 +35,25 @@ have_cpu_feature() { get_cpuinfo | egrep -q "^flags.*\<$feature\>" } -have_sse42_cpu_feature () { - local feature="sse4_2" - local desc="Streaming SIMD Extensions v4.2" +have_sse3_cpu_feature () { + local feature="pni" + local desc="Streaming SIMD Extensions 3" + local need="$desc ($feature)" + have_cpu_feature "$feature" + check_result "$?" "$need" +} + +have_sse41_cpu_feature () { + local feature="sse4_1" + local desc="Streaming SIMD Extensions 4.1" + local need="$desc ($feature)" + have_cpu_feature "$feature" + check_result "$?" "$need" +} + +have_aes_cpu_feature () { + local feature="aes" + local desc="Advanced Encryption Standard Extensions" local need="$desc ($feature)" have_cpu_feature "$feature" check_result "$?" "$need" @@ -51,9 +67,9 @@ have_avx_cpu_feature () { check_result "$?" "$need" } -have_aes_cpu_feature () { - local feature="aes" - local desc="Advanced Encryption Standard Extensions" +have_avx2_cpu_feature () { + local feature="avx2" + local desc="Advanced Vector Extensions 2" local need="$desc ($feature)" have_cpu_feature "$feature" check_result "$?" "$need" @@ -68,8 +84,8 @@ have_64bit_cpu() { } common_checks() { - have_64bit_cpu && \ - have_sse42_cpu_feature && have_aes_cpu_feature && have_avx_cpu_feature + have_64bit_cpu && have_sse3_cpu_feature && have_sse41_cpu_feature && \ + have_aes_cpu_feature && have_avx_cpu_feature && have_avx2_cpu_feature } check_host() { diff --git a/docs/ABOUT_RELEASES.md b/docs/ABOUT_RELEASES.md new file mode 100644 index 00000000..2e04818e --- /dev/null +++ b/docs/ABOUT_RELEASES.md @@ -0,0 +1,48 @@ +# Explainer for Thorium releases + + – This document was created to explain SSE and AVX, and to guide users on which + version of Thorium is appropriate to download for your machine. + +Many users have been confused and posted issues across my repos on what option they should choose when downloading a release. +AVX what? SSE huh? Whats the difference? Why does one work on my machine but the other doesn't? + +### About SIMD + +Since 1997, x86 based CPUs have gotten new instructions that they can execute. Many of these +increase performance because they are Single Instruction, Multiple Data instructions. The first was called +MMX (Multi-Media EXtensions). Then came SSE, SSE2, SSE3, SSE4.1, SSE4.2, AVX, AVX2, and AVX-512, in that order. + +However, they have to be built in (compiled in), and they are backwards, but not forwards compatible, and your CPU *must* support a given SIMD +level or else the browser will crash. + +For example, a CPU that is capable of AVX is capable of all the SSE instrucitons, and so can run either the SSE3 or AVX release, but will get better +performance from the AVX release. However, this same CPU would *not* be able to run an AVX2 release. + +Chromium/Chrome, and projects based on it, have required SSE3 as a minimum since 2020, however, I try to make tailored releases, including: + +32 bit SSE2 (restored!) +32 bit SSE3 +64 bit SSE3 +64 bit SSE4.1 (sometimes) +64 bit AVX +64 bit AVX2 + +CPUs since 2001 including Pentium 4/Athlon and up can run the SSE2 releases. + +CPUs since 2005 including Pentium D/Opteron and up can run the SSE3 releases. + +CPUs since 2007 including Core 2 Duo/Phenom and up can run the SSE3 releases. + +CPUs since 2011 including 2nd Gen Core/Bulldozer and up can run the AVX releases. + +CPUs since 2016 including 6th Gen Core/Ryzen and up can run the AVX2 releases. + + - Caveat, some lower end CPU's like Intel Atom/Celeron/Pentium or AMD Geode might not have AVX/AVX2. + +### So which do I download ? + +If you want to find out for sure what your CPU supports, you can use: + +Windows > CPU-Z +Linux > + diff --git a/infra/TODO.md b/infra/TODO.md index 9279feb2..d02f2ce4 100644 --- a/infra/TODO.md +++ b/infra/TODO.md @@ -27,16 +27,18 @@ ### Notes + - Do a full, manual, one by one file check rebase, to pick up any inconsistencies, and clean up code. + +## .grd text replacements (search with grep), because there are a few places we want to tweak some strings. + Google recommends Thorium > Alex313031 recommends Thorium violates the Thorium > violates the Chrome -## .grd text replacements (search with grep) - Chromium > Thorium Chrome > Thorium Google Thorium > Thorium -Thorium Web Store > Chrome Web Store (Except some UI elements) +Thorium Web Store > Chrome Web Store (Except some UI elements like NTP) Thorium Remote Desktop > Chrome Remote Desktop ThoriumOS Flex > ThoriumOS made possible by Thorium > Chromium diff --git a/infra/build_dmg_cr.sh b/infra/build_dmg_cr.sh old mode 100644 new mode 100755 diff --git a/infra/set_exec.sh b/infra/set_exec.sh index 6d997f27..b3cedbd8 100755 --- a/infra/set_exec.sh +++ b/infra/set_exec.sh @@ -21,7 +21,7 @@ tput sgr0 && printf "${BOLD}\n" && # Set executable permissions -export NINJA_SUMMARIZE_BUILD=1 && +cd .. && sudo chmod -v +x depot_tools/autoninja && @@ -35,7 +35,7 @@ sudo chmod -v +x build_mac.sh && sudo chmod -v +x build_win.sh && -sudo chmod -v +x check_avx.sh && +sudo chmod -v +x check_simd.sh && sudo chmod -v +x clean.sh && @@ -47,7 +47,7 @@ sudo chmod -v +x trunk.sh && sudo chmod -v +x reset_depot_tools.sh && -sudo chmod -v +x VERSION.sh && +sudo chmod -v +x version.sh && sudo chmod -v +x infra/install_deps.sh && @@ -69,17 +69,17 @@ sudo chmod -v +x logos/NEW/mac/gen/app/build_icns.sh && sudo chmod -v +x logos/NEW/mac/gen/document/build_icns.sh && -sudo chmod -v +x portable/THORIUM-PORTABLE && +sudo chmod -v +x infra/portable/THORIUM-PORTABLE && -sudo chmod -v +x portable/THORIUM-SHELL && +sudo chmod -v +x infra/portable/THORIUM-SHELL && -sudo chmod -v +x portable/thorium-portable.desktop && +sudo chmod -v +x infra/portable/thorium-portable.desktop && -sudo chmod -v +x portable/thorium-shell.desktop && +sudo chmod -v +x infra/portable/thorium-shell.desktop && -sudo chmod -v +x portable/make_portable_linux.sh && +sudo chmod -v +x infra/portable/make_portable_linux.sh && -sudo chmod -v +x portable/make_portable_win.sh && +sudo chmod -v +x infra/portable/make_portable_win.sh && sudo chmod -v +x infra/APPIMAGE/pkg2appimage && @@ -89,11 +89,13 @@ sudo chmod -v +x pak_src/build.sh && sudo chmod -v +x src/build/vs_toolchain.py && -sudo chmod -v +x src/tools/gn/bootstrap/bootstrap.py && +# sudo chmod -v +x src/tools/gn/bootstrap/bootstrap.py && sudo chmod -v +x src/tools/clang/scripts/build.py && -sudo chmod -v +x other/Polly/setup_polly.sh && +# sudo chmod -v +x other/Polly/setup_polly.sh && +printf "\n" && printf "${GRE}${bold}Scripts are ready!\n" && +printf "\n" && tput sgr0 diff --git a/src/chrome/app/generated_resources.grd b/src/chrome/app/generated_resources.grd index 3c8ced1f..9febab06 100644 --- a/src/chrome/app/generated_resources.grd +++ b/src/chrome/app/generated_resources.grd @@ -14378,8 +14378,8 @@ Please help our engineers fix this problem. Tell us what happened right before y Switch to a smart and secure browser - - Google recommends Thorium + + Alex313031 recommends Thorium Open Thorium diff --git a/src/chrome/browser/ui/android/strings/android_chrome_strings.grd b/src/chrome/browser/ui/android/strings/android_chrome_strings.grd index b887e5a9..ae42510f 100644 --- a/src/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/src/chrome/browser/ui/android/strings/android_chrome_strings.grd @@ -5650,7 +5650,7 @@ To change this setting, <resetlink>reset sync

- Google recommends Thorium + Alex313031 recommends Thorium Save up to 60% data, read today's news