Merge pull request #391 from travis134/tyrquake-es-setup
Add Quake to emulationstation menu config and add scanner for quake games
This commit is contained in:
commit
31d62e4b65
7 changed files with 82 additions and 1 deletions
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright (C) 2022-present travis134
|
||||
|
||||
#If ThemeMaster does not exist copy ThemeMaster folder to roms/ports
|
||||
if [ ! -e "/storage/roms/build/_Scan Build Engine Games.sh" ]; then
|
||||
cp "/usr/config/game/raze/games/_Scan Build Engine Games.sh" "/storage/roms/build/_Scan Build Engine Games.sh"
|
||||
chmod +x "/storage/roms/build/_Scan Build Engine Games.sh"
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright (C) 2022-present travis134
|
||||
|
||||
. /etc/profile
|
||||
|
||||
QUAKEPATH="/storage/roms/quake"
|
||||
|
||||
clear >/dev/console
|
||||
echo "Scanning for games..." >/dev/console
|
||||
pak_files=$(find "${QUAKEPATH}" -mindepth 1 -type f -iname pak0.pak)
|
||||
echo "Adding games..." >/dev/console
|
||||
while read -r pak_file; do
|
||||
abs_path=$(dirname "${pak_file}")
|
||||
path=${abs_path#"$QUAKEPATH/"}
|
||||
filename="${path##*/}"
|
||||
if [[ "${path,,}" == *"id1"* ]]; then
|
||||
filename="Quake"
|
||||
elif [[ "${path,,}" == *"hipnotic"* ]]; then
|
||||
filename="Quake Mission Pack 1 - Scourge of Armagon"
|
||||
elif [[ "${path,,}h" == *"rogue"* ]]; then
|
||||
filename="Quake Mission Pack 2 - Dissolution of Eternity"
|
||||
elif [[ "${path,,}" == *"dopa"* ]]; then
|
||||
filename="Quake - Dimension of the Past"
|
||||
fi
|
||||
file="${QUAKEPATH}/${filename}.quake"
|
||||
cat >"${file}" <<-EOM
|
||||
PAK=${pak_file}
|
||||
-- end --
|
||||
EOM
|
||||
done <<<"${pak_files}"
|
||||
systemctl restart emustation
|
||||
clear >/dev/console
|
|
@ -45,5 +45,10 @@ pre_configure_target() {
|
|||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/lib/libretro
|
||||
mkdir -p $INSTALL/usr/config/game/tyrquake
|
||||
mkdir -p $INSTALL/usr/lib/autostart/common
|
||||
cp tyrquake_libretro.so $INSTALL/usr/lib/libretro/
|
||||
cp -rf $PKG_DIR/config/common/* $INSTALL/usr/config/game/tyrquake
|
||||
chmod 0755 $INSTALL/usr/config/game/tyrquake/games/*sh
|
||||
cp $PKG_DIR/sources/autostart/common/* $INSTALL/usr/lib/autostart/common
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright (C) 2022-present travis134
|
||||
|
||||
if [ ! -e "/storage/roms/quake/_Scan Quake Games.sh" ]; then
|
||||
cp "/usr/config/game/tyrquake/games/_Scan Quake Games.sh" "/storage/roms/quake/_Scan Quake Games.sh"
|
||||
chmod +x "/storage/roms/quake/_Scan Quake Games.sh"
|
||||
fi
|
|
@ -340,6 +340,20 @@ else
|
|||
fi
|
||||
done < "${1}"
|
||||
fi
|
||||
;;
|
||||
"quake")
|
||||
# EXT can only by quake
|
||||
EXT=${ROMNAME##*.}
|
||||
|
||||
# If its not a simple pak (extension .pak0) read the file and parse the data
|
||||
if [ ${EXT} == "quake" ]; then
|
||||
dos2unix "${1}"
|
||||
while IFS== read -r key value; do
|
||||
if [ "$key" == "PAK" ]; then
|
||||
ROMNAME="$value"
|
||||
fi
|
||||
done < "${1}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ d /storage/roms/pokemini 0755 root root - -
|
|||
d /storage/roms/psp 0755 root root - -
|
||||
d /storage/roms/pspminis 0755 root root - -
|
||||
d /storage/roms/psx 0755 root root - -
|
||||
d /storage/roms/quake 0755 root root - -
|
||||
d /storage/roms/satellaview 0755 root root - -
|
||||
d /storage/roms/saturn 0755 root root - -
|
||||
d /storage/roms/sc-3000 0755 root root - -
|
||||
|
|
|
@ -2253,6 +2253,25 @@
|
|||
</emulator>
|
||||
</emulators>
|
||||
</system>
|
||||
<system>
|
||||
<name>quake</name>
|
||||
<fullname>Quake</fullname>
|
||||
<manufacturer>id Software</manufacturer>
|
||||
<release>1996</release>
|
||||
<hardware>game engine</hardware>
|
||||
<path>/storage/roms/quake</path>
|
||||
<extension>.sh .SH .quake</extension>
|
||||
<command>/usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%"</command>
|
||||
<platform>pc</platform>
|
||||
<theme>quake</theme>
|
||||
<emulators>
|
||||
<emulator name="retroarch">
|
||||
<cores>
|
||||
<core default="true">tyrquake</core>
|
||||
</cores>
|
||||
</emulator>
|
||||
</emulators>
|
||||
</system>
|
||||
<system>
|
||||
<name>mplayer</name>
|
||||
<fullname>MPlayer</fullname>
|
||||
|
|
Loading…
Reference in a new issue