|
|
|
@ -72,6 +72,8 @@ if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
######## Config ############################################################
|
|
|
|
|
|
|
|
|
|
wine_conf="winedir.conf"
|
|
|
|
|
game_conf="gamedir.conf"
|
|
|
|
|
|
|
|
|
@ -139,7 +141,7 @@ max_download_items=20
|
|
|
|
|
# used to dynamically determine the height of menus
|
|
|
|
|
menu_option_height="25"
|
|
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
######## Bundled Files #####################################################
|
|
|
|
|
|
|
|
|
|
# Use logo installed by a packaged version of this script if available
|
|
|
|
|
# Otherwise, default to the logo in the same directory
|
|
|
|
@ -151,16 +153,23 @@ else
|
|
|
|
|
lug_logo="info"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Lutris install script
|
|
|
|
|
install_script="$helper_dir/lug-lutris-install.json"
|
|
|
|
|
# Use Lutris install script installed by a packaged version of this script if available
|
|
|
|
|
# Otherwise, default to the json in the same directory
|
|
|
|
|
if [ -f "/usr/share/lug-helper/lug-lutris-install.json" ]; then
|
|
|
|
|
install_script="/usr/share/lug-helper/lug-lutris-install.json"
|
|
|
|
|
else
|
|
|
|
|
install_script="$helper_dir/lug-lutris-install.json"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
######## Links #############################################################
|
|
|
|
|
|
|
|
|
|
# LUG Wiki
|
|
|
|
|
lug_wiki="https://github.com/starcitizen-lug/information-howtos/wiki"
|
|
|
|
|
|
|
|
|
|
# Github repo and script version info
|
|
|
|
|
repo="starcitizen-lug/lug-helper"
|
|
|
|
|
releases_url="https://github.com/$repo/releases"
|
|
|
|
|
current_version="v1.14"
|
|
|
|
|
|
|
|
|
|
# LUG Wiki
|
|
|
|
|
lug_wiki="https://github.com/starcitizen-lug/information-howtos/wiki"
|
|
|
|
|
current_version="v1.15"
|
|
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
############################################################################
|
|
|
|
@ -1141,13 +1150,15 @@ download_select_install() {
|
|
|
|
|
debug_print exit "Script error: Unknown api/url format in ${download_type}_sources array. Aborting."
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# For runners, check GlibC version against runner requirements
|
|
|
|
|
if [ "download_type" = "runner" ] && [ "$contributor_name" = "/dev/null" ]; then
|
|
|
|
|
if [ "$download_type" = "runner" ] && [ "$contributor_name" = "/dev/null" ]; then
|
|
|
|
|
required_glibc="2.33"
|
|
|
|
|
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
|
|
|
|
|
|
|
|
|
if [ "$(bc <<< "$required_glibc > $system_glibc")" = "1" ]; then
|
|
|
|
|
# Sort the versions and check if the installed glibc is smaller
|
|
|
|
|
if [ "$required_glibc" != "$system_glibc" ] &&
|
|
|
|
|
[ "$system_glibc" = "$(printf "$system_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
|
|
|
|
message warning "Your glibc version is incompatible with the selected runner.\n\nSystem glibc: v$system_glibc\nMinimum required glibc: v$required_glibc"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
@ -1432,6 +1443,12 @@ install_game() {
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Display the LUG Wiki
|
|
|
|
|
display_wiki() {
|
|
|
|
|
# Display a message containing the URL
|
|
|
|
|
message info "See the Wiki for our Quick-Start Guide, Manual Installation instructions,\nPerformance Tuning, and Common Issues and Solutions:\n\n$lug_wiki"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Delete the shaders directory
|
|
|
|
|
rm_shaders() {
|
|
|
|
|
# Get/Set directory paths
|
|
|
|
@ -1495,13 +1512,14 @@ maintenance_menu() {
|
|
|
|
|
shaders_msg="Delete my shaders folder only (Do this after each game update)"
|
|
|
|
|
vidcache_msg="Delete my DXVK cache"
|
|
|
|
|
dirs_msg="Display Helper and Star Citizen directories"
|
|
|
|
|
wiki_msg="Show the LUG Wiki"
|
|
|
|
|
reset_msg="Reset Helper configs"
|
|
|
|
|
quit_msg="Return to the main menu"
|
|
|
|
|
|
|
|
|
|
# Set the options to be displayed in the menu
|
|
|
|
|
menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$reset_msg" "$quit_msg")
|
|
|
|
|
menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$wiki_msg" "$reset_msg" "$quit_msg")
|
|
|
|
|
# Set the corresponding functions to be called for each of the options
|
|
|
|
|
menu_actions=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "display_dirs" "reset_helper" "menu_loop_done")
|
|
|
|
|
menu_actions=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "display_dirs" "display_wiki" "reset_helper" "menu_loop_done")
|
|
|
|
|
|
|
|
|
|
# Calculate the total height the menu should be
|
|
|
|
|
menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))"
|
|
|
|
@ -1580,20 +1598,6 @@ fi
|
|
|
|
|
# Set defaults
|
|
|
|
|
live_or_ptu="$live_dir"
|
|
|
|
|
|
|
|
|
|
# Check if a newer verison of the script is available
|
|
|
|
|
latest_version="$(get_latest_release "$repo")"
|
|
|
|
|
|
|
|
|
|
if [ "$latest_version" != "$current_version" ] &&
|
|
|
|
|
[ "$current_version" = "$(printf "$current_version\n$latest_version" | sort -V | head -n1)" ]; then
|
|
|
|
|
if [ "$use_zenity" -eq 1 ]; then
|
|
|
|
|
releases_url_formatted="<a href='$releases_url'>$releases_url</a>"
|
|
|
|
|
else
|
|
|
|
|
releases_url_formatted="$releases_url"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
message info "The latest version of the LUG Helper is $latest_version\nYou are using $current_version\n\nYou can download new releases here:\n$releases_url_formatted"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# If invoked with command line arguments, process them and exit
|
|
|
|
|
if [ "$#" -gt 0 ]; then
|
|
|
|
|
while [ "$#" -gt 0 ]
|
|
|
|
@ -1692,6 +1696,22 @@ Usage: lug-helper <options>
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Format some URLs for Zenity
|
|
|
|
|
if [ "$use_zenity" -eq 1 ]; then
|
|
|
|
|
releases_url="<a href='$releases_url'>$releases_url</a>"
|
|
|
|
|
lug_wiki="<a href='$lug_wiki'>$lug_wiki</a>"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Check if a newer verison of the script is available
|
|
|
|
|
latest_version="$(get_latest_release "$repo")"
|
|
|
|
|
|
|
|
|
|
# Sort the versions and check if the installed Helper is smaller
|
|
|
|
|
if [ "$latest_version" != "$current_version" ] &&
|
|
|
|
|
[ "$current_version" = "$(printf "$current_version\n$latest_version" | sort -V | head -n1)" ]; then
|
|
|
|
|
|
|
|
|
|
message info "The latest version of the LUG Helper is $latest_version\nYou are using $current_version\n\nYou can download new releases here:\n$releases_url"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Loop the main menu until the user selects quit
|
|
|
|
|
while true; do
|
|
|
|
|
# Configure the menu
|
|
|
|
|