Hopefully insure people using the GUI mode with audiogame-manager do not get stuck because some messages were only appearing in the terminal which may not be present at all in the GUI.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
alert() {
|
alert() {
|
||||||
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t
|
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t
|
||||||
echo
|
echo
|
||||||
read -rp "Press enter to continue." continue
|
agm_msgbox "Alert" "" "Press OK to continue."
|
||||||
}
|
}
|
||||||
|
|
||||||
check_requirements() {
|
check_requirements() {
|
||||||
@@ -23,23 +23,18 @@ check_requirements() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clear_cache() {
|
clear_cache() {
|
||||||
local answer
|
|
||||||
if [[ ! -d "${cache}" ]]; then
|
if [[ ! -d "${cache}" ]]; then
|
||||||
echo "No cache found at ${cache}."
|
agm_msgbox "Clear Cache" "" "No cache found at ${cache}."
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
while ! [[ "${answer,,}" =~ ^yes$|^no$ ]]; do
|
|
||||||
echo "This will delete all contents of ${cache}. Are you sure you want to continue?"
|
if ! agm_yesno "Clear Cache" "" "This will delete all contents of ${cache}. Are you sure you want to continue?"; then
|
||||||
echo "Please type yes or no."
|
|
||||||
echo
|
|
||||||
read -r answer
|
|
||||||
done
|
|
||||||
if [[ "$answer" == "no" ]]; then
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# All safety checks done. Delete the cache.
|
# All safety checks done. Delete the cache.
|
||||||
rm -rfv "${cache}"
|
rm -rfv "${cache}" | agm_progressbox "Clear Cache" "Deleting cache files..."
|
||||||
echo "Cache deleted."
|
agm_msgbox "Clear Cache" "" "Cache deleted."
|
||||||
}
|
}
|
||||||
|
|
||||||
download() {
|
download() {
|
||||||
|
@@ -108,7 +108,10 @@ game_removal() {
|
|||||||
source .includes/bottle.sh
|
source .includes/bottle.sh
|
||||||
get_bottle "${game[0]}"
|
get_bottle "${game[0]}"
|
||||||
|
|
||||||
read -rp "This will remove the game files for \"${game[2]}\" from the shared wine bottle. To continue press enter. To cancel press control+c. " continue
|
if ! agm_yesno "Confirm Removal" "Audio Game Removal" "Are you sure you want to remove \"${game[2]}\"?"; then
|
||||||
|
echo "Removal cancelled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
||||||
wineserver -k
|
wineserver -k
|
||||||
@@ -117,10 +120,9 @@ game_removal() {
|
|||||||
if [[ -n "$winePath" ]]; then
|
if [[ -n "$winePath" ]]; then
|
||||||
local gameDir="$(winepath "$winePath")"
|
local gameDir="$(winepath "$winePath")"
|
||||||
if [[ -d "$gameDir" ]]; then
|
if [[ -d "$gameDir" ]]; then
|
||||||
echo "Removing game directory: $gameDir"
|
rm -rfv "$gameDir" | agm_progressbox "Removing Game" "Removing \"${game[2]}\" files..."
|
||||||
rm -rf "$gameDir"
|
|
||||||
else
|
else
|
||||||
echo "Game directory not found, skipping file removal."
|
agm_msgbox "Game Removal" "" "Game directory not found, skipping file removal."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -368,6 +370,9 @@ else
|
|||||||
dialogType="yad"
|
dialogType="yad"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Source dialog interface early for progress display
|
||||||
|
source .includes/dialog-interface.sh
|
||||||
|
|
||||||
# If display isn't set assume we are launching from console and an X environment is running using display :0
|
# If display isn't set assume we are launching from console and an X environment is running using display :0
|
||||||
if [[ -z "$DISPLAY" ]]; then
|
if [[ -z "$DISPLAY" ]]; then
|
||||||
export DISPLAY=":0"
|
export DISPLAY=":0"
|
||||||
@@ -388,8 +393,7 @@ 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}"
|
||||||
rmdir -v "${configFile%/*}/cache/"; } | dialog \
|
rmdir -v "${configFile%/*}/cache/"; } | agm_progressbox "Audiogame Manager" "Updating cache, please wait..."
|
||||||
--backtitle "Audiogame Manager" --progressbox "Updating cache, please wait..." -1 -1
|
|
||||||
fi
|
fi
|
||||||
checkWinetricksUpdate="false"
|
checkWinetricksUpdate="false"
|
||||||
# Turn off debug messages
|
# Turn off debug messages
|
||||||
@@ -420,7 +424,7 @@ export nvdaControllerClientDll="${ipfsGateway}/ipfs/QmWu7YdSbKMk1Qm5DKvEA5hk1YuA
|
|||||||
# Source helper functions
|
# Source helper functions
|
||||||
source .includes/bottle.sh # Also sourced in functions that need it
|
source .includes/bottle.sh # Also sourced in functions that need it
|
||||||
source .includes/desktop.sh
|
source .includes/desktop.sh
|
||||||
source .includes/dialog-interface.sh
|
# dialog-interface.sh already sourced earlier
|
||||||
source .includes/functions.sh
|
source .includes/functions.sh
|
||||||
source .includes/help.sh
|
source .includes/help.sh
|
||||||
source .includes/update.sh
|
source .includes/update.sh
|
||||||
|
@@ -2,8 +2,17 @@
|
|||||||
|
|
||||||
export DISPLAY="${DISPLAY:-:0}"
|
export DISPLAY="${DISPLAY:-:0}"
|
||||||
|
|
||||||
read -rp "Select create account from the menu, press enter to continue." continue
|
# Source dialog interface for cross-platform compatibility
|
||||||
echo
|
source "${0%/*}/../.includes/dialog-interface.sh"
|
||||||
|
|
||||||
|
# Detect dialog interface type
|
||||||
|
if [[ -z "$DISPLAY" ]]; then
|
||||||
|
dialogType="dialog"
|
||||||
|
else
|
||||||
|
dialogType="yad"
|
||||||
|
fi
|
||||||
|
|
||||||
|
agm_msgbox "Mist World Account Creator" "" "Select create account from the menu, then press OK to continue."
|
||||||
|
|
||||||
# Read email address
|
# Read email address
|
||||||
echo "Enter email address:"
|
echo "Enter email address:"
|
||||||
|
Reference in New Issue
Block a user