12 Commits

Author SHA1 Message Date
662d78a021 Add install to command line arguments 2022-01-01 13:03:09 -05:00
d10a84c5fe Yet -_- 2022-01-01 12:56:13 -05:00
35e63f5bd5 Clarify messaging 2022-01-01 12:49:07 -05:00
f3166c77da Integrate EAC workaround from eac branch
Seems like it's going to take them a while to fix it, so
2021-12-29 18:11:33 -05:00
707211962f Rename starcitizen-lutris-install.json to lug-lutris-install.json 2021-12-28 15:59:13 -05:00
5df5cb210d Update lutris install json filename 2021-12-28 15:58:52 -05:00
bf36fc96a9 Update README.md 2021-12-28 15:42:30 -05:00
702c678716 Upload Lutris install json 2021-12-28 15:41:32 -05:00
dedefebd2d Add installer using a bundled lutris json 2021-12-28 15:40:45 -05:00
d24e8b590b Bump version 2021-12-24 14:46:38 -05:00
3daeb0b3b1 Update lug-helper.sh
fixed raw-wine repo path
2021-12-24 02:01:11 +01:00
e8c93196ff Specify license 2021-12-21 19:52:32 -05:00
3 changed files with 183 additions and 10 deletions

View File

@ -20,6 +20,9 @@ Keybinds are backed up to *$XDG_CONFIG_HOME/starcitizen-lug/keybinds/*
- Checks that the hard open file descriptors limit is set to at least 524288. - Checks that the hard open file descriptors limit is set to at least 524288.
- This limits the maximum number of open files on your system. On some Linux distributions, the default is set too low for Star Citizen. - This limits the maximum number of open files on your system. On some Linux distributions, the default is set too low for Star Citizen.
`Install Star Citizen`
- Launches Lutris and uses the bundled json to install Star Citizen
`Manage Lutris Runners` `Manage Lutris Runners`
- Quickly install and delete Lutris wine runners - Quickly install and delete Lutris wine runners

View File

@ -15,6 +15,8 @@
# - Check your system for optimal settings and # - Check your system for optimal settings and
# change them as needed to prevent crashes. # change them as needed to prevent crashes.
# #
# - Install Star Citizen using a bundled Lutris install script
#
# - Easily install and remove Lutris wine Runners and DXVK versions. # - Easily install and remove Lutris wine Runners and DXVK versions.
# #
# - Qickly wipe your Star Citizen USER folder as is recommended # - Qickly wipe your Star Citizen USER folder as is recommended
@ -46,6 +48,8 @@
# Contributor: https://github.com/Wrzlprnft # Contributor: https://github.com/Wrzlprnft
# Runner Downloader inspired by: # Runner Downloader inspired by:
# https://github.com/richardtatum/sc-runner-updater # https://github.com/richardtatum/sc-runner-updater
#
# License: GPLv3.0
############################################################################ ############################################################################
# Check if script is run as root # Check if script is run as root
@ -61,10 +65,10 @@ if [ ! -x "$(command -v curl)" ]; then
notify-send "lug-helper" "The required package 'curl' was not found on this system.\n" --icon=dialog-warning notify-send "lug-helper" "The required package 'curl' was not found on this system.\n" --icon=dialog-warning
exit 1 exit 1
fi fi
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v sort)" ]; then if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v realpath)" ] || [ ! -x "$(command -v dirname)" ]; then
# Print to stderr and also try warning the user through notify-send # Print to stderr and also try warning the user through notify-send
printf "lug-helper.sh: One or more required packages were not found on this system.\nPlease check that the following packages are installed:\n- mktemp (part of gnu coreutils)\n- basename (part of gnu coreutils)\n- sort (part of gnu coreutils)\n" 1>&2 printf "lug-helper.sh: One or more required packages were not found on this system.\nPlease check that the following coreutils packages are installed:\n- mktemp\n- sort\n- basename\n- realpath\n- dirname\n" 1>&2
notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that the following packages are installed:\n- mktemp (part of gnu coreutils)\n- basename (part of gnu coreutils)\n- sort (part of gnu coreutils)\n" --icon=dialog-warning notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that the following coreutils packages are installed:\n- mktemp\n- sort\n- basename\n- realpath\n- dirname\n" --icon=dialog-warning
exit 1 exit 1
fi fi
@ -78,6 +82,9 @@ data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
# .config subdirectory # .config subdirectory
conf_subdir="starcitizen-lug" conf_subdir="starcitizen-lug"
# Helper directory
helper_dir="$(realpath "$0" | xargs dirname)"
# Temporary directory # Temporary directory
tmp_dir="$(mktemp -d --suffix=".lughelper")" tmp_dir="$(mktemp -d --suffix=".lughelper")"
trap 'rm -r "$tmp_dir"' EXIT trap 'rm -r "$tmp_dir"' EXIT
@ -105,7 +112,7 @@ runners_dir="$data_dir/lutris/runners/wine"
# The second is expected to contain the github api releases url # The second is expected to contain the github api releases url
# ie. "RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases" # ie. "RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
runner_sources=( 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" "Molotov/Snatella" "https://api.github.com/repos/snatella/wine-runner-sc/releases"
"/dev/null" "https://api.github.com/repos/gort818/wine-sc-lug/releases" "/dev/null" "https://api.github.com/repos/gort818/wine-sc-lug/releases"
"GloriousEggroll" "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases" "GloriousEggroll" "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases"
@ -138,16 +145,19 @@ menu_option_height="25"
# Otherwise, default to the logo in the same directory # Otherwise, default to the logo in the same directory
if [ -f "/usr/share/pixmaps/lug-logo.png" ]; then if [ -f "/usr/share/pixmaps/lug-logo.png" ]; then
lug_logo="/usr/share/pixmaps/lug-logo.png" lug_logo="/usr/share/pixmaps/lug-logo.png"
elif [ -f "lug-logo.png" ]; then elif [ -f "$helper_dir/lug-logo.png" ]; then
lug_logo="lug-logo.png" lug_logo="$helper_dir/lug-logo.png"
else else
lug_logo="info" lug_logo="info"
fi fi
# Lutris install script
install_script="$helper_dir/lug-lutris-install.json"
# Github repo and script version info # Github repo and script version info
repo="starcitizen-lug/lug-helper" repo="starcitizen-lug/lug-helper"
releases_url="https://github.com/$repo/releases" releases_url="https://github.com/$repo/releases"
current_version="v1.12" current_version="v1.14"
############################################################################ ############################################################################
############################################################################ ############################################################################
@ -411,7 +421,7 @@ getdirs() {
# If we don't have the directory paths we need yet, # If we don't have the directory paths we need yet,
# ask the user to provide them # ask the user to provide them
if [ -z "$wine_prefix" ] || [ -z "$game_path" ]; then if [ -z "$wine_prefix" ] || [ -z "$game_path" ]; then
message info "At the next screen, please select your Star Citizen WINE prefix.\nIt will be remembered for future use." message info "Star Citizen must be installed before proceeding.\n\nAt the next screen, please select your Star Citizen WINE prefix.\nIt will be remembered for future use."
if [ "$use_zenity" -eq 1 ]; then if [ "$use_zenity" -eq 1 ]; then
# Using Zenity file selection menus # Using Zenity file selection menus
# Get the wine prefix directory # Get the wine prefix directory
@ -746,6 +756,23 @@ avx_check() {
#------------------------- end preflight check functions ---------------------# #------------------------- end preflight check functions ---------------------#
# Install Star Citizen using Lutris
install_game() {
# Check if Lutris is installed
if [ ! -x "$(command -v lutris)" ]; then
message warning "Lutris is required but does not appear to be installed."
return 0
fi
# Check if the install script exists
if [ ! -f "$install_script" ]; then
message warning "Lutris install script not found.\n\n$install_script\n\nIt is included in our official releases here:\n$releases_url"
return 0
fi
lutris --install "$install_script" &
message info "The installation will continue in Lutris"
}
# Delete the shaders directory # Delete the shaders directory
rm_shaders() { rm_shaders() {
# Get/Set directory paths # Get/Set directory paths
@ -1393,6 +1420,53 @@ preflight_check() {
fi fi
} }
# Deploy Easy Anti-Cheat Workaround
eac_workaround() {
# Get/set directory paths
getdirs
if [ "$?" -eq 1 ]; then
# User cancelled and wants to return to the main menu
# or there was an error
return 0
fi
# 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 yet.\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 # Show maintenance/troubleshooting options
maintenance_menu() { maintenance_menu() {
# Loop the menu until the user selects quit # Loop the menu until the user selects quit
@ -1518,6 +1592,7 @@ if [ "$#" -gt 0 ]; then
printf "Star Citizen Linux Users Group Helper Script printf "Star Citizen Linux Users Group Helper Script
Usage: lug-helper <options> Usage: lug-helper <options>
-p, --preflight-check Run system optimization checks -p, --preflight-check Run system optimization checks
-i, --install Install Star Citizen
-m, --manage-runners Install or remove Lutris runners -m, --manage-runners Install or remove Lutris runners
-k, --manage-dxvk Install or remove DXVK versions -k, --manage-dxvk Install or remove DXVK versions
-u, --delete-user-folder Delete Star Citizen USER folder, preserving keybinds -u, --delete-user-folder Delete Star Citizen USER folder, preserving keybinds
@ -1534,6 +1609,9 @@ Usage: lug-helper <options>
--preflight-check | -p ) --preflight-check | -p )
cargs+=("preflight_check") cargs+=("preflight_check")
;; ;;
--install | -i )
cargs+=("install_game")
;;
--manage-runners | -m ) --manage-runners | -m )
cargs+=("runner_manage") cargs+=("runner_manage")
;; ;;
@ -1611,6 +1689,8 @@ while true; do
# Configure the menu options # Configure the menu options
preflight_msg="Preflight Check (System Optimization)" preflight_msg="Preflight Check (System Optimization)"
install_msg="Install Star Citizen"
eac_msg="Deploy Easy Anti-Cheat Workaround"
runners_msg="Manage Lutris Runners" runners_msg="Manage Lutris Runners"
dxvk_msg="Manage DXVK Versions" dxvk_msg="Manage DXVK Versions"
maintenance_msg="Maintenance and Troubleshooting" maintenance_msg="Maintenance and Troubleshooting"
@ -1618,9 +1698,9 @@ while true; do
quit_msg="Quit" quit_msg="Quit"
# Set the options to be displayed in the menu # Set the options to be displayed in the menu
menu_options=("$preflight_msg" "$runners_msg" "$dxvk_msg" "$maintenance_msg" "$randomizer_msg" "$quit_msg") menu_options=("$preflight_msg" "$install_msg" "$eac_msg" "$runners_msg" "$dxvk_msg" "$maintenance_msg" "$randomizer_msg" "$quit_msg")
# Set the corresponding functions to be called for each of the options # Set the corresponding functions to be called for each of the options
menu_actions=("preflight_check" "runner_manage" "dxvk_manage" "maintenance_menu" "referral_randomizer" "quit") menu_actions=("preflight_check" "install_game" "eac_workaround" "runner_manage" "dxvk_manage" "maintenance_menu" "referral_randomizer" "quit")
# Calculate the total height the menu should be # Calculate the total height the menu should be
menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))" menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))"

90
lug-lutris-install.json Normal file
View File

@ -0,0 +1,90 @@
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 10872,
"game_id": 17622,
"game_slug": "star-citizen",
"name": "Star Citizen",
"year": 2016,
"user": "ungarscool1",
"runner": "wine",
"slug": "starcitizen-lutris-install",
"version": "LIVE/PTU",
"description": "Welcome to the Star Citizen installer maintained by the Star Citizen LUG!\r\nBefore continuing, please see our Quick Start Guide:\r\nhttps://github.com/starcitizen-lug/information-howtos/wiki\r\n\r\nFor help with the installer or to just hang out, we invite Linux Star Citizen players to join us: https://robertsspaceindustries.com/orgs/LUG/",
"notes": "Performance may be choppy 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!",
"created_at": "2018-11-15T17:43:07.367000Z",
"updated_at": "2021-12-24T00:49:16.775712Z",
"draft": false,
"published": true,
"published_by": 64834,
"rating": "",
"steamid": null,
"gogid": null,
"gogslug": "",
"humbleid": "",
"humblestoreid": "",
"humblestoreid_real": "",
"script": {
"files": [
{
"client": "https://install.robertsspaceindustries.com/star-citizen/RSI-Setup-1.5.4.exe"
}
],
"game": {
"arch": "win64",
"args": null,
"exe": "drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe",
"prefix": "$GAMEDIR"
},
"installer": [
{
"task": {
"arch": "win64",
"description": "Creating Wine prefix",
"name": "create_prefix",
"prefix": "$GAMEDIR"
}
},
{
"task": {
"app": "--force arial vcrun2019 win10",
"arch": "win64",
"description": "Installing dlls",
"name": "winetricks",
"prefix": "$GAMEDIR"
}
},
{
"task": {
"arch": "win64",
"args": "/S",
"description": "Installing client",
"executable": "client",
"name": "wineexec",
"prefix": "$GAMEDIR"
}
}
],
"system": {
"env": {
"DXVK_HUD": "0",
"__GL_SHADER_DISK_CACHE": 1,
"__GL_SHADER_DISK_CACHE_SIZE": "1073741824",
"__GL_THREADED_OPTIMIZATIONS": "1"
}
},
"wine": {
"dxvk": true,
"esync": true,
"overrides": {
"nvapi,nvapi64": "disabled"
},
}
},
"content": "files:\n- client: https://install.robertsspaceindustries.com/star-citizen/RSI-Setup-1.5.4.exe\ngame:\n arch: win64\n args: null\n exe: drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe\n prefix: $GAMEDIR\ninstaller:\n- task:\n arch: win64\n description: Creating Wine prefix\n name: create_prefix\n prefix: $GAMEDIR\n- task:\n app: --force arial vcrun2019 win10\n arch: win64\n description: Installing dlls\n name: winetricks\n prefix: $GAMEDIR\n- task:\n arch: win64\n args: /S\n description: Installing client\n executable: client\n name: wineexec\n prefix: $GAMEDIR\nsystem:\n env:\n DXVK_HUD: '0'\n __GL_SHADER_DISK_CACHE: 1\n __GL_SHADER_DISK_CACHE_SIZE: '1073741824'\n __GL_THREADED_OPTIMIZATIONS: '1'\nwine:\n dxvk: true\n esync: true\n overrides:\n nvapi,nvapi64: disabled\n"
}
]
}