More work on the new dialogue system. Game installers updated.

This commit is contained in:
Storm Dragon
2025-08-06 14:28:56 -04:00
parent 93f92b3c7b
commit 59d3d288da
14 changed files with 47 additions and 59 deletions

View File

@ -2,8 +2,7 @@ tobyVersion="8-0"
mkdir -p "${installPath}/doom"
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)"
if [[ ${#doomPath} -lt 5 ]]; then
dialog --backtitle "Linux Game Manager" \
--yesno "Do you want Linux Game Manager to install freedoom and gzdoom for you? If you want to do this manually, select no." -1 -1 --stdout || exit 0
ui_yesno "Linux Game Manager" "Linux Game Manager" "Do you want Linux Game Manager to install freedoom and gzdoom for you? If you want to do this manually, select no." || exit 0
if command -v yay &> /dev/null ; then
yay -Sy --noconfirm --sudoloop freedoom gzdoom freedm blasphemer-wad
elif command -v slapt-src &> /dev/null ; then
@ -13,27 +12,22 @@ if [[ ${#doomPath} -lt 5 ]]; then
sudo dnf -q -y install freedoom
sudo dnf -q -y install gzdoom
else
dialog --backtitle "Linux Game Manager" --msgbox "No supported package managers found. Please install the freedoom and gzdoom packages manually." -1 -1
ui_msgbox "Linux Game Manager" "Linux Game Manager" "No supported package managers found. Please install the freedoom and gzdoom packages manually."
exit 0
fi
fi
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
if ! [[ -e "${installPath}/doom/DoomMetalVol6.wad" ]] && ! [[ -e "${installPath}/doom/DoomMetalVol7.wad" ]]; then
alert
dialog --backtitle "Linux Game manager" \
--extra-button \
--yes-label "6" \
--no-label "7" \
--extra-label "None" \
--yesno "Would you like Doom Metal Volume 6 or 7? Use arrow keys to select your answer." \
-1 -1 --stdout
buttonCode=$?
if [[ $buttonCode -eq 0 ]]; then
download "${ipfsGateway}/ipfs/QmSzWKtP3wPvzn5GNd9F7n4RAhkFHxh2UHxXGefiAufwQW?filename=DoomMetalVol6.wad"
fi
if [[ $buttonCode -eq 1 ]]; then
download "${ipfsGateway}/ipfs/QmfXkz3tzicKGfhcYSiWUZkjkDKP2aVp53Y49n127wMr7D?filename=DoomMetalVol7.wad"
fi
alert
choice=$(ui_menu "Doom Metal Selection" "Doom Metal Selection" "Would you like Doom Metal Volume 6 or 7?" "6" "Doom Metal Volume 6" "7" "Doom Metal Volume 7" "none" "None")
case "$choice" in
"6")
download "${ipfsGateway}/ipfs/QmSzWKtP3wPvzn5GNd9F7n4RAhkFHxh2UHxXGefiAufwQW?filename=DoomMetalVol6.wad"
;;
"7")
download "${ipfsGateway}/ipfs/QmfXkz3tzicKGfhcYSiWUZkjkDKP2aVp53Y49n127wMr7D?filename=DoomMetalVol7.wad"
;;
esac
fi
# The url breaks the normal download function
download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262"