Compare commits

..

No commits in common. "0d90486527a151fd8e16878105136dc301770ba3" and "3b90ed90d080f7842d33307d826fa66930d632d9" have entirely different histories.

View File

@ -1283,66 +1283,14 @@ 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}')"
# Native lutris # Sort the versions and check if the installed glibc is smaller
if [ "$lutris_native" = "true" ]; then if [ "$required_glibc" != "$system_glibc" ] &&
if [ -x "$(command -v ldd)" ]; then [ "$system_glibc" = "$(printf "$system_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
native_glibc="$(ldd --version | awk '/ldd/{print $NF}')" message warning "Your glibc version is incompatible with the selected runner.\n\nSystem glibc: v$system_glibc\nMinimum required glibc: v$required_glibc"
else return 1
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
@ -1766,51 +1714,48 @@ 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() {
dirs_list="\n" unset dirs_list
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+="Helper configuration:\n$conf_dir/$conf_subdir\n\nKeybind backups:\n$conf_dir/$conf_subdir/keybinds\n\n" dirs_list+=("\n\nHelper configuration:\n$conf_dir/$conf_subdir\n\nKeybind backups:\n$conf_dir/$conf_subdir/keybinds")
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+="Wine prefix:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")\n\n" dirs_list+="\n\nWine prefix:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")"
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+="Star Citizen game directory:\n$(cat "$conf_dir/$conf_subdir/$game_conf")\n\n" dirs_list+="\n\nStar Citizen game directory:\n$(cat "$conf_dir/$conf_subdir/$game_conf")"
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+="Star Citizen shaders:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")/$appdata_path\n\n" dirs_list+="\n\nStar Citizen shaders:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")/$appdata_path"
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+="Lutris Runners:" dirs_list+="\n\nLutris Runners:"
if [ -d "$runners_dir_native" ] && [ "$lutris_native" = "true" ]; then if [ -d "$runners_dir_native" ]; then
dirs_list+="\n$runners_dir_native" dirs_list+="\n$runners_dir_native"
fi fi
if [ -d "$runners_dir_flatpak" ] && [ "$lutris_flatpak" = "true" ]; then if [ -d "$runners_dir_flatpak" ]; 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+="Lutris DXVK Versions:" dirs_list+="\n\nLutris DXVK Versions:"
if [ -d "$dxvk_dir_native" ] && [ "$lutris_native" = "true" ]; then if [ -d "$dxvk_dir_native" ]; then
dirs_list+="\n$dxvk_dir_native" dirs_list+="\n$dxvk_dir_native"
fi fi
if [ -d "$dxvk_dir_flatpak" ] && [ "$lutris_flatpak" = "true" ]; then if [ -d "$dxvk_dir_flatpak" ]; 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
@ -1819,7 +1764,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