|
|
|
@ -85,7 +85,7 @@ data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
|
|
|
conf_subdir="starcitizen-lug"
|
|
|
|
|
|
|
|
|
|
# Helper directory
|
|
|
|
|
helper_dir="$(realpath "$0" | xargs dirname)"
|
|
|
|
|
helper_dir="$(realpath "$0" | xargs -0 dirname)"
|
|
|
|
|
|
|
|
|
|
# Temporary directory
|
|
|
|
|
tmp_dir="$(mktemp -d --suffix=".lughelper")"
|
|
|
|
@ -102,6 +102,9 @@ install_path="drive_c/Program Files/Roberts Space Industries/$sc_base_dir"
|
|
|
|
|
live_dir="LIVE"
|
|
|
|
|
ptu_dir="PTU"
|
|
|
|
|
|
|
|
|
|
# AppData directory
|
|
|
|
|
appdata_path="drive_c/users?/appdata?/something/local/idontknow/starcitizen"
|
|
|
|
|
|
|
|
|
|
# Remaining directory paths are set at the end of the getdirs() function
|
|
|
|
|
|
|
|
|
|
######## Runners ###########################################################
|
|
|
|
@ -132,6 +135,7 @@ dxvk_dir="$data_dir/lutris/runtime/dxvk"
|
|
|
|
|
dxvk_sources=(
|
|
|
|
|
"Sporif Async" "https://api.github.com/repos/Sporif/dxvk-async/releases"
|
|
|
|
|
"/dev/null" "https://api.github.com/repos/gort818/dxvk/releases"
|
|
|
|
|
"gnusenpai" "https://api.github.com/repos/gnusenpai/dxvk/releases"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Set a maximum number of versions to display from each download url
|
|
|
|
@ -169,7 +173,7 @@ 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.16"
|
|
|
|
|
current_version="v1.20"
|
|
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
############################################################################
|
|
|
|
@ -524,7 +528,7 @@ getdirs() {
|
|
|
|
|
# The location within the USER directory to which the game exports keybinds
|
|
|
|
|
keybinds_dir="$user_dir/Controls/Mappings"
|
|
|
|
|
# Shaders directory
|
|
|
|
|
shaders_dir="$user_dir/shaders"
|
|
|
|
|
shaders_dir="$wine_prefix/$appdata_path/shaders"
|
|
|
|
|
# dxvk cache file
|
|
|
|
|
dxvk_cache="$game_path/$live_or_ptu/StarCitizen.dxvk-cache"
|
|
|
|
|
# Where to store backed up keybinds
|
|
|
|
@ -775,6 +779,15 @@ avx_check() {
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Check if swap is set up
|
|
|
|
|
swap_check() {
|
|
|
|
|
if cat /proc/swaps | grep -vq "Filename"; then
|
|
|
|
|
preflight_pass+=("You have swap space configured.")
|
|
|
|
|
else
|
|
|
|
|
preflight_fail+=("You don't appear to have swap space configured.\nWe recommend configuring an 8-16 GB swap file.")
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Check that the system is optimized for Star Citizen
|
|
|
|
|
preflight_check() {
|
|
|
|
|
# Initialize variables
|
|
|
|
@ -789,6 +802,7 @@ preflight_check() {
|
|
|
|
|
# Call the optimization functions to perform the checks
|
|
|
|
|
wine_check
|
|
|
|
|
memory_check
|
|
|
|
|
swap_check
|
|
|
|
|
avx_check
|
|
|
|
|
mapcount_check
|
|
|
|
|
filelimit_check
|
|
|
|
@ -902,6 +916,7 @@ lutris_restart() {
|
|
|
|
|
# Perform post-download actions, display messages or instructions
|
|
|
|
|
# Expects the variables message_heading, post_download_msg_text,
|
|
|
|
|
# post_download_msg_italics, and downloaded_item_name
|
|
|
|
|
# Optional: post_download_msg_more_info and post_download_msg_link
|
|
|
|
|
post_download() {
|
|
|
|
|
# Check if lutris needs to be restarted after making changes
|
|
|
|
|
lutris_restart
|
|
|
|
@ -909,12 +924,30 @@ post_download() {
|
|
|
|
|
if [ "$display_post_download_msg" = "true" ]; then
|
|
|
|
|
message_heading="Download Complete"
|
|
|
|
|
|
|
|
|
|
# Format some variables for zenity
|
|
|
|
|
if [ "$use_zenity" -eq 1 ]; then
|
|
|
|
|
message_heading="<b>$message_heading</b>"
|
|
|
|
|
post_download_msg_italics="<i>$post_download_msg_italics</i>"
|
|
|
|
|
|
|
|
|
|
# If we have a link to provide, format it as well
|
|
|
|
|
if [ -n "$post_download_msg_link" ]; then
|
|
|
|
|
post_download_msg_link="<a href='$post_download_msg_link'>$post_download_msg_link</a>"
|
|
|
|
|
fi
|
|
|
|
|
message info "$message_heading\n\n$post_download_msg_text\n$post_download_msg_italics\n\n$downloaded_item_name"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Add newlines to the optional variables if set
|
|
|
|
|
if [ -n "$post_download_msg_more_info" ]; then
|
|
|
|
|
post_download_msg_more_info="\n\n$post_download_msg_more_info"
|
|
|
|
|
fi
|
|
|
|
|
if [ -n "$post_download_msg_link" ]; then
|
|
|
|
|
post_download_msg_link="\n$post_download_msg_link"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Display the info
|
|
|
|
|
message info "$message_heading\n\n$post_download_msg_text\n$post_download_msg_italics\n\n$downloaded_item_name$post_download_msg_more_info$post_download_msg_link"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Reset
|
|
|
|
|
display_post_download_msg="false"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1001,6 +1034,9 @@ download_install() {
|
|
|
|
|
*.tar.xz)
|
|
|
|
|
download_name="$(basename "$download_file" .tar.xz)"
|
|
|
|
|
;;
|
|
|
|
|
*.tar.zst)
|
|
|
|
|
download_name="$(basename "$download_file" .tar.zst)"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
debug_print exit "Unknown archive filetype in download_install function. Aborting."
|
|
|
|
|
;;
|
|
|
|
@ -1203,6 +1239,9 @@ download_select_install() {
|
|
|
|
|
*.tar.xz)
|
|
|
|
|
download_name="$(basename "${download_versions[i]}" .tar.xz)"
|
|
|
|
|
;;
|
|
|
|
|
*.tar.zst)
|
|
|
|
|
download_name="$(basename "${download_versions[i]}" .tar.zst)"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
debug_print exit "Unknown archive filetype in download_select_install function. Aborting."
|
|
|
|
|
;;
|
|
|
|
@ -1334,9 +1373,13 @@ runner_manage() {
|
|
|
|
|
# A header is automatically displayed that reads: Download Complete
|
|
|
|
|
# msg_text is displayed below the header
|
|
|
|
|
# msg_italics is displayed below that in italics when zenity is in use
|
|
|
|
|
# Lastly, the downloaded directory name is automatically displayed
|
|
|
|
|
# Then, the downloaded directory name is automatically displayed
|
|
|
|
|
# Optional variables post_download_msg_more_info and
|
|
|
|
|
# post_download_msg_link will be displayed if set
|
|
|
|
|
post_download_msg_text="Select the following runner in Lutris from the dropdown menu under:"
|
|
|
|
|
post_download_msg_italics="Configure->Runner Options->Wine version"
|
|
|
|
|
post_download_msg_more_info=""
|
|
|
|
|
post_download_msg_link=""
|
|
|
|
|
|
|
|
|
|
# Call the download_manage function with the above configuration
|
|
|
|
|
# The argument passed to the function is used for special handling
|
|
|
|
@ -1357,7 +1400,7 @@ dxvk_manage() {
|
|
|
|
|
|
|
|
|
|
# Configure the text displayed in the menus
|
|
|
|
|
download_menu_heading="Lutris DXVK Versions"
|
|
|
|
|
download_menu_description="The DXVK versions below may help improve game performance"
|
|
|
|
|
download_menu_description="The DXVK versions below may help reduce stuttering"
|
|
|
|
|
download_menu_height="140"
|
|
|
|
|
|
|
|
|
|
# Set the post download instructions
|
|
|
|
@ -1365,9 +1408,13 @@ dxvk_manage() {
|
|
|
|
|
# A header is automatically displayed that reads: Download Complete
|
|
|
|
|
# msg_text is displayed below the header
|
|
|
|
|
# msg_italics is displayed below that in italics when zenity is in use
|
|
|
|
|
# Lastly, the downloaded directory name is automatically displayed
|
|
|
|
|
# Then, the downloaded directory name is automatically displayed
|
|
|
|
|
# Optional variables post_download_msg_more_info and
|
|
|
|
|
# post_download_msg_link will be displayed if set
|
|
|
|
|
post_download_msg_text="Type the following DXVK name into your Lutris settings under:"
|
|
|
|
|
post_download_msg_italics="Configure->Runner Options->DXVK version"
|
|
|
|
|
post_download_msg_more_info="See our wiki for instructions on setting the DXVK_ASYNC environment variable in Lutris:"
|
|
|
|
|
post_download_msg_link="https://github.com/starcitizen-lug/information-howtos/wiki/Performance-Tuning#dxvk-async"
|
|
|
|
|
|
|
|
|
|
# Call the download_manage function with the above configuration
|
|
|
|
|
# The argument passed to the function is used for special handling
|
|
|
|
@ -1391,9 +1438,9 @@ eac_workaround() {
|
|
|
|
|
eac_dir="$wine_prefix/drive_c/users/$USER/AppData/Roaming/EasyAntiCheat"
|
|
|
|
|
eac_hosts="127.0.0.1 modules-cdn.eac-prod.on.epicgames.com"
|
|
|
|
|
|
|
|
|
|
# Check if EAC is installed
|
|
|
|
|
if [ ! -d "$eac_dir" ]; then
|
|
|
|
|
message info "Easy Anti-Cheat does not appear to be installed yet.\nThere is nothing to do!"
|
|
|
|
|
# Check if EAC workaround is already applied
|
|
|
|
|
if grep "$eac_hosts" /etc/hosts; then
|
|
|
|
|
message info "The Easy Anti-Cheat workaround has already been applied.\nYou're all set!"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -1417,8 +1464,11 @@ eac_workaround() {
|
|
|
|
|
sudo sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Delete the EAC directory if it exists
|
|
|
|
|
if [ -d "$eac_dir" ]; then
|
|
|
|
|
debug_print continue "Deleting $eac_dir..."
|
|
|
|
|
rm -r "$eac_dir"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
message info "Easy Anti-Cheat workaround has been deployed!"
|
|
|
|
|
fi
|
|
|
|
|