Compare commits

..

12 Commits

Author SHA1 Message Date
the-sane
c0c0728e38 Improve eac workaround
Handles the hosts file addition and eac directory deletion separately
2023-01-30 17:35:41 -05:00
the-sane
c1591f15cb Update GE runner version 2023-01-30 16:44:14 -05:00
the-sane
5c70243448 Try harder to accommodate mangled ymls 2023-01-30 16:42:15 -05:00
the-sane
0cf1fdc669 Fix style 2023-01-30 16:24:38 -05:00
the-sane
a70d2426ad Lutris sometimes mangles the yml; accommodate
Sometimes the line gets split across two lines? Shorten our search
2023-01-30 16:16:53 -05:00
the-sane
e6d79125a6 Clean up array building 2023-01-30 16:14:28 -05:00
the-sane
c1dae30e5e Safety first! 2023-01-30 15:46:12 -05:00
the-sane
69d402cb10 Performance improvements 2023-01-30 15:34:48 -05:00
the-sane
1f826de2c6 Fix lutris version detect 2023-01-30 15:17:19 -05:00
the-sane
bc3d7d8fe7 Improve printfs 2023-01-30 15:15:51 -05:00
the-sane
73c4f7346d Update updated_at 2023-01-30 14:42:46 -05:00
the-sane
9f9480b99d Disable dxvk_nvapi 2023-01-30 14:40:57 -05:00
2 changed files with 75 additions and 51 deletions

View File

@ -646,7 +646,7 @@ getdirs() {
if [ ! -d "$game_path" ]; then
printf "That directory is invalid or does not exist. Please try again.\n\n"
elif [ "$(basename "$game_path")" != "$sc_base_dir" ]; then
printf "You must enter the full path to the directory named '$sc_base_dir'\n\n"
printf "You must enter the full path to the directory named '%s'\n\n" "$sc_base_dir"
else
break
fi
@ -857,9 +857,9 @@ lutris_check() {
# Check the native lutris version number
if [ "$lutris_native" = "true" ]; then
lutris_current="$(lutris -v)"
lutris_current="$(lutris -v | awk -F '-' '{print $2}')"
if [ "$lutris_required" != "$lutris_current" ] &&
[ "$lutris_current" = "$(printf "$lutris_current\n$lutris_required" | sort -V | head -n1)" ]; then
[ "$lutris_current" = "$(printf "%s\n%s" "$lutris_current" "$lutris_required" | sort -V | head -n1)" ]; then
preflight_fail+=("Lutris is out of date.\nVersion $lutris_required or newer is required.")
else
preflight_pass+=("Lutris is installed and up to date.")
@ -868,9 +868,9 @@ lutris_check() {
# Check the flatpak lutris version number
if [ "$lutris_flatpak" = "true" ]; then
lutris_current="$(flatpak run net.lutris.Lutris -v)"
lutris_current="$(flatpak run net.lutris.Lutris -v | awk -F '-' '{print $2}')"
if [ "$lutris_required" != "$lutris_current" ] &&
[ "$lutris_current" = "$(printf "$lutris_current\n$lutris_required" | sort -V | head -n1)" ]; then
[ "$lutris_current" = "$(printf "%s\n%s" "$lutris_current" "$lutris_required" | sort -V | head -n1)" ]; then
preflight_fail+=("Flatpak Lutris is out of date.\nVersion $lutris_required or newer is required.")
else
preflight_pass+=("Flatpak Lutris is installed and up to date.")
@ -883,7 +883,7 @@ winetricks_check() {
if [ -x "$(command -v winetricks)" ]; then
winetricks_current="$(winetricks --version | awk '{print $1}')"
if [ "$winetricks_required" != "$winetricks_current" ] &&
[ "$winetricks_current" = "$(printf "$winetricks_current\n$winetricks_required" | sort -V | head -n1)" ]; then
[ "$winetricks_current" = "$(printf "%s\n%s" "$winetricks_current" "$winetricks_required" | sort -V | head -n1)" ]; then
preflight_fail+=("Winetricks is out of date.\nVersion $winetricks_required or newer is required.\nIf installing the game through Lutris, this can be ignored.\nCheck that Use System Winetricks is disabled in Lutris Runner Options.")
else
preflight_pass+=("Winetricks is installed and up to date.")
@ -896,7 +896,7 @@ winetricks_check() {
# Check total system memory
memory_check() {
memtotal="$(LC_NUMERIC=C awk '/MemTotal/ {printf "%.1f \n", $2/1024/1024}' /proc/meminfo)"
if [ ${memtotal%.*} -ge "15" ]; then
if [ "${memtotal%.*}" -ge "15" ]; then
preflight_pass+=("Your system has $memtotal GB of memory.")
else
preflight_fail+=("Your system has $memtotal GB of memory.\nWe recommend at least 16 GB to avoid crashes.")
@ -914,7 +914,7 @@ avx_check() {
# Check if swap is set up
swap_check() {
if cat /proc/swaps | grep -vq "Filename"; then
if grep -vq "Filename" /proc/swaps; 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.")
@ -984,7 +984,7 @@ preflight_check() {
message info "$message_heading\n\nYour system is optimized for Star Citizen!\n\n$preflight_pass_string"
else
if [ -z "$preflight_action_funcs" ]; then
if [ "${#preflight_action_funcs[@]}" -eq 0 ]; then
message warning "$preflight_fail_string$preflight_pass_string"
elif message question "$preflight_fail_string$preflight_pass_string\n\nWould you like configuration issues to be fixed for you?"; then
# Call functions to build fixes for any issues found
@ -1001,7 +1001,7 @@ preflight_check() {
done
# Execute the actions set by the functions
if [ ! -z "$preflight_actions_string" ]; then
if [ -n "$preflight_actions_string" ]; then
# Try to execute the actions as root
try_exec "$preflight_actions_string"
if [ "$?" -eq 1 ]; then
@ -1029,7 +1029,7 @@ preflight_check() {
else
# User declined to automatically fix configuration issues
# Show manual configuration options
if [ ! -z "$preflight_manual_string" ]; then
if [ -n "$preflight_manual_string" ]; then
message info "$preflight_manual_string"
fi
fi
@ -1148,9 +1148,9 @@ post_download() {
# We need to configure and restart Lutris
unset lutris_game_ymls
# Build an array of all Lutris Star Citizen yml files
while IFS= read -rd ''; do
lutris_game_ymls+=("$REPLY")
done < <(grep -RlZ --include="*.yml" "Roberts Space Industries/RSI Launcher/RSI Launcher.exe" "$lutris_native_conf_dir" "$lutris_flatpak_conf_dir" 2>/dev/null)
while IFS='' read -r line; do
lutris_game_ymls+=("$line")
done < <(grep -iRlE --include="*.yml" "Roberts Space Industries|starcitizen|star citizen|star-citizen" "$lutris_native_conf_dir" "$lutris_flatpak_conf_dir" 2>/dev/null)
# We handle installs and deletions differently
if [ "$download_action_success" = "installed" ]; then
@ -1388,11 +1388,11 @@ download_install() {
if [ "$?" -eq 1 ]; then
# User clicked cancel
debug_print continue "Download aborted. Removing $tmp_dir/$download_file..."
rm "$tmp_dir/$download_file"
rm "$tmp_dir/lugpipe"
rm "${tmp_dir:?}/$download_file"
rm "${tmp_dir:?}/lugpipe"
return 1
fi
rm "$tmp_dir/lugpipe"
rm "${tmp_dir:?}/lugpipe"
else
# Standard curl progress bar
(cd "$tmp_dir" && curl -LO "$download_url")
@ -1440,7 +1440,7 @@ download_install() {
if [ -d "${download_dirs[i]}/$download_name" ]; then
# This item has already been installed. Delete it before reinstalling
debug_print continue "$download_type exists, deleting ${download_dirs[i]}/$download_name..."
rm -r "${download_dirs[i]}/$download_name"
rm -r "${download_dirs[i]:?}/$download_name"
debug_print continue "Reinstalling $download_type into ${download_dirs[i]}/$download_name..."
else
debug_print continue "Installing $download_type into ${download_dirs[i]}/$download_name..."
@ -1467,7 +1467,7 @@ download_install() {
if [ -d "${download_dirs[i]}/$download_name" ]; then
# This item has already been installed. Delete it before reinstalling
debug_print continue "$download_type exists, deleting ${download_dirs[i]}/$download_name..."
rm -r "${download_dirs[i]}/$download_name"
rm -r "${download_dirs[i]:?}/$download_name"
debug_print continue "Reinstalling $download_type into ${download_dirs[i]}/$download_name..."
else
debug_print continue "Installing $download_type into ${download_dirs[i]}/$download_name..."
@ -1492,8 +1492,8 @@ download_install() {
# Cleanup tmp download
debug_print continue "Cleaning up $tmp_dir/$download_file..."
rm "$tmp_dir/$download_file"
rm -r "$tmp_dir/$download_name"
rm "${tmp_dir:?}/$download_file"
rm -r "${tmp_dir:?}/$download_name"
}
# List available items for download. Called by download_manage()
@ -1535,7 +1535,7 @@ download_select_install() {
esac
# 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"
@ -1549,7 +1549,7 @@ download_select_install() {
# 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
[ "$native_glibc" = "$(printf "%s\n%s" "$native_glibc" "$required_glibc" | sort -V | head -n1)" ]; then
glibc_fail+=("Native")
fi
fi
@ -1560,13 +1560,13 @@ download_select_install() {
# 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
[ "$flatpak_glibc" = "$(printf "%s\n%s" "$flatpak_glibc" "$required_glibc" | sort -V | head -n1)" ]; then
glibc_fail+=("Flatpak")
fi
fi
# Display a warning message
if [ -n "$glibc_fail" ]; then
if [ "${#glibc_fail[@]}" -gt 0 ]; then
unset glibc_message
# Prepare the warning message
for (( i=0; i<"${#glibc_fail[@]}"; i++ )); do
@ -1602,8 +1602,11 @@ download_select_install() {
# Fetch a list of versions from the selected contributor
# To add new sources, handle them here, in the if statement
# just above, and the download_install function above
unset download_versions
if [ "$download_url_type" = "github" ]; then
download_versions=($(curl -s "$contributor_url" | awk '/browser_download_url/ {print $2}' | xargs basename -a))
while IFS='' read -r line; do
download_versions+=("$line")
done < <(curl -s "$contributor_url" | awk '/browser_download_url/ {print $2}' | xargs basename -a)
else
debug_print exit "Script error: Unknown api/url format in ${download_type}_sources array. Aborting."
fi
@ -2000,7 +2003,7 @@ rm_shaders() {
# If a shaders directory is found, delete it
if message question "The following directory will be deleted:\n\n$appdata_dir/$shaders_subdir\n\nDo you want to proceed?"; then
debug_print continue "Deleting $appdata_dir/$shaders_subdir..."
rm -r "$appdata_dir/$shaders_subdir"
rm -r "${appdata_dir:?}/$shaders_subdir"
fi
fi
done
@ -2101,7 +2104,7 @@ reset_helper() {
# Delete the shader directory
if message question "All config files will be deleted from:\n\n$conf_dir/$conf_subdir\n\nDo you want to proceed?"; then
debug_print continue "Deleting $conf_dir/$conf_subdir/*.conf..."
rm "$conf_dir/$conf_subdir/"*.conf
rm "${conf_dir:?}/$conf_subdir/"*.conf
message info "The Helper has been reset!"
fi
}
@ -2211,16 +2214,6 @@ 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 workaround is already applied
if grep -q "$eac_hosts" /etc/hosts; then
if grep -q "^$eac_hosts" /etc/hosts; then
message info "The Easy Anti-Cheat workaround has already been applied.\nYou're all set!"
else
message info "The Easy Anti-Cheat workaround has already been applied, but may be commented out.\nNo changes have been made, please edit /etc/hosts manually."
fi
return 0
fi
# Configure message variables
eac_title="Easy Anti-Cheat Workaround"
eac_hosts_formatted="$eac_hosts"
@ -2231,14 +2224,44 @@ eac_workaround() {
eac_dir_formatted="<i>$eac_dir_formatted</i>"
fi
if message question "$eac_title\n\nThe following entry will be added to /etc/hosts:\n$eac_hosts_formatted\n\nThe following directory will be deleted:\n$eac_dir_formatted\n\n\nTo revert these changes, delete the above line from\n/etc/hosts and relaunch the game\n\nDo you want to proceed?"; then
debug_print continue "Editing hosts file..."
apply_eac_hosts="false"
delete_eac_dir="false"
if grep -q "^$eac_hosts" /etc/hosts; then
# Hosts workaround is in place
# Check if we still need to delete the eac directory
if [ -d "$eac_dir" ]; then
delete_eac_dir="true"
eac_message="$eac_title\n\nYour /etc/hosts is already modified with the Easy Anti-Cheat workaround.\n\nThe following directory must still be deleted:\n$eac_dir_formatted"
fi
else
# Hosts workaround is needed
apply_eac_hosts="true"
eac_message="$eac_title\n\nThe following entry will be added to /etc/hosts:\n$eac_hosts_formatted"
# Check if we also need to delete the eac directory
if [ -d "$eac_dir" ]; then
delete_eac_dir="true"
eac_message="$eac_message\n\nThe following directory will be deleted:\n$eac_dir_formatted"
fi
fi
# Finish up the message
eac_message="$eac_message\n\n\nTo revert these changes, delete the marked EAC workaround line\nin /etc/hosts and relaunch the game\n\nDo you want to proceed?"
# Try to modify /etc/hosts as root
try_exec "printf '\n$eac_hosts #Star Citizen EAC workaround\n' >> /etc/hosts"
if [ "$?" -eq 1 ]; then
message error "Authentication failed or there was an error modifying /etc/hosts.\nSee terminal for more information.\n\nReturning to main menu."
return 0
# Check if the EAC workaround has already been fully applied
if [ "$apply_eac_hosts" = "false" ] && [ "$delete_eac_dir" = "false" ]; then
message info "The Easy Anti-Cheat workaround has already been applied.\nYou're all set!"
return 0
fi
if message question "$eac_message"; then
# Apply the hosts workaround if needed
if [ "$apply_eac_hosts" = "true" ]; then
debug_print continue "Editing hosts file..."
# Try to modify /etc/hosts as root
try_exec "printf '\n$eac_hosts #Star Citizen EAC workaround\n' >> /etc/hosts"
if [ "$?" -eq 1 ]; then
message error "Authentication failed or there was an error modifying /etc/hosts.\nSee terminal for more information.\n\nReturning to main menu."
return 0
fi
fi
# Delete the EAC directory if it exists
@ -2310,7 +2333,7 @@ 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
[ "$current_version" = "$(printf "%s\n%s" "$current_version" "$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
@ -2372,7 +2395,7 @@ Usage: lug-helper <options>
elif [ "$live_or_ptu" = "ptu" ] || [ "$live_or_ptu" = "PTU" ]; then
live_or_ptu="$ptu_dir"
else
printf "$0: Invalid option '$1'\n"
printf "$0: Invalid option '%s'\n" "$1"
exit 0
fi
;;
@ -2386,7 +2409,7 @@ Usage: lug-helper <options>
elif [ "$use_zenity" = "no" ] || [ "$use_zenity" = "NO" ] || [ "$use_zenity" = "0" ]; then
use_zenity=0
else
printf "$0: Invalid option '$1'\n"
printf "$0: Invalid option '%s'\n" "$1"
exit 0
fi
fi
@ -2404,7 +2427,7 @@ Usage: lug-helper <options>
cargs+=("reset_helper")
;;
* )
printf "$0: Invalid option '$1'\n"
printf "$0: Invalid option '%s'\n" "$1"
exit 0
;;
esac

View File

@ -17,7 +17,7 @@
"notes": "Performance may be choppy for the first couple minutes after visiting a new place or performing a new activity while shaders compile. Subsequent arrival should not be choppy.\r\n\r\nIf you receive a Runtime Error you can continue using Star Citizen by dragging the dialog box to the side, but in-game VoIP and FoIP will cease to function until Star Citizen is restarted. Drop in to the LUG group's chat and forums; we have custom runners to work around this problem.\r\n\r\nPlease make sure you have all Wine dependencies properly installed or your game may crash during start-up. See our wiki linked above for more information and instructions.\r\n\r\nTo prevent crashes in areas with lots of geometry, the game needs a Linux resource limit named \"vm.max_map_count\" increased. If you are following our Quick Start Guide and using our LUG Helper, the Preflight Check will do this for you. To set it manually, execute:\r\n\r\nsudo sysctl -w vm.max_map_count=16777216\r\n\r\nConsult your distro's documentation on how to set this permanently or ask a LUG member.\r\n\r\nSee you in the 'verse!",
"credits": "",
"created_at": "2018-11-15T17:43:07.367000Z",
"updated_at": "2023-01-30T01:31:09.714671Z",
"updated_at": "2023-01-30T21:43:51.079643Z",
"draft": false,
"published": true,
"published_by": 64834,
@ -89,11 +89,12 @@
"dxvk": true,
"esync": true,
"system_winetricks": false,
"dxvk_nvapi": false,
"overrides": {
"nvapi,nvapi64": "disabled",
"libglesv2": "builtin"
},
"version": "lutris-GE-Proton7-35-x86_64"
"version": "lutris-GE-Proton7-36-x86_64"
}
}
}