mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-15 18:30:35 +00:00
Compare commits
6 Commits
7cc4cca62d
...
7426d0ffb3
Author | SHA1 | Date | |
---|---|---|---|
|
7426d0ffb3 | ||
|
1cb9eb6488 | ||
|
a8c4257430 | ||
|
b2f542e029 | ||
|
17b1bfe140 | ||
|
f19faa8235 |
13
README.md
13
README.md
@ -43,8 +43,8 @@ Keybinds are backed up to *$XDG_CONFIG_HOME/starcitizen-lug/keybinds/*
|
|||||||
- To re-import your keybinds from within the game, select them from the list:
|
- To re-import your keybinds from within the game, select them from the list:
|
||||||
- *Options->Keybindings->Control Profiles*
|
- *Options->Keybindings->Control Profiles*
|
||||||
|
|
||||||
- `Delete my shaders folder only`
|
- `Delete my shaders`
|
||||||
- Sometimes all you need to do between major version updates is delete your shaders directory.
|
- It is recommended to delete your shaders directory after each game update.
|
||||||
|
|
||||||
- `Delete my DXVK cache`
|
- `Delete my DXVK cache`
|
||||||
- A troubleshooting step that sometimes helps fix various issues and crashes.
|
- A troubleshooting step that sometimes helps fix various issues and crashes.
|
||||||
@ -55,6 +55,9 @@ Keybinds are backed up to *$XDG_CONFIG_HOME/starcitizen-lug/keybinds/*
|
|||||||
- `Reset Helper configs`
|
- `Reset Helper configs`
|
||||||
- Delete the configs saved by the helper in *$XDG_CONFIG_HOME/starcitizen-lug/*
|
- Delete the configs saved by the helper in *$XDG_CONFIG_HOME/starcitizen-lug/*
|
||||||
|
|
||||||
|
- `Show the LUG Wiki`
|
||||||
|
- Display a link to the LUG Wiki for help with installation and troubleshooting
|
||||||
|
|
||||||
`Get a random Penguin's Star Citizen referral code`
|
`Get a random Penguin's Star Citizen referral code`
|
||||||
- Display a referral code for a random member of the Star Citizen Linux Users Group.
|
- Display a referral code for a random member of the Star Citizen Linux Users Group.
|
||||||
|
|
||||||
@ -67,11 +70,11 @@ From Source:
|
|||||||
2. Extract it!
|
2. Extract it!
|
||||||
3. Run 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/
|
||||||
|
|
||||||
|
_Dependencies: **bash**, **coreutils**, **curl**, **polkit** (these should be installed by default on most distributions)_
|
||||||
|
_Optional Dependencies: **zenity** (for GUI), **zstd** (to extract some runners)_
|
||||||
|
|
||||||
## Contributors:
|
## Contributors:
|
||||||
- https://github.com/Termuellinator
|
- https://github.com/Termuellinator
|
||||||
- https://github.com/pstn
|
- https://github.com/pstn
|
||||||
|
@ -108,8 +108,12 @@ 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
|
# Location in the WINE prefix where shaders are stored
|
||||||
appdata_path="drive_c/users/$USER/AppData/Local/Star Citizen"
|
appdata_path="drive_c/users/$USER/AppData/Local/Star Citizen"
|
||||||
|
|
||||||
|
# The shaders subdirectory name
|
||||||
|
shaders_subdir="shaders"
|
||||||
|
|
||||||
# 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 ###########################################################
|
||||||
@ -125,7 +129,6 @@ runner_sources=(
|
|||||||
"RawFox" "https://api.github.com/repos/starcitizen-lug/raw-wine/releases"
|
"RawFox" "https://api.github.com/repos/starcitizen-lug/raw-wine/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 ##############################################################
|
||||||
@ -178,7 +181,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.21"
|
current_version="v1.22"
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -533,7 +536,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="$wine_prefix/$appdata_path/shaders"
|
shaders_dir="$wine_prefix/$appdata_path"
|
||||||
# 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
|
||||||
@ -584,7 +587,7 @@ display_dirs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Save exported keybinds, wipe the USER directory, and restore keybinds
|
# Save exported keybinds, wipe the USER directory, and restore keybinds
|
||||||
sanitize() {
|
rm_userdir() {
|
||||||
# Prompt user to back up the current keybinds in the game
|
# Prompt user to back up the current keybinds in the game
|
||||||
message info "Before proceeding, please be sure you have exported\nyour Star Citizen keybinds from within the game.\n\nTo do this, launch the game and go to:\nOptions->Keybindings->Control Profiles->Save Control Settings\n\nGo on; I'll wait."
|
message info "Before proceeding, please be sure you have exported\nyour Star Citizen keybinds from within the game.\n\nTo do this, launch the game and go to:\nOptions->Keybindings->Control Profiles->Save Control Settings\n\nGo on; I'll wait."
|
||||||
|
|
||||||
@ -1532,26 +1535,19 @@ rm_shaders() {
|
|||||||
# User cancelled and wants to return to the main menu, or error
|
# User cancelled and wants to return to the main menu, or error
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create an array containing all directories in the appdata_path
|
# Loop through all possible shader directories
|
||||||
for appdata_list in "$wine_prefix/$appdata_path"/*; do
|
for appdata_dir in "$shaders_dir"/*; do
|
||||||
if [ -d "$appdata_list" ]; then
|
if [ -d "$appdata_dir/$shaders_subdir" ]; then
|
||||||
appdata_items+=("$appdata_list")
|
# 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"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Delete shaders directory in every directory beginning with "sc-alpha"
|
message info "All shaders have been deleted"
|
||||||
for (( i=0; i<"${#appdata_items[@]}"; i++ )); do
|
|
||||||
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
|
|
||||||
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!"
|
|
||||||
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
|
||||||
@ -1590,8 +1586,8 @@ maintenance_menu() {
|
|||||||
|
|
||||||
# Configure the menu options
|
# Configure the menu options
|
||||||
version_msg="Switch the Helper between LIVE and PTU (Currently: $live_or_ptu)"
|
version_msg="Switch the Helper between LIVE and PTU (Currently: $live_or_ptu)"
|
||||||
sanitize_msg="Delete my Star Citizen USER folder and preserve my keybinds"
|
userdir_msg="Delete my Star Citizen USER folder and preserve my keybinds"
|
||||||
shaders_msg="Delete my shaders folder only (Do this after each game update)"
|
shaders_msg="Delete my shaders (Do this after each game update)"
|
||||||
vidcache_msg="Delete my DXVK cache"
|
vidcache_msg="Delete my DXVK cache"
|
||||||
dirs_msg="Display Helper and Star Citizen directories"
|
dirs_msg="Display Helper and Star Citizen directories"
|
||||||
wiki_msg="Show the LUG Wiki"
|
wiki_msg="Show the LUG Wiki"
|
||||||
@ -1599,9 +1595,9 @@ maintenance_menu() {
|
|||||||
quit_msg="Return to the main menu"
|
quit_msg="Return to the main menu"
|
||||||
|
|
||||||
# Set the options to be displayed in the menu
|
# Set the options to be displayed in the menu
|
||||||
menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$wiki_msg" "$reset_msg" "$quit_msg")
|
menu_options=("$version_msg" "$userdir_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$wiki_msg" "$reset_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=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "display_dirs" "display_wiki" "reset_helper" "menu_loop_done")
|
menu_actions=("set_version" "rm_userdir" "rm_shaders" "rm_dxvkcache" "display_dirs" "display_wiki" "reset_helper" "menu_loop_done")
|
||||||
|
|
||||||
# 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))"
|
||||||
@ -1717,7 +1713,7 @@ Usage: lug-helper <options>
|
|||||||
cargs+=("dxvk_manage")
|
cargs+=("dxvk_manage")
|
||||||
;;
|
;;
|
||||||
--delete-user-folder | -u )
|
--delete-user-folder | -u )
|
||||||
cargs+=("sanitize")
|
cargs+=("rm_userdir")
|
||||||
;;
|
;;
|
||||||
--delete-shaders | -s )
|
--delete-shaders | -s )
|
||||||
cargs+=("rm_shaders")
|
cargs+=("rm_shaders")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user