Compare commits
10 Commits
e1dd886fab
...
b32fe6f227
Author | SHA1 | Date | |
---|---|---|---|
|
b32fe6f227 | ||
|
9e708f0bfa | ||
|
c8ec64ec52 | ||
|
97a1ebaeeb | ||
|
8220cc8742 | ||
|
ee0e72fe6d | ||
|
22b97be40a | ||
|
da13890112 | ||
549acb3445 | |||
|
5e42a45260 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
nohup.out
|
||||
/.launch/*.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
tobyVersion="7-5"
|
||||
tobyVersion="8-0"
|
||||
mkdir -p "${installPath}/doom"
|
||||
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)"
|
||||
if [[ ${#doomPath} -lt 5 ]]; then
|
||||
@ -37,16 +37,16 @@ dialog --backtitle "Linux Game manager" \
|
||||
fi
|
||||
# The url breaks the normal download function
|
||||
download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262"
|
||||
download "${ipfsGateway}/ipfs/QmRjg1GSBmVCCtPv8GRTZSjNNDMjHEXE2k5hKxoBnYMFKQ?filename=TobyAccessibilityMod_V${tobyVersion}.zip"
|
||||
download "${ipfsGateway}/ipfs/QmV1HFHH5qJMQ6RmEqL9ERngL85BUtUwFr9TgQHvqiUcBU?filename=TobyAccessibilityMod_V${tobyVersion}.zip"
|
||||
[[ -e "${cache}/DoomMetalVol6.wad" ]] && mv "${cache}/DoomMetalVol6.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}/OpMDK_ForV${tobyVersion}.zip"
|
||||
#unzip -n -d "${installPath}/doom" "${cache}/OpMDK_ForV${tobyVersion}.zip"
|
||||
cp -v "${cache}/keyshare-universal.pk3" "${installPath}/doom"
|
||||
rm -fv "${installPath}/doom/"*.{ahk,bat,exe,dll,ps1}
|
||||
if [[ -e /usr/share/doom/blasphem.wad ]]; then
|
||||
ln -s /usr/share/doom/blasphem.wad "${installPath}/doom/"
|
||||
fi
|
||||
#if [[ -e /usr/share/doom/blasphem.wad ]]; then
|
||||
#ln -s /usr/share/doom/blasphem.wad "${installPath}/doom/"
|
||||
#fi
|
||||
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
|
||||
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/"
|
8
.install/The Tornado Chicken.sh
Normal file
8
.install/The Tornado Chicken.sh
Normal file
@ -0,0 +1,8 @@
|
||||
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,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
launch_game() {
|
||||
pushd "${doomPath}"
|
||||
pushd "${gamePath}"
|
||||
#echo "exec stdbuf -oL ${gzdoom} ${@} | speak"
|
||||
exec stdbuf -oL ${gzdoom} ${@} | speak
|
||||
popd
|
||||
}
|
||||
@ -42,38 +43,46 @@ export gamePath=~/.local/games/doom
|
||||
export doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
|
||||
|
||||
# Path to gzdoom or yadoom.
|
||||
if [[ -x "yadoom" ]]; then
|
||||
export gzdoom=$(readlink -f "yadoom")
|
||||
if [[ -x "${BASH_SOURCE[0]%/*}/yadoom" ]]; then
|
||||
export gzdoom="$(readlink -f "${BASH_SOURCE[0]%/*}/yadoom")"
|
||||
else
|
||||
export gzdoom="$(command -v gzdoom)"
|
||||
fi
|
||||
|
||||
# Version of the accessibility mod
|
||||
export tobyVersion="7-5"
|
||||
export tobyVersion="8-0"
|
||||
|
||||
|
||||
# Doom Addons
|
||||
mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3"
|
||||
find "$gamePath/Addons/MENU/" -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 "Toby*.pk3"
|
||||
)
|
||||
# Heretic Addons
|
||||
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=(
|
||||
# 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.
|
||||
"TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
|
||||
# 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
|
||||
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
|
||||
# Unmodified Heretic with accessibility
|
||||
"TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
|
||||
# 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"
|
||||
)
|
||||
|
||||
@ -90,6 +99,8 @@ export antiGrepStrings=(
|
||||
'-e' 'key card'
|
||||
'-e' '^New PDA Entry:'
|
||||
'-e' "^(As |Computer Voice:|Holy|I |I've|Monorail|Sector |Ugh|What|Where)"
|
||||
'-e' 'Script warning, "'
|
||||
'-e' 'Tried to define'
|
||||
)
|
||||
|
||||
export sedStrings=('-E'
|
||||
@ -190,7 +201,7 @@ case ${buttonCode} in
|
||||
1)
|
||||
# Death match setup
|
||||
# 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" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
@ -217,7 +228,9 @@ case ${buttonCode} in
|
||||
"5" "Ocean Fortress (2-4 players)"
|
||||
"6" "Water Treatment Facility (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
|
||||
declare -a mapPlayers=(
|
||||
[1]="2 4"
|
||||
@ -227,7 +240,9 @@ case ${buttonCode} in
|
||||
[5]="2 4"
|
||||
[6]="2 4"
|
||||
[7]="2 4"
|
||||
[8]="2 4")
|
||||
[8]="2 4"
|
||||
[9]="2 4"
|
||||
[10]="2 4")
|
||||
map="$(dialog --backtitle "Select Map" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
@ -325,7 +340,7 @@ case ${buttonCode} in
|
||||
'-extratic' '-dup' '3'
|
||||
)
|
||||
fi
|
||||
pushd "${doomPath}"
|
||||
pushd "${gamePath}"
|
||||
launch_game ${gameOption} "${flags[@]}"
|
||||
;;
|
||||
0)
|
||||
|
3
.launch/The Tornado Chicken.game
Normal file
3
.launch/The Tornado Chicken.game
Normal file
@ -0,0 +1,3 @@
|
||||
check_architecture x86_64
|
||||
pushd "${installPath}/The Tornado Chicken"
|
||||
${fex}./Ttc
|
@ -152,7 +152,7 @@ desktop_launcher() {
|
||||
'Name=Linux game manager'
|
||||
'GenericName=Linux game Manager'
|
||||
'Comment=Install and launch games that are accessible to the blind'
|
||||
"Exec=${terminal} -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'nohup $(readlink -e "$0") 2> /dev/null'\""
|
||||
"Exec=${terminal} -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'pushd $(readlink -e "${0%/*}");nohup ./"${0##*/}" 2> /dev/null'\""
|
||||
'Terminal=false'
|
||||
'Type=Application'
|
||||
'StartupNotify=false'
|
||||
@ -233,15 +233,14 @@ download() {
|
||||
fi
|
||||
;;
|
||||
"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
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Add HTML check for other file types
|
||||
if file -b "${cache}/${dest}" | grep -q "HTML document" ; then
|
||||
echo "File not found: \"$i\" (HTML document probably 404)"
|
||||
downloadError=0
|
||||
downloadError=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -333,19 +332,9 @@ help() {
|
||||
|
||||
# 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
|
||||
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
|
||||
declare -a menuList
|
||||
# Get all .sh files from .install directory, excluding those starting with #, and sort them
|
||||
@ -425,11 +414,13 @@ game_removal() {
|
||||
exit 0
|
||||
fi
|
||||
# Create the menu of installed games
|
||||
local selectedGame="$(dialog --backtitle "Linux Game Manager" \
|
||||
local selectedGame
|
||||
selectedGame=$(dialog --backtitle "Linux Game Manager" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)"
|
||||
[[ $? -ne 0 ]] && exit 0
|
||||
--menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)
|
||||
exitCode=$?
|
||||
[[ $exitCode -ne 0 ]] && exit 0
|
||||
# Get the actual game file paths
|
||||
local gameName="${selectedGame##*/}"
|
||||
gameName="${gameName%.sh}"
|
||||
@ -439,12 +430,12 @@ game_removal() {
|
||||
gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)"
|
||||
gameInstallPath="${gameInstallPath#*/}"
|
||||
gameInstallPath="${installPath}/${gameInstallPath%/*}"
|
||||
if [[ -z "$gameInstallPath" ]]; then
|
||||
if [[ -z "$gameInstallPath" ]] || [[ "${gameInstallPath%%/}" == "$installPath" ]]; then
|
||||
# No install path found, just remove from list
|
||||
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
|
||||
# Remove only the .sh symlink
|
||||
rm -f "${0%/*}/.launch/${gameName}.sh" | \
|
||||
rm -fv "${0%/*}/.launch/${gameName}.sh" | \
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--progressbox "Removing game from list..." -1 -1
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user