From c193d0a417ad7956b744876281704ed25418da5c Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 8 Mar 2022 03:05:32 -0500 Subject: [PATCH 1/2] Added the ability to use a settings file. See audiogame-manager -h for details. --- audiogame-manager.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index a109226..a164b9d 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -434,6 +434,14 @@ help() { for i in "${!command[@]}" ; do echo "-${i/:/ }: ${command[${i}]}" done | sort + echo + echo "Some settings that are often used can be stored in a settings.conf file." + echo "If wanted, place it at ${configFile%/*}/settings.conf." + echo "The syntax is variable=\"value\"" + echo + echo "noCache=\"true\" # Do not keep downloaded items in the cache." + echo "norh=\"true\" # Do not install RHVoice." + echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache." exit 0 } @@ -1022,6 +1030,10 @@ for i in curl sox wget wine winetricks ; do done # Get latest news if available 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. if [[ $# -eq 0 ]]; then game_launcher From 1a826f5a7cf25e09082187146112ddbc7141ea00 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 8 Mar 2022 03:31:05 -0500 Subject: [PATCH 2/2] Improve the settings file a bit, added winedebug as an option. --- audiogame-manager.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index a164b9d..46cce1f 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -442,6 +442,7 @@ help() { echo "noCache=\"true\" # Do not keep downloaded items in the cache." echo "norh=\"true\" # Do not install RHVoice." 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 } @@ -829,6 +830,10 @@ cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager" configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf" mkdir -p "${cache}" 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 if [[ -d "${configFile%/*}/cache" ]]; then { mv -v "${configFile%/*}/cache/"* "${cache}" @@ -837,7 +842,7 @@ if [[ -d "${configFile%/*}/cache" ]]; then fi checkWinetricksUpdate="false" # Turn off debug messages -export WINEDEBUG="-all" +export WINEDEBUG="${winedebug:--all}" # Compatibility with box86 export BOX86_NOBANNER=1 # During installation, you can set winVer to the versions available. @@ -1030,10 +1035,6 @@ for i in curl sox wget wine winetricks ; do done # Get latest news if available 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. if [[ $# -eq 0 ]]; then game_launcher