diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 7cb346c..4807f4e 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -180,6 +180,7 @@ download() { for i in "${source[@]}" ; do local dest="${i##*/}" dest="${dest//%20/ }" + dest="${dest%\?*}" # Remove the destination file if it is empty. test -s "${cache}/${dest}" || rm -f "${cache}/${dest}" 2> /dev/null if [[ "${redownload}" == "true" ]] && [[ -e "${cache}/${dest}" ]]; then @@ -368,6 +369,7 @@ gameList=( "EmpireMUD" "End of Time" "Fantasy Story II" + "Freedoom" "Monkey Spank" "Numnastics" "Onslaught" @@ -509,6 +511,33 @@ case "${game}" in chmod +x "${installPath}/FS2_2.6_Linux/FS2.x86_64" add_launcher "${installPath}/FS2_2.6_Linux/FS2.x86_64" "-ESpeakApplication=espeak-ng" ;; + "Freedoom") + if [[ ! -d /usr/share/games/doom ]]; 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 + if command -v yay &> /dev/null ; then + yay -Sy --noconfirm freedoom gzdoom + else + dialog --backtitle "Linux Game Manager" --msgbox "No supported package managers found. Please install the freedoom and gzdoom packages manually." -1 -1 + exit 0 + fi + fi + download "https://www.dropbox.com/s/rsswh6m8hhjwp7g/Toby%20Acc%20Mod%20V5-1%20Update%20Fix.zip?dl=0" + if [[ ! -e "/usr/share/games/doom/TobyDeluxeMapPack_V5-1.pk3" ]]; then + if sudo unzip -d "/usr/share/games/doom" "${cache}/Toby Acc Mod V5-1 Update Fix.zip" ; then + mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom" + cp /usr/share/games/doom/gzdoom.ini "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/" + else + dialog --backtitle "Linux Game Manager" \ + --msgbox "Unable to extract files to /usr/share/games/doom. Please extract ${cache}/Toby Acc Mod V5-1 Update Fix.zip manually." + exit 1 + fi + fi + add_launcher "$(command -v gzdoom) /usr/share/games/doom/TobyAccModV5-1.pk3" + # Add in the Toby Mod Delux option + game="Freedoom Toby Mod Delux" + add_launcher "$(command -v gzdoom) /usr/share/games/doom/TobyDeluxeMapPack_V5-1.pk3" + ;; "Monkey Spank") git -C "${installPath}" clone --recurse-submodules https://gitlab.com/stormdragon2976/monkeyspank.git add_launcher "${installPath}/monkeyspank/monkeyspank"