mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-15 23:40:35 +00:00
Compare commits
6 Commits
3b90ed90d0
...
0d90486527
Author | SHA1 | Date | |
---|---|---|---|
|
0d90486527 | ||
|
2c6217da60 | ||
|
1c58b24ed6 | ||
|
c04b4ca2c2 | ||
|
6899d3d94b | ||
|
1ef7e0658d |
@ -1283,14 +1283,66 @@ download_select_install() {
|
|||||||
|
|
||||||
# For runners, check GlibC version against runner requirements
|
# For runners, check GlibC version against runner requirements
|
||||||
if [ "$download_type" = "runner" ] && ( [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ] ); then
|
if [ "$download_type" = "runner" ] && ( [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ] ); then
|
||||||
|
unset glibc_fail
|
||||||
required_glibc="2.33"
|
required_glibc="2.33"
|
||||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
|
||||||
|
|
||||||
# Sort the versions and check if the installed glibc is smaller
|
# Native lutris
|
||||||
if [ "$required_glibc" != "$system_glibc" ] &&
|
if [ "$lutris_native" = "true" ]; then
|
||||||
[ "$system_glibc" = "$(printf "$system_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
if [ -x "$(command -v ldd)" ]; then
|
||||||
message warning "Your glibc version is incompatible with the selected runner.\n\nSystem glibc: v$system_glibc\nMinimum required glibc: v$required_glibc"
|
native_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
||||||
return 1
|
else
|
||||||
|
native_glibc="0 (Not installed)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Sort the versions and check if the installed glibc is smaller
|
||||||
|
if [ "$required_glibc" != "$native_glibc" ] &&
|
||||||
|
[ "$native_glibc" = "$(printf "$native_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
||||||
|
glibc_fail+=("Native")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Flatpak lutris
|
||||||
|
if [ "$lutris_flatpak" = "true" ]; then
|
||||||
|
flatpak_glibc="$(flatpak run --command="ldd" net.lutris.Lutris --version | awk '/ldd/{print $NF}')"
|
||||||
|
|
||||||
|
# Sort the versions and check if the installed glibc is smaller
|
||||||
|
if [ "$required_glibc" != "$flatpak_glibc" ] &&
|
||||||
|
[ "$flatpak_glibc" = "$(printf "$flatpak_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
||||||
|
glibc_fail+=("Flatpak")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Display a warning message
|
||||||
|
if [ -n "$glibc_fail" ]; then
|
||||||
|
unset glibc_message
|
||||||
|
# Prepare the warning message
|
||||||
|
for (( i=0; i<"${#glibc_fail[@]}"; i++ )); do
|
||||||
|
case "${glibc_fail[i]}" in
|
||||||
|
"Native")
|
||||||
|
glibc_message+="System glibc: $native_glibc\n"
|
||||||
|
;;
|
||||||
|
"Flatpak")
|
||||||
|
glibc_message+="Flatpak glibc: $flatpak_glibc\n"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
debug_print exit "Script error: Unknown glibc_fail string in download_select_install() function. Aborting."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
message warning "Your glibc version is incompatible with the selected runner\n\n${glibc_message}Minimum required glibc: $required_glibc"
|
||||||
|
|
||||||
|
# Return if all installed versions of lutris fail the check
|
||||||
|
if [ "$lutris_native" = "true" ] && [ "$lutris_flatpak" = "true" ]; then
|
||||||
|
# Both are installed
|
||||||
|
if [ "${#glibc_fail[@]}" -eq 2 ]; then
|
||||||
|
# Both failed the check
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Only one is installed, but it failed the check
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1714,48 +1766,51 @@ rm_dxvkcache() {
|
|||||||
|
|
||||||
# Display all directories currently used by this helper and Star Citizen
|
# Display all directories currently used by this helper and Star Citizen
|
||||||
display_dirs() {
|
display_dirs() {
|
||||||
unset dirs_list
|
dirs_list="\n"
|
||||||
|
lutris_detect
|
||||||
|
|
||||||
# Helper configs and keybinds
|
# Helper configs and keybinds
|
||||||
if [ -d "$conf_dir/$conf_subdir" ]; then
|
if [ -d "$conf_dir/$conf_subdir" ]; then
|
||||||
dirs_list+=("\n\nHelper configuration:\n$conf_dir/$conf_subdir\n\nKeybind backups:\n$conf_dir/$conf_subdir/keybinds")
|
dirs_list+="Helper configuration:\n$conf_dir/$conf_subdir\n\nKeybind backups:\n$conf_dir/$conf_subdir/keybinds\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wine prefix
|
# Wine prefix
|
||||||
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
||||||
dirs_list+="\n\nWine prefix:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")"
|
dirs_list+="Wine prefix:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Star Citizen installation
|
# Star Citizen installation
|
||||||
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
||||||
dirs_list+="\n\nStar Citizen game directory:\n$(cat "$conf_dir/$conf_subdir/$game_conf")"
|
dirs_list+="Star Citizen game directory:\n$(cat "$conf_dir/$conf_subdir/$game_conf")\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Star Citizen shaders path
|
# Star Citizen shaders path
|
||||||
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
||||||
dirs_list+="\n\nStar Citizen shaders:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")/$appdata_path"
|
dirs_list+="Star Citizen shaders:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")/$appdata_path\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Lutris runners
|
# Lutris runners
|
||||||
if [ -d "$runners_dir_native" ] || [ -d "$runners_dir_flatpak" ]; then
|
if [ -d "$runners_dir_native" ] || [ -d "$runners_dir_flatpak" ]; then
|
||||||
dirs_list+="\n\nLutris Runners:"
|
dirs_list+="Lutris Runners:"
|
||||||
if [ -d "$runners_dir_native" ]; then
|
if [ -d "$runners_dir_native" ] && [ "$lutris_native" = "true" ]; then
|
||||||
dirs_list+="\n$runners_dir_native"
|
dirs_list+="\n$runners_dir_native"
|
||||||
fi
|
fi
|
||||||
if [ -d "$runners_dir_flatpak" ]; then
|
if [ -d "$runners_dir_flatpak" ] && [ "$lutris_flatpak" = "true" ]; then
|
||||||
dirs_list+="\n$runners_dir_flatpak"
|
dirs_list+="\n$runners_dir_flatpak"
|
||||||
fi
|
fi
|
||||||
|
dirs_list+="\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Lutris dxvk
|
# Lutris dxvk
|
||||||
if [ -d "$dxvk_dir_native" ] || [ -d "$dxvk_dir_flatpak" ]; then
|
if [ -d "$dxvk_dir_native" ] || [ -d "$dxvk_dir_flatpak" ]; then
|
||||||
dirs_list+="\n\nLutris DXVK Versions:"
|
dirs_list+="Lutris DXVK Versions:"
|
||||||
if [ -d "$dxvk_dir_native" ]; then
|
if [ -d "$dxvk_dir_native" ] && [ "$lutris_native" = "true" ]; then
|
||||||
dirs_list+="\n$dxvk_dir_native"
|
dirs_list+="\n$dxvk_dir_native"
|
||||||
fi
|
fi
|
||||||
if [ -d "$dxvk_dir_flatpak" ]; then
|
if [ -d "$dxvk_dir_flatpak" ] && [ "$lutris_flatpak" = "true" ]; then
|
||||||
dirs_list+="\n$dxvk_dir_flatpak"
|
dirs_list+="\n$dxvk_dir_flatpak"
|
||||||
fi
|
fi
|
||||||
|
dirs_list+="\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format the info header
|
# Format the info header
|
||||||
@ -1764,7 +1819,7 @@ display_dirs() {
|
|||||||
message_heading="<b>$message_heading</b>"
|
message_heading="<b>$message_heading</b>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
message info "$message_heading\n${dirs_list[@]}"
|
message info "$message_heading\n$dirs_list"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Display the LUG Wiki
|
# Display the LUG Wiki
|
||||||
|
Loading…
x
Reference in New Issue
Block a user