mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-01 14:40:34 +00:00
Compare commits
34 Commits
v1.16
...
1ae94e9b50
Author | SHA1 | Date | |
---|---|---|---|
1ae94e9b50 | |||
747c799a8b | |||
ba907c44bf | |||
e7a3b30564 | |||
38e646578a | |||
d0dc44dcd9 | |||
9986f1fe8c | |||
bc11c184d2 | |||
02a79aa859 | |||
2eabf019a6 | |||
bdb71475a8 | |||
c627666705 | |||
65ac8ae4cd | |||
b4d9598fe5 | |||
dd81f24be3 | |||
f99fe9b996 | |||
dffa971dc1 | |||
fe1733542d | |||
d6d28f1481 | |||
eb48d00396 | |||
f072378617 | |||
d6376ff9fa | |||
28051a135a | |||
44b1332782 | |||
10c5438189 | |||
57df0a8dd9 | |||
f67c76be2e | |||
d9d58702d1 | |||
3d6e4cc367 | |||
3932fd2754 | |||
314a1ff5ea | |||
26f1377506 | |||
b71f601547 | |||
717a83a512 |
@ -63,8 +63,12 @@ Keybinds are backed up to *$XDG_CONFIG_HOME/starcitizen-lug/keybinds/*
|
|||||||
## Installation:
|
## Installation:
|
||||||
|
|
||||||
From Source:
|
From Source:
|
||||||
1. Download it!
|
1. Download it! https://github.com/starcitizen-lug/lug-helper/releases
|
||||||
2. Run it!
|
2. Extract it!
|
||||||
|
3. Run it!
|
||||||
|
|
||||||
|
Dependencies: bash, coreurtils, curl, polkit (those should be installed by default on most distributions)
|
||||||
|
Optional Dependencies: zenity (for GUI), zstd (to extract some runners)
|
||||||
|
|
||||||
Arch Linux: https://aur.archlinux.org/packages/lug-helper/
|
Arch Linux: https://aur.archlinux.org/packages/lug-helper/
|
||||||
|
|
||||||
|
117
lug-helper.sh
117
lug-helper.sh
@ -65,6 +65,12 @@ 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 zstd)" ]; then
|
||||||
|
# Print to stderr and also try warning the user through notify-send
|
||||||
|
printf "lug-helper.sh: The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" 1>&2
|
||||||
|
notify-send "lug-helper" "The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" --icon=dialog-warning
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v realpath)" ] || [ ! -x "$(command -v dirname)" ]; 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 coreutils packages are installed:\n- mktemp\n- sort\n- basename\n- realpath\n- dirname\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
|
||||||
@ -85,7 +91,7 @@ data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|||||||
conf_subdir="starcitizen-lug"
|
conf_subdir="starcitizen-lug"
|
||||||
|
|
||||||
# Helper directory
|
# Helper directory
|
||||||
helper_dir="$(realpath "$0" | xargs dirname)"
|
helper_dir="$(realpath "$0" | xargs -0 dirname)"
|
||||||
|
|
||||||
# Temporary directory
|
# Temporary directory
|
||||||
tmp_dir="$(mktemp -d --suffix=".lughelper")"
|
tmp_dir="$(mktemp -d --suffix=".lughelper")"
|
||||||
@ -102,6 +108,8 @@ install_path="drive_c/Program Files/Roberts Space Industries/$sc_base_dir"
|
|||||||
live_dir="LIVE"
|
live_dir="LIVE"
|
||||||
ptu_dir="PTU"
|
ptu_dir="PTU"
|
||||||
|
|
||||||
|
# AppData directory
|
||||||
|
appdata_path="drive_c/users/$USER/AppData/Local/Star Citizen"
|
||||||
# Remaining directory paths are set at the end of the getdirs() function
|
# Remaining directory paths are set at the end of the getdirs() function
|
||||||
|
|
||||||
######## Runners ###########################################################
|
######## Runners ###########################################################
|
||||||
@ -115,9 +123,9 @@ runners_dir="$data_dir/lutris/runners/wine"
|
|||||||
# 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/starcitizen-lug/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"
|
"/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"
|
||||||
|
"TKG" "https://api.github.com/repos/Frogging-Family/wine-tkg-git/releases"
|
||||||
)
|
)
|
||||||
|
|
||||||
######## DXVK ##############################################################
|
######## DXVK ##############################################################
|
||||||
@ -132,6 +140,7 @@ dxvk_dir="$data_dir/lutris/runtime/dxvk"
|
|||||||
dxvk_sources=(
|
dxvk_sources=(
|
||||||
"Sporif Async" "https://api.github.com/repos/Sporif/dxvk-async/releases"
|
"Sporif Async" "https://api.github.com/repos/Sporif/dxvk-async/releases"
|
||||||
"/dev/null" "https://api.github.com/repos/gort818/dxvk/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
|
# Set a maximum number of versions to display from each download url
|
||||||
@ -169,7 +178,7 @@ lug_wiki="https://github.com/starcitizen-lug/information-howtos/wiki"
|
|||||||
# 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.16"
|
current_version="v1.21"
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -346,7 +355,7 @@ menu() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Display the zenity radio button menu
|
# Display the zenity radio button menu
|
||||||
choice="$(zenity --list --radiolist --width="480" --height="$menu_height" --text="$menu_text_zenity" --title="Star Citizen LUG Helper" --hide-header --cancel-label "$cancel_label" --window-icon=$lug_logo --column="" --column="Option" "${zen_options[@]}" 2>/dev/null)"
|
choice="$(zenity --list --radiolist --width="480" --height="$menu_height" --text="$menu_text_zenity" --title="Star Citizen LUG Helper" --hide-header --cancel-label "$cancel_label" --window-icon="$lug_logo" --column="" --column="Option" "${zen_options[@]}" 2>/dev/null)"
|
||||||
|
|
||||||
# Loop through the options array to match the chosen option
|
# Loop through the options array to match the chosen option
|
||||||
matched="false"
|
matched="false"
|
||||||
@ -524,7 +533,7 @@ getdirs() {
|
|||||||
# The location within the USER directory to which the game exports keybinds
|
# The location within the USER directory to which the game exports keybinds
|
||||||
keybinds_dir="$user_dir/Controls/Mappings"
|
keybinds_dir="$user_dir/Controls/Mappings"
|
||||||
# Shaders directory
|
# Shaders directory
|
||||||
shaders_dir="$user_dir/shaders"
|
shaders_dir="$wine_prefix/$appdata_path/shaders"
|
||||||
# dxvk cache file
|
# dxvk cache file
|
||||||
dxvk_cache="$game_path/$live_or_ptu/StarCitizen.dxvk-cache"
|
dxvk_cache="$game_path/$live_or_ptu/StarCitizen.dxvk-cache"
|
||||||
# Where to store backed up keybinds
|
# Where to store backed up keybinds
|
||||||
@ -775,6 +784,15 @@ avx_check() {
|
|||||||
fi
|
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
|
# Check that the system is optimized for Star Citizen
|
||||||
preflight_check() {
|
preflight_check() {
|
||||||
# Initialize variables
|
# Initialize variables
|
||||||
@ -789,6 +807,7 @@ preflight_check() {
|
|||||||
# Call the optimization functions to perform the checks
|
# Call the optimization functions to perform the checks
|
||||||
wine_check
|
wine_check
|
||||||
memory_check
|
memory_check
|
||||||
|
swap_check
|
||||||
avx_check
|
avx_check
|
||||||
mapcount_check
|
mapcount_check
|
||||||
filelimit_check
|
filelimit_check
|
||||||
@ -902,6 +921,7 @@ lutris_restart() {
|
|||||||
# Perform post-download actions, display messages or instructions
|
# Perform post-download actions, display messages or instructions
|
||||||
# Expects the variables message_heading, post_download_msg_text,
|
# Expects the variables message_heading, post_download_msg_text,
|
||||||
# post_download_msg_italics, and downloaded_item_name
|
# post_download_msg_italics, and downloaded_item_name
|
||||||
|
# Optional: post_download_msg_more_info and post_download_msg_link
|
||||||
post_download() {
|
post_download() {
|
||||||
# Check if lutris needs to be restarted after making changes
|
# Check if lutris needs to be restarted after making changes
|
||||||
lutris_restart
|
lutris_restart
|
||||||
@ -909,12 +929,30 @@ post_download() {
|
|||||||
if [ "$display_post_download_msg" = "true" ]; then
|
if [ "$display_post_download_msg" = "true" ]; then
|
||||||
message_heading="Download Complete"
|
message_heading="Download Complete"
|
||||||
|
|
||||||
|
# Format some variables for zenity
|
||||||
if [ "$use_zenity" -eq 1 ]; then
|
if [ "$use_zenity" -eq 1 ]; then
|
||||||
message_heading="<b>$message_heading</b>"
|
message_heading="<b>$message_heading</b>"
|
||||||
post_download_msg_italics="<i>$post_download_msg_italics</i>"
|
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
|
fi
|
||||||
message info "$message_heading\n\n$post_download_msg_text\n$post_download_msg_italics\n\n$downloaded_item_name"
|
|
||||||
fi
|
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"
|
display_post_download_msg="false"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1001,6 +1039,9 @@ download_install() {
|
|||||||
*.tar.xz)
|
*.tar.xz)
|
||||||
download_name="$(basename "$download_file" .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."
|
debug_print exit "Unknown archive filetype in download_install function. Aborting."
|
||||||
;;
|
;;
|
||||||
@ -1152,7 +1193,7 @@ download_select_install() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# For runners, check GlibC version against runner requirements
|
# 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" ] || [ "$contributor_name" = "TKG" ] ); then
|
||||||
required_glibc="2.33"
|
required_glibc="2.33"
|
||||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
||||||
|
|
||||||
@ -1203,13 +1244,19 @@ download_select_install() {
|
|||||||
*.tar.xz)
|
*.tar.xz)
|
||||||
download_name="$(basename "${download_versions[i]}" .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."
|
download_name="skip"
|
||||||
|
debug_print continue "Unknown archive filetype in download_select_install function. Offending String: ${download_versions[i]}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Add the file names to the menu
|
# Add the file names to the menu
|
||||||
if [ -d "$download_dir/$download_name" ]; then
|
if [[ "$download_name" = "skip" ]] || [[ "${download_versions[i]}" = "proton"* ]] ; then # filter out other file types or proton-downloads (needed for TKG)
|
||||||
|
continue
|
||||||
|
elif [ -d "$download_dir/$download_name" ]; then
|
||||||
menu_options+=("$download_name [installed]")
|
menu_options+=("$download_name [installed]")
|
||||||
else
|
else
|
||||||
menu_options+=("$download_name")
|
menu_options+=("$download_name")
|
||||||
@ -1334,9 +1381,13 @@ runner_manage() {
|
|||||||
# A header is automatically displayed that reads: Download Complete
|
# A header is automatically displayed that reads: Download Complete
|
||||||
# msg_text is displayed below the header
|
# msg_text is displayed below the header
|
||||||
# msg_italics is displayed below that in italics when zenity is in use
|
# 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_text="Select the following runner in Lutris from the dropdown menu under:"
|
||||||
post_download_msg_italics="Configure->Runner Options->Wine version"
|
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
|
# Call the download_manage function with the above configuration
|
||||||
# The argument passed to the function is used for special handling
|
# The argument passed to the function is used for special handling
|
||||||
@ -1357,7 +1408,7 @@ dxvk_manage() {
|
|||||||
|
|
||||||
# Configure the text displayed in the menus
|
# Configure the text displayed in the menus
|
||||||
download_menu_heading="Lutris DXVK Versions"
|
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"
|
download_menu_height="140"
|
||||||
|
|
||||||
# Set the post download instructions
|
# Set the post download instructions
|
||||||
@ -1365,9 +1416,13 @@ dxvk_manage() {
|
|||||||
# A header is automatically displayed that reads: Download Complete
|
# A header is automatically displayed that reads: Download Complete
|
||||||
# msg_text is displayed below the header
|
# msg_text is displayed below the header
|
||||||
# msg_italics is displayed below that in italics when zenity is in use
|
# 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_text="Type the following DXVK name into your Lutris settings under:"
|
||||||
post_download_msg_italics="Configure->Runner Options->DXVK version"
|
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
|
# Call the download_manage function with the above configuration
|
||||||
# The argument passed to the function is used for special handling
|
# The argument passed to the function is used for special handling
|
||||||
@ -1391,9 +1446,13 @@ eac_workaround() {
|
|||||||
eac_dir="$wine_prefix/drive_c/users/$USER/AppData/Roaming/EasyAntiCheat"
|
eac_dir="$wine_prefix/drive_c/users/$USER/AppData/Roaming/EasyAntiCheat"
|
||||||
eac_hosts="127.0.0.1 modules-cdn.eac-prod.on.epicgames.com"
|
eac_hosts="127.0.0.1 modules-cdn.eac-prod.on.epicgames.com"
|
||||||
|
|
||||||
# Check if EAC is installed
|
# Check if EAC workaround is already applied
|
||||||
if [ ! -d "$eac_dir" ]; then
|
if grep "$eac_hosts" /etc/hosts; then
|
||||||
message info "Easy Anti-Cheat does not appear to be installed yet.\nThere is nothing to do!"
|
if grep "^$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 is commented out.\nNo changes have been made, please edit /etc/hosts manually!"
|
||||||
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1417,8 +1476,11 @@ eac_workaround() {
|
|||||||
sudo sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
sudo sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Delete the EAC directory if it exists
|
||||||
|
if [ -d "$eac_dir" ]; then
|
||||||
debug_print continue "Deleting $eac_dir..."
|
debug_print continue "Deleting $eac_dir..."
|
||||||
rm -r "$eac_dir"
|
rm -r "$eac_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
message info "Easy Anti-Cheat workaround has been deployed!"
|
message info "Easy Anti-Cheat workaround has been deployed!"
|
||||||
fi
|
fi
|
||||||
@ -1458,18 +1520,25 @@ rm_shaders() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sanity check
|
# Create an array containing all directories in the appdata_path
|
||||||
if [ ! -d "$shaders_dir" ]; then
|
for appdata_list in "$wine_prefix/$appdata_path"/*; do
|
||||||
message warning "Shaders directory not found. There is nothing to delete!\n\n$shaders_dir"
|
if [ -d "$appdata_list" ]; then
|
||||||
return 0
|
appdata_items+=("$appdata_list")
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Delete the shader directory
|
# Delete shaders directory in every directory beginning with "sc-alpha"
|
||||||
if message question "The following directory will be deleted:\n\n$shaders_dir\n\nDo you want to proceed?"; then
|
for (( i=0; i<"${#appdata_items[@]}"; i++ )); do
|
||||||
debug_print continue "Deleting $shaders_dir..."
|
if [[ "${appdata_items[i]}" = "$wine_prefix/$appdata_path"/sc-alpha* ]] && [[ -d "${appdata_items[i]}"/shaders ]]; then # check if the item in the array begins with sc-alpha
|
||||||
rm -r "$shaders_dir"
|
if message question "The following directory will be deleted:\n\n${appdata_items[i]}/shaders\n\nDo you want to proceed?"; then
|
||||||
|
debug_print continue "Deleting ${appdata_items[i]}/shaders..."
|
||||||
|
rm -r "${appdata_items[i]}/shaders"
|
||||||
message info "Your shaders have been deleted!"
|
message info "Your shaders have been deleted!"
|
||||||
fi
|
fi
|
||||||
|
elif [ $i = $(( "${#appdata_items[@]}" - 1 )) ]; then # display message when end of array is reached and no shaders or sc-alpha directories were found
|
||||||
|
message info "No more shader directories found"
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Delete DXVK cache
|
# Delete DXVK cache
|
||||||
@ -1535,7 +1604,7 @@ maintenance_menu() {
|
|||||||
# Get a random Penguin's Star Citizen referral code
|
# Get a random Penguin's Star Citizen referral code
|
||||||
referral_randomizer() {
|
referral_randomizer() {
|
||||||
# Populate the referral codes array
|
# Populate the referral codes array
|
||||||
referral_codes=("STAR-4TZD-6KMM" "STAR-4XM2-VM99" "STAR-2NPY-FCR2" "STAR-T9Z9-7W6P" "STAR-VLBF-W2QR" "STAR-BYR6-YHMF" "STAR-3X2H-VZMX" "STAR-BRWN-FB9T" "STAR-FG6Y-N4Q4" "STAR-VLD6-VZRG" "STAR-T9KF-LV77" "STAR-4XHB-R7RF" "STAR-9NVF-MRN7" "STAR-3Q4W-9TC3" "STAR-3SBK-7QTT" "STAR-XFBT-9TTK" "STAR-F3H9-YPHN" "STAR-BYK6-RCCL" "STAR-XCKH-W6T7" "STAR-H292-39WK" "STAR-ZRT5-PJB7" "STAR-GMBP-SH9Y" "STAR-PLWB-LMFY" "STAR-TNZN-H4ZT" "STAR-T5G5-L2GJ" "STAR-6TPV-7QH2" "STAR-THHD-TV3Y" "STAR-7ZFS-PK2L" "STAR-SRQN-43TB" "STAR-9TDG-D4H9" "STAR-BPH3-THJC" "STAR-HL3M-R5KC" "STAR-GBS5-LTVB" "STAR-CJ3Y-KZZ4" "STAR-5GRM-7HBY" "STAR-G2GX-Y2QJ" "STAR-YWY3-H4XX" "STAR-6VGM-PTKC" "STAR-T6MZ-QFHX" "STAR-T2K6-LXFW" "STAR-XN25-9CJJ" "STAR-47V3-4QGB" "STAR-YD4Z-TQZV" "STAR-XLN7-9XNJ" "STAR-N62T-2R39" "STAR-3S3D-9HXQ" "STAR-TRZF-NMCV" "STAR-TLLJ-SMG4" "STAR-MFT6-Q44H" "STAR-TZX2-TPWF")
|
referral_codes=("STAR-4TZD-6KMM" "STAR-4XM2-VM99" "STAR-2NPY-FCR2" "STAR-T9Z9-7W6P" "STAR-VLBF-W2QR" "STAR-BYR6-YHMF" "STAR-3X2H-VZMX" "STAR-BRWN-FB9T" "STAR-FG6Y-N4Q4" "STAR-VLD6-VZRG" "STAR-T9KF-LV77" "STAR-4XHB-R7RF" "STAR-9NVF-MRN7" "STAR-3Q4W-9TC3" "STAR-3SBK-7QTT" "STAR-XFBT-9TTK" "STAR-F3H9-YPHN" "STAR-BYK6-RCCL" "STAR-XCKH-W6T7" "STAR-H292-39WK" "STAR-ZRT5-PJB7" "STAR-GMBP-SH9Y" "STAR-PLWB-LMFY" "STAR-TNZN-H4ZT" "STAR-T5G5-L2GJ" "STAR-6TPV-7QH2" "STAR-THHD-TV3Y" "STAR-7ZFS-PK2L" "STAR-SRQN-43TB" "STAR-9TDG-D4H9" "STAR-BPH3-THJC" "STAR-HL3M-R5KC" "STAR-GBS5-LTVB" "STAR-CJ3Y-KZZ4" "STAR-5GRM-7HBY" "STAR-G2GX-Y2QJ" "STAR-YWY3-H4XX" "STAR-6VGM-PTKC" "STAR-T6MZ-QFHX" "STAR-T2K6-LXFW" "STAR-XN25-9CJJ" "STAR-47V3-4QGB" "STAR-YD4Z-TQZV" "STAR-XLN7-9XNJ" "STAR-N62T-2R39" "STAR-3S3D-9HXQ" "STAR-TRZF-NMCV" "STAR-TLLJ-SMG4" "STAR-MFT6-Q44H" "STAR-TZX2-TPWF" "STAR-WCHN-4ZMX")
|
||||||
# Pick a random array element. Scale a floating point number for
|
# Pick a random array element. Scale a floating point number for
|
||||||
# a more random distribution than simply calling RANDOM
|
# a more random distribution than simply calling RANDOM
|
||||||
random_code="${referral_codes[$(awk '{srand($2); print int(rand()*$1)}' <<< "${#referral_codes[@]} $RANDOM")]}"
|
random_code="${referral_codes[$(awk '{srand($2); print int(rand()*$1)}' <<< "${#referral_codes[@]} $RANDOM")]}"
|
||||||
|
@ -81,11 +81,11 @@
|
|||||||
"esync": true,
|
"esync": true,
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"nvapi,nvapi64": "disabled",
|
"nvapi,nvapi64": "disabled",
|
||||||
"libglesv2": "disabled"
|
"libglesv2": "builtin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content": "files:\n- client: https://install.robertsspaceindustries.com/star-citizen/RSI-Setup-1.5.5.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 libglesv2: disabled\n"
|
"content": "files:\n- client: https://install.robertsspaceindustries.com/star-citizen/RSI-Setup-1.5.5.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 libglesv2: builtin\n"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user