Updated Toby Doom installer and launcher.

This commit is contained in:
Storm Dragon 2024-12-26 11:37:18 -05:00
parent 549acb3445
commit da13890112
3 changed files with 33 additions and 18 deletions

View File

@ -1,4 +1,4 @@
tobyVersion="7-5" tobyVersion="8-0"
mkdir -p "${installPath}/doom" mkdir -p "${installPath}/doom"
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)" doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)"
if [[ ${#doomPath} -lt 5 ]]; then if [[ ${#doomPath} -lt 5 ]]; then
@ -44,9 +44,9 @@ unzip -n -d "${installPath}/doom" "${cache}/TobyAccessibilityMod_V${tobyVersion}
unzip -n -d "${installPath}/doom" "${cache}/OpMDK_ForV${tobyVersion}.zip" unzip -n -d "${installPath}/doom" "${cache}/OpMDK_ForV${tobyVersion}.zip"
cp -v "${cache}/keyshare-universal.pk3" "${installPath}/doom" cp -v "${cache}/keyshare-universal.pk3" "${installPath}/doom"
rm -fv "${installPath}/doom/"*.{ahk,bat,exe,dll,ps1} rm -fv "${installPath}/doom/"*.{ahk,bat,exe,dll,ps1}
if [[ -e /usr/share/doom/blasphem.wad ]]; then #if [[ -e /usr/share/doom/blasphem.wad ]]; then
ln -s /usr/share/doom/blasphem.wad "${installPath}/doom/" #ln -s /usr/share/doom/blasphem.wad "${installPath}/doom/"
fi #fi
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom" mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
cp "${installPath}/doom/TobyConfig.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" cp "${installPath}/doom/TobyConfig.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
cp "${installPath}/doom/zcajun/bots.cfg" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/" cp "${installPath}/doom/zcajun/bots.cfg" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"

View File

@ -2,6 +2,7 @@
launch_game() { launch_game() {
pushd "${doomPath}" pushd "${doomPath}"
#echo "exec stdbuf -oL ${gzdoom} ${@} | speak"
exec stdbuf -oL ${gzdoom} ${@} | speak exec stdbuf -oL ${gzdoom} ${@} | speak
popd popd
} }
@ -49,31 +50,39 @@ else
fi fi
# Version of the accessibility mod # Version of the accessibility mod
export tobyVersion="7-5" export tobyVersion="8-0"
# Doom Addons # Doom Addons
mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3" mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "Toby*.pk3"
find "$gamePath/Addons/MENU/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3" find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
) )
# Heretic Addons # Heretic Addons
mapfile -t hereticAddons < <(find "$gamePath/Addons/HERETIC/" -type f -name "TobyHeretic*.pk3" mapfile -t hereticAddons < <(find "$gamePath/Addons/HERETIC/" -type f -name "TobyHeretic*.pk3"
find "$gamePath/Addons/MENU/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3" find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
)
# Hexen Addons
mapfile -t hexenAddons < <(find "$gamePath/Addons/HEXEN/" -type f -name "TobyHexen*.pk3"
find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
) )
doomGames=( doomGames=(
# Toby demo map # Toby demo map
"TobyAccMod_V${tobyVersion}.pk3 Toby-Demo-Level.wad ${doomAddons[*]}" "Freedoom Toby Demo Map" "${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/Toby-Demo-Level.wad ${doomAddons[*]}" "Freedoom Toby Demo Map"
# Unmodified Doom with accessibility. # Unmodified Doom with accessibility.
"TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom" "${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
# Toby accessibility mods # Toby accessibility mods
"TobyAccMod_V${tobyVersion}.pk3 TobyDoomLevels.wad Toby-Doom-Level-Music-Renamer.pk3 ${doomAddons[*]}" "Freedoom Toby Delux Map Pack" "${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyDoomLevels.wad ${doomAddons[*]}" "Freedoom Toby Delux Map Pack"
# OperationMDK # OperationMDK
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK" "${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
# Unmodified Heretic with accessibility # Unmodified Heretic with accessibility
"TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic" "${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
# Heretic accessibility mods # Heretic accessibility mods
"TobyAccMod_V${tobyVersion}.pk3 TobyHereticLevels.wad ${hereticAddons[*]}" "Toby Heretic" "${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyHereticLevels.wad ${hereticAddons[*]}" "Toby Heretic"
# Unmodified Hexen with accessibility
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${hexenAddons[*]}" "Classic Hexen"
# Heretic accessibility mods
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyHexen.pk3 ${hexenAddons[*]}" "Toby Hexen"
"custom_game" "Custom Game" "custom_game" "Custom Game"
) )
@ -90,6 +99,8 @@ export antiGrepStrings=(
'-e' 'key card' '-e' 'key card'
'-e' '^New PDA Entry:' '-e' '^New PDA Entry:'
'-e' "^(As |Computer Voice:|Holy|I |I've|Monorail|Sector |Ugh|What|Where)" '-e' "^(As |Computer Voice:|Holy|I |I've|Monorail|Sector |Ugh|What|Where)"
'-e' 'Script warning, "'
'-e' 'Tried to define'
) )
export sedStrings=('-E' export sedStrings=('-E'
@ -190,7 +201,7 @@ case ${buttonCode} in
1) 1)
# Death match setup # Death match setup
# Ignore the choice of map made above # Ignore the choice of map made above
gameOption="${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/TobyDeathArena_V1-0.wad ""$gamePath/Addons/TobyV${tobVersion%%-*}_"* gameOption="${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyDeathArena_V1-5.wad ""$gamePath/Addons/DOOM/TobyV*_"*
ipAddress="$(dialog --backtitle "Deathmatch Options" \ ipAddress="$(dialog --backtitle "Deathmatch Options" \
--clear \ --clear \
--no-tags \ --no-tags \
@ -217,7 +228,9 @@ case ${buttonCode} in
"5" "Ocean Fortress (2-4 players)" "5" "Ocean Fortress (2-4 players)"
"6" "Water Treatment Facility (2-4 players)" "6" "Water Treatment Facility (2-4 players)"
"7" "Phobos Base Site 4 (2-4 players)" "7" "Phobos Base Site 4 (2-4 players)"
"8" "Hangar Bay 18 (2-4 players)") "8" "Hangar Bay 18 (2-4 players)"
"9" "Garden of Demon (2-4 players)"
"10" "Outpost 69 (2-4 players)")
# Array of how many players a given map supports in dialog rangebox syntax # Array of how many players a given map supports in dialog rangebox syntax
declare -a mapPlayers=( declare -a mapPlayers=(
[1]="2 4" [1]="2 4"
@ -227,7 +240,9 @@ case ${buttonCode} in
[5]="2 4" [5]="2 4"
[6]="2 4" [6]="2 4"
[7]="2 4" [7]="2 4"
[8]="2 4") [8]="2 4"
[9]="2 4"
[10]="2 4")
map="$(dialog --backtitle "Select Map" \ map="$(dialog --backtitle "Select Map" \
--clear \ --clear \
--no-tags \ --no-tags \

View File

@ -429,7 +429,7 @@ game_removal() {
gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)" gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)"
gameInstallPath="${gameInstallPath#*/}" gameInstallPath="${gameInstallPath#*/}"
gameInstallPath="${installPath}/${gameInstallPath%/*}" gameInstallPath="${installPath}/${gameInstallPath%/*}"
if [[ -z "$gameInstallPath" ]]; then if [[ -z "$gameInstallPath" ]] || [[ "${gameInstallPath}" == "$installPath" ]]; then
# No install path found, just remove from list # No install path found, just remove from list
dialog --backtitle "Linux Game Manager" \ dialog --backtitle "Linux Game Manager" \
--yesno "This will remove the game from your game list, but will not remove any files. Do you want to continue?" -1 -1 || exit 0 --yesno "This will remove the game from your game list, but will not remove any files. Do you want to continue?" -1 -1 || exit 0