mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-05 14:43:30 +00:00
Compare commits
3 Commits
2780788f70
...
v1.13
Author | SHA1 | Date | |
---|---|---|---|
d24e8b590b | |||
3daeb0b3b1 | |||
e8c93196ff |
@ -46,6 +46,8 @@
|
||||
# Contributor: https://github.com/Wrzlprnft
|
||||
# Runner Downloader inspired by:
|
||||
# https://github.com/richardtatum/sc-runner-updater
|
||||
#
|
||||
# License: GPLv3.0
|
||||
############################################################################
|
||||
|
||||
# Check if script is run as root
|
||||
@ -105,7 +107,7 @@ runners_dir="$data_dir/lutris/runners/wine"
|
||||
# The second is expected to contain the github api releases url
|
||||
# ie. "RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
|
||||
runner_sources=(
|
||||
"RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
|
||||
"RawFox" "https://api.github.com/repos/starcitizen-lug/raw-wine/releases"
|
||||
"Molotov/Snatella" "https://api.github.com/repos/snatella/wine-runner-sc/releases"
|
||||
"/dev/null" "https://api.github.com/repos/gort818/wine-sc-lug/releases"
|
||||
"GloriousEggroll" "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases"
|
||||
@ -147,7 +149,7 @@ fi
|
||||
# Github repo and script version info
|
||||
repo="starcitizen-lug/lug-helper"
|
||||
releases_url="https://github.com/$repo/releases"
|
||||
current_version="v1.12"
|
||||
current_version="v1.13"
|
||||
|
||||
############################################################################
|
||||
############################################################################
|
||||
@ -1393,48 +1395,6 @@ preflight_check() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Deploy Easy Anti-Cheat Workaround
|
||||
eac_workaround() {
|
||||
# Get/set directory paths
|
||||
getdirs
|
||||
|
||||
# Set the EAC directory path and hosts modification
|
||||
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.\nThere is nothing to do!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Configure message variables
|
||||
eac_title="Easy Anti-Cheat Workaround"
|
||||
eac_hosts_formatted="$eac_hosts"
|
||||
eac_dir_formatted="$eac_dir"
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
eac_title="<b>$eac_title</b>"
|
||||
eac_hosts_formatted="<i>$eac_hosts_formatted</i>"
|
||||
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..."
|
||||
|
||||
# Use pollkit's pkexec for gui with a fallback to sudo
|
||||
if [ -x "$(command -v pkexec)" ]; then
|
||||
pkexec sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
||||
else
|
||||
sudo sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
||||
fi
|
||||
|
||||
debug_print continue "Deleting $eac_dir..."
|
||||
rm -r "$eac_dir"
|
||||
|
||||
message info "Easy Anti-Cheat workaround has been deployed!"
|
||||
fi
|
||||
}
|
||||
|
||||
# Show maintenance/troubleshooting options
|
||||
maintenance_menu() {
|
||||
# Loop the menu until the user selects quit
|
||||
@ -1653,7 +1613,6 @@ while true; do
|
||||
|
||||
# Configure the menu options
|
||||
preflight_msg="Preflight Check (System Optimization)"
|
||||
eac_msg="Deploy Easy Anti-Cheat Workaround"
|
||||
runners_msg="Manage Lutris Runners"
|
||||
dxvk_msg="Manage DXVK Versions"
|
||||
maintenance_msg="Maintenance and Troubleshooting"
|
||||
@ -1661,9 +1620,9 @@ while true; do
|
||||
quit_msg="Quit"
|
||||
|
||||
# Set the options to be displayed in the menu
|
||||
menu_options=("$preflight_msg" "$eac_msg" "$runners_msg" "$dxvk_msg" "$maintenance_msg" "$randomizer_msg" "$quit_msg")
|
||||
menu_options=("$preflight_msg" "$runners_msg" "$dxvk_msg" "$maintenance_msg" "$randomizer_msg" "$quit_msg")
|
||||
# Set the corresponding functions to be called for each of the options
|
||||
menu_actions=("preflight_check" "eac_workaround" "runner_manage" "dxvk_manage" "maintenance_menu" "referral_randomizer" "quit")
|
||||
menu_actions=("preflight_check" "runner_manage" "dxvk_manage" "maintenance_menu" "referral_randomizer" "quit")
|
||||
|
||||
# Calculate the total height the menu should be
|
||||
menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))"
|
||||
|
Reference in New Issue
Block a user