Compare commits
No commits in common. "b32fe6f22700ec4a391cb0382e5e25bb584874fd" and "e1dd886fab1bb2bc66cede657ce8e2fa94e2d424" have entirely different histories.
b32fe6f227
...
e1dd886fab
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
nohup.out
|
|
||||||
/.launch/*.sh
|
/.launch/*.sh
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
tobyVersion="8-0"
|
tobyVersion="7-5"
|
||||||
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
|
||||||
@ -37,16 +37,16 @@ dialog --backtitle "Linux Game manager" \
|
|||||||
fi
|
fi
|
||||||
# The url breaks the normal download function
|
# The url breaks the normal download function
|
||||||
download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262"
|
download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262"
|
||||||
download "${ipfsGateway}/ipfs/QmV1HFHH5qJMQ6RmEqL9ERngL85BUtUwFr9TgQHvqiUcBU?filename=TobyAccessibilityMod_V${tobyVersion}.zip"
|
download "${ipfsGateway}/ipfs/QmRjg1GSBmVCCtPv8GRTZSjNNDMjHEXE2k5hKxoBnYMFKQ?filename=TobyAccessibilityMod_V${tobyVersion}.zip"
|
||||||
[[ -e "${cache}/DoomMetalVol6.wad" ]] && mv "${cache}/DoomMetalVol6.wad" "${installPath}/doom"
|
[[ -e "${cache}/DoomMetalVol6.wad" ]] && mv "${cache}/DoomMetalVol6.wad" "${installPath}/doom"
|
||||||
[[ -e "${cache}/DoomMetalVol7.wad" ]] && mv "${cache}/DoomMetalVol7.wad" "${installPath}/doom"
|
[[ -e "${cache}/DoomMetalVol7.wad" ]] && mv "${cache}/DoomMetalVol7.wad" "${installPath}/doom"
|
||||||
unzip -n -d "${installPath}/doom" "${cache}/TobyAccessibilityMod_V${tobyVersion}.zip"
|
unzip -n -d "${installPath}/doom" "${cache}/TobyAccessibilityMod_V${tobyVersion}.zip"
|
||||||
#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/"
|
@ -1,8 +0,0 @@
|
|||||||
check_architecture x86_64
|
|
||||||
get_installer "Ttc v3.0 linux.zip" "https://renzivan.itch.io/the-tornado-chicken"
|
|
||||||
unzip -d "${installPath}/The Tornado Chicken" "${cache}/Ttc v3.0 linux.zip"
|
|
||||||
chmod +x "${installPath}/The Tornado Chicken/Ttc"
|
|
||||||
echo "Note: When the game first starts it will be playing very loud music with the built in suboptimal voice."
|
|
||||||
echo "You are recommended to press page down several times to turn down the music, then go to settings and enable speech with screen reader, using speech dispatcher."
|
|
||||||
echo "You may then press page up to set the music to your liking."
|
|
||||||
alert
|
|
@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
launch_game() {
|
launch_game() {
|
||||||
pushd "${gamePath}"
|
pushd "${doomPath}"
|
||||||
#echo "exec stdbuf -oL ${gzdoom} ${@} | speak"
|
|
||||||
exec stdbuf -oL ${gzdoom} ${@} | speak
|
exec stdbuf -oL ${gzdoom} ${@} | speak
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
@ -43,46 +42,38 @@ export gamePath=~/.local/games/doom
|
|||||||
export doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
|
export doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
|
||||||
|
|
||||||
# Path to gzdoom or yadoom.
|
# Path to gzdoom or yadoom.
|
||||||
if [[ -x "${BASH_SOURCE[0]%/*}/yadoom" ]]; then
|
if [[ -x "yadoom" ]]; then
|
||||||
export gzdoom="$(readlink -f "${BASH_SOURCE[0]%/*}/yadoom")"
|
export gzdoom=$(readlink -f "yadoom")
|
||||||
else
|
else
|
||||||
export gzdoom="$(command -v gzdoom)"
|
export gzdoom="$(command -v gzdoom)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Version of the accessibility mod
|
# Version of the accessibility mod
|
||||||
export tobyVersion="8-0"
|
export tobyVersion="7-5"
|
||||||
|
|
||||||
|
|
||||||
# Doom Addons
|
# Doom Addons
|
||||||
mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "Toby*.pk3"
|
mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3"
|
||||||
find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
|
find "$gamePath/Addons/MENU/" -type f -name "TobyV${tobyVersion%%-*}_*.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 "Toby*.pk3"
|
find "$gamePath/Addons/MENU/" -type f -name "TobyV${tobyVersion%%-*}_*.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
|
||||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/Toby-Demo-Level.wad ${doomAddons[*]}" "Freedoom Toby Demo Map"
|
"TobyAccMod_V${tobyVersion}.pk3 Toby-Demo-Level.wad ${doomAddons[*]}" "Freedoom Toby Demo Map"
|
||||||
# Unmodified Doom with accessibility.
|
# Unmodified Doom with accessibility.
|
||||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
|
"TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
|
||||||
# Toby accessibility mods
|
# Toby accessibility mods
|
||||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyDoomLevels.wad ${doomAddons[*]}" "Freedoom Toby Delux Map Pack"
|
"TobyAccMod_V${tobyVersion}.pk3 TobyDoomLevels.wad Toby-Doom-Level-Music-Renamer.pk3 ${doomAddons[*]}" "Freedoom Toby Delux Map Pack"
|
||||||
# OperationMDK
|
# OperationMDK
|
||||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
|
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
|
||||||
# Unmodified Heretic with accessibility
|
# Unmodified Heretic with accessibility
|
||||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
|
"TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
|
||||||
# Heretic accessibility mods
|
# Heretic accessibility mods
|
||||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyHereticLevels.wad ${hereticAddons[*]}" "Toby Heretic"
|
"TobyAccMod_V${tobyVersion}.pk3 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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -99,8 +90,6 @@ 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'
|
||||||
@ -201,7 +190,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}/Addons/MAPS/TobyDeathArena_V1-5.wad ""$gamePath/Addons/DOOM/TobyV*_"*
|
gameOption="${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/TobyDeathArena_V1-0.wad ""$gamePath/Addons/TobyV${tobVersion%%-*}_"*
|
||||||
ipAddress="$(dialog --backtitle "Deathmatch Options" \
|
ipAddress="$(dialog --backtitle "Deathmatch Options" \
|
||||||
--clear \
|
--clear \
|
||||||
--no-tags \
|
--no-tags \
|
||||||
@ -228,9 +217,7 @@ 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"
|
||||||
@ -240,9 +227,7 @@ 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 \
|
||||||
@ -340,7 +325,7 @@ case ${buttonCode} in
|
|||||||
'-extratic' '-dup' '3'
|
'-extratic' '-dup' '3'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
pushd "${gamePath}"
|
pushd "${doomPath}"
|
||||||
launch_game ${gameOption} "${flags[@]}"
|
launch_game ${gameOption} "${flags[@]}"
|
||||||
;;
|
;;
|
||||||
0)
|
0)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
check_architecture x86_64
|
|
||||||
pushd "${installPath}/The Tornado Chicken"
|
|
||||||
${fex}./Ttc
|
|
@ -152,7 +152,7 @@ desktop_launcher() {
|
|||||||
'Name=Linux game manager'
|
'Name=Linux game manager'
|
||||||
'GenericName=Linux game Manager'
|
'GenericName=Linux game Manager'
|
||||||
'Comment=Install and launch games that are accessible to the blind'
|
'Comment=Install and launch games that are accessible to the blind'
|
||||||
"Exec=${terminal} -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'pushd $(readlink -e "${0%/*}");nohup ./"${0##*/}" 2> /dev/null'\""
|
"Exec=${terminal} -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'nohup $(readlink -e "$0") 2> /dev/null'\""
|
||||||
'Terminal=false'
|
'Terminal=false'
|
||||||
'Type=Application'
|
'Type=Application'
|
||||||
'StartupNotify=false'
|
'StartupNotify=false'
|
||||||
@ -233,14 +233,15 @@ download() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"wad")
|
"wad")
|
||||||
if [[ "$(file -b --mime-type "${cache}/${dest}")" == "application/octet-stream" ]]; then
|
if [[ "$(file -b --mime-type "${cache}/${dest}")" != "application/octet-stream" ]]; then
|
||||||
downloadError=0
|
downloadError=0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Add HTML check for other file types
|
# Add HTML check for other file types
|
||||||
if file -b "${cache}/${dest}" | grep -q "HTML document" ; then
|
if file -b "${cache}/${dest}" | grep -q "HTML document" ; then
|
||||||
downloadError=1
|
echo "File not found: \"$i\" (HTML document probably 404)"
|
||||||
|
downloadError=0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -332,9 +333,19 @@ help() {
|
|||||||
|
|
||||||
# main script
|
# main script
|
||||||
|
|
||||||
|
add_launcher() {
|
||||||
|
local launchSettings="${game}|${*}"
|
||||||
|
if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then
|
||||||
|
echo "${launchSettings}" >> "${configFile}"
|
||||||
|
sort -o "${configFile}" "${configFile}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Install games
|
# Install games
|
||||||
game_installer() {
|
game_installer() {
|
||||||
|
# Get list of installed games from config file
|
||||||
|
mapfile -t installedGames < <(sed '/^$/d' "${configFile}" 2> /dev/null | cut -d '|' -f1)
|
||||||
# Create the menu of available games by reading from .install directory
|
# Create the menu of available games by reading from .install directory
|
||||||
declare -a menuList
|
declare -a menuList
|
||||||
# Get all .sh files from .install directory, excluding those starting with #, and sort them
|
# Get all .sh files from .install directory, excluding those starting with #, and sort them
|
||||||
@ -414,13 +425,11 @@ game_removal() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# Create the menu of installed games
|
# Create the menu of installed games
|
||||||
local selectedGame
|
local selectedGame="$(dialog --backtitle "Linux Game Manager" \
|
||||||
selectedGame=$(dialog --backtitle "Linux Game Manager" \
|
|
||||||
--clear \
|
--clear \
|
||||||
--no-tags \
|
--no-tags \
|
||||||
--menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)
|
--menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)"
|
||||||
exitCode=$?
|
[[ $? -ne 0 ]] && exit 0
|
||||||
[[ $exitCode -ne 0 ]] && exit 0
|
|
||||||
# Get the actual game file paths
|
# Get the actual game file paths
|
||||||
local gameName="${selectedGame##*/}"
|
local gameName="${selectedGame##*/}"
|
||||||
gameName="${gameName%.sh}"
|
gameName="${gameName%.sh}"
|
||||||
@ -430,12 +439,12 @@ 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" ]] || [[ "${gameInstallPath%%/}" == "$installPath" ]]; then
|
if [[ -z "$gameInstallPath" ]]; 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
|
||||||
# Remove only the .sh symlink
|
# Remove only the .sh symlink
|
||||||
rm -fv "${0%/*}/.launch/${gameName}.sh" | \
|
rm -f "${0%/*}/.launch/${gameName}.sh" | \
|
||||||
dialog --backtitle "Linux Game Manager" \
|
dialog --backtitle "Linux Game Manager" \
|
||||||
--progressbox "Removing game from list..." -1 -1
|
--progressbox "Removing game from list..." -1 -1
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user