Merge branch 'cachy-v3' of github.com:Boria138/PortWINE into Boria138-cachy-v3
This commit is contained in:
@ -5145,8 +5145,24 @@ gui_proton_downloader () {
|
|||||||
# PROTON_CACHYOS
|
# PROTON_CACHYOS
|
||||||
PROTON_CACHYOS_GIT=($(echo "$METADATA" | jq -r '.proton_cachyos[]?.name' 2>/dev/null))
|
PROTON_CACHYOS_GIT=($(echo "$METADATA" | jq -r '.proton_cachyos[]?.name' 2>/dev/null))
|
||||||
if [[ -n "${PROTON_CACHYOS_GIT[0]}" ]] ; then
|
if [[ -n "${PROTON_CACHYOS_GIT[0]}" ]] ; then
|
||||||
|
# The Pentium/Celeron don't have the full instruction set, but /lib/ld-linux-x86-64.so.2 --help | grep -B 3 -E “x86-64” says otherwise, so this is where checking all flags comes in (code from https://dl.xanmod.org/check_x86-64_psabi.sh)
|
||||||
|
CPU_LEVEL=$(awk '
|
||||||
|
BEGIN {
|
||||||
|
while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1
|
||||||
|
if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1
|
||||||
|
if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2
|
||||||
|
if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3
|
||||||
|
if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4
|
||||||
|
if (level > 0) { print level; exit level + 1 }
|
||||||
|
exit 1
|
||||||
|
}' /proc/cpuinfo)
|
||||||
|
|
||||||
for PGEGIT in "${PROTON_CACHYOS_GIT[@]}" ; do
|
for PGEGIT in "${PROTON_CACHYOS_GIT[@]}" ; do
|
||||||
|
if [[ "$PGEGIT" =~ v3 ]] && [[ "$CPU_LEVEL" -lt 3 ]]; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
echo "${PGEGIT}" >> "${PW_TMPFS_PATH}/tmp_proton_cachyos_git"
|
echo "${PGEGIT}" >> "${PW_TMPFS_PATH}/tmp_proton_cachyos_git"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user