Improve the settings file a bit, added winedebug as an option.

This commit is contained in:
Storm Dragon 2022-03-08 03:31:05 -05:00
parent c193d0a417
commit 1a826f5a7c

View File

@ -442,6 +442,7 @@ help() {
echo "noCache=\"true\" # Do not keep downloaded items in the cache." echo "noCache=\"true\" # Do not keep downloaded items in the cache."
echo "norh=\"true\" # Do not install RHVoice." echo "norh=\"true\" # Do not install RHVoice."
echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache." echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache."
echo "winedebug=\"flag(s)\" # Set wine debug flags, useful for development."
exit 0 exit 0
} }
@ -829,6 +830,10 @@ cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager"
configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf" configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf"
mkdir -p "${cache}" mkdir -p "${cache}"
mkdir -p "${configFile%/*}" mkdir -p "${configFile%/*}"
# Load any arguments from settings.conf file
if [[ -r "${configFile%/*}/settings.conf" ]]; then
source "${configFile%/*}/settings.conf"
fi
# Update the cache for older versions of audiogame-manager # Update the cache for older versions of audiogame-manager
if [[ -d "${configFile%/*}/cache" ]]; then if [[ -d "${configFile%/*}/cache" ]]; then
{ mv -v "${configFile%/*}/cache/"* "${cache}" { mv -v "${configFile%/*}/cache/"* "${cache}"
@ -837,7 +842,7 @@ if [[ -d "${configFile%/*}/cache" ]]; then
fi fi
checkWinetricksUpdate="false" checkWinetricksUpdate="false"
# Turn off debug messages # Turn off debug messages
export WINEDEBUG="-all" export WINEDEBUG="${winedebug:--all}"
# Compatibility with box86 # Compatibility with box86
export BOX86_NOBANNER=1 export BOX86_NOBANNER=1
# During installation, you can set winVer to the versions available. # During installation, you can set winVer to the versions available.
@ -1030,10 +1035,6 @@ for i in curl sox wget wine winetricks ; do
done done
# Get latest news if available # Get latest news if available
check_news check_news
# Load any arguments from settings.conf file
if [[ -r "${configFile%/*}/settings.conf" ]]; then
source "${configFile%/*}/settings.conf"
fi
# With no arguments, open the game launcher. # With no arguments, open the game launcher.
if [[ $# -eq 0 ]]; then if [[ $# -eq 0 ]]; then
game_launcher game_launcher