mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-21 13:35:39 +00:00
GZDOOM: first add
This commit is contained in:
parent
4bc2359a06
commit
3b502cfb1f
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,7 +17,7 @@ backup
|
|||
.old
|
||||
tmp
|
||||
.godot
|
||||
rd-submodules/es-de/patches-tmp
|
||||
rd-submodules/es-de/patches-tmp*
|
||||
|
||||
# Python #
|
||||
##########
|
||||
|
|
33
emu-configs/parsers/gzdoom.sh
Normal file
33
emu-configs/parsers/gzdoom.sh
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
input_file="$1"
|
||||
params=""
|
||||
LOG_FILE="$rdhome/.logs/gzdoom.log"
|
||||
command='gzdoom +fluid_patchset /app/share/sounds/sf2/gzdoom.sf2 $params >> "$LOG_FILE" 2>&1'
|
||||
|
||||
# Function to log messages
|
||||
log() {
|
||||
local message="$1"
|
||||
local timestamp="$(date '+%Y-%m-%d %H:%M:%S')"
|
||||
echo "$timestamp - $message" >> "$LOG_FILE"
|
||||
echo "$timestamp - $message"
|
||||
}
|
||||
|
||||
# Check if the file is .wad or .WAD
|
||||
if [[ $input_file =~ \.wad$ || $input_file =~ \.WAD$ ]]; then
|
||||
log "Processing file: $input_file"
|
||||
exec $command
|
||||
log "Command executed with parameters: retroarch -L /app/share/libretro/cores/gzdoom_libretro.so $params"
|
||||
# Check if the file is .doom
|
||||
elif [[ $input_file =~ \.doom$ ]]; then
|
||||
log "Processing file: $input_file"
|
||||
while IFS= read -r line; do
|
||||
params+="-file $line "
|
||||
log "Added -file $line to parameters"
|
||||
done < "$input_file"
|
||||
exec $command
|
||||
log "Command executed with parameters: retroarch -L /app/share/libretro/cores/gzdoom_libretro.so -file $params"
|
||||
else
|
||||
echo "Unsupported file format. Please provide a .wad, .WAD, or .doom file."
|
||||
log "Unsupported file format: $input_file"
|
||||
fi
|
|
@ -1,79 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2021-present AmberELEC (https://github.com/AmberELEC)
|
||||
|
||||
#. /etc/profile
|
||||
|
||||
ROM="${1##*/}"
|
||||
PLATFORM="doom"
|
||||
CONF="/storage/.config/distribution/configs/distribution.conf"
|
||||
|
||||
function get_setting() {
|
||||
#We look for the setting on the ROM first, if not found we search for platform and lastly we search globally
|
||||
PAT="s|^${PLATFORM}\[\"${ROM}\"\].*${1}=\(.*\)|\1|p"
|
||||
EES=$(sed -n "${PAT}" "${CONF}" | head -1)
|
||||
|
||||
if [ -z "${EES}" ]; then
|
||||
PAT="s|^${PLATFORM}[\.-]${1}=\(.*\)|\1|p"
|
||||
EES=$(sed -n "${PAT}" "${CONF}" | head -1)
|
||||
fi
|
||||
|
||||
if [ -z "${EES}" ]; then
|
||||
PAT="s|^global[\.-].*${1}=\(.*\)|\1|p"
|
||||
EES=$(sed -n "${PAT}" "${CONF}" | head -1)
|
||||
fi
|
||||
|
||||
[ -z "${EES}" ] && EES="false"
|
||||
}
|
||||
|
||||
# Show FPS
|
||||
get_setting "show_fps"
|
||||
echo ${EES}
|
||||
if [ "${EES}" == "auto" ] || [ "${EES}" == "disabled" ] || [ "${EES}" == "false" ] || [ "${EES}" == "none" ] || [ "${EES}" == "0" ]; then
|
||||
SHOWFPS='0'
|
||||
else
|
||||
SHOWFPS='1'
|
||||
fi
|
||||
|
||||
EE_DEVICE=$(cat /storage/.config/.OS_ARCH)
|
||||
RUN_DIR="/storage/roms/doom"
|
||||
CONFIG="/storage/.config/distribution/gzdoom/gzdoom.ini"
|
||||
SAVE_DIR="/storage/roms/gamedata/gzdoom"
|
||||
|
||||
if [ ! -L "/storage/.config/gzdoom" ]
|
||||
then
|
||||
ln -sf "/storage/.config/distribution/gzdoom" "/storage/.config/gzdoom"
|
||||
fi
|
||||
|
||||
if [ ! -f "/storage/.config/distribution/gzdoom/gzdoom.ini" ]
|
||||
then
|
||||
cp -rf /usr/config/distribution/gzdoom/gzdoom.ini /storage/.config/distribution/gzdoom/
|
||||
fi
|
||||
|
||||
mkdir -p ${SAVE_DIR}
|
||||
|
||||
params=" -config ${CONFIG} -savedir ${SAVE_DIR}"
|
||||
|
||||
# EXT can be wad, WAD, iwad, IWAD, pwad, PWAD or doom
|
||||
EXT=${1#*.}
|
||||
|
||||
# If its not a simple wad (extension .doom) read the file and parse the data
|
||||
if [ ${EXT} == "doom" ]; then
|
||||
dos2unix "${1}"
|
||||
while IFS== read -r key value; do
|
||||
if [ "$key" == "IWAD" ]; then
|
||||
params+=" -iwad $value"
|
||||
fi
|
||||
if [ "$key" == "MOD" ]; then
|
||||
params+=" -file $value"
|
||||
fi
|
||||
done < "${1}"
|
||||
else
|
||||
params+=" -iwad ${1}"
|
||||
fi
|
||||
|
||||
params+=" +gl_es 1 +vid_preferbackend 3 +cl_capfps 0 +vid_fps $SHOWFPS"
|
||||
|
||||
cd "${RUN_DIR}"
|
||||
/usr/bin/gzdoom ${params} >/tmp/logs/gzdoom.log 2>&1
|
|
@ -512,6 +512,7 @@
|
|||
<fullname>Doom</fullname>
|
||||
<path>%ROMPATH%/doom</path>
|
||||
<extension>.desktop .iwad .IWAD .pk4 .PK4 .pwad .PWAD .sh .wad .WAD</extension>
|
||||
<command label="GZDoom">gzdoom.sh %ROM%</command>
|
||||
<command label="PrBoom">%EMULATOR_RETROARCH% -L %CORE_RETROARCH%/prboom_libretro.so %ROM%</command>
|
||||
<!-- <command label="PrBoom+ (Standalone)">%EMULATOR_PRBOOM-PLUS% -iwad %ROM%</command> -->
|
||||
<command label="Boom 3">%EMULATOR_RETROARCH% -L %CORE_RETROARCH%/boom3_libretro.so %ROM%</command>
|
||||
|
|
|
@ -1290,6 +1290,8 @@ modules:
|
|||
tag: v1.6.5
|
||||
commit: 3aec70b0556a8d7aed7903d1a3e4d9a18c5d1649
|
||||
|
||||
- rd-submodules/shared-modules/gzdoom/gzdoom.json
|
||||
|
||||
# SOLARUS - END
|
||||
|
||||
# External manifests end
|
||||
|
@ -1354,6 +1356,9 @@ modules:
|
|||
- ln -s /app/bin/retrodeck.sh /app/bin/retrodeck
|
||||
- ln -s /app/tools/configurator.sh /app/bin/configurator
|
||||
|
||||
# DOOM/WOLF parsers
|
||||
- cp emu-configs/parsers/*.sh ${FLATPAK_DEST}/bin
|
||||
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/XargonWan/RetroDECK.git
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9dc439300e92338d5b2bc3fc680eedd4fe1d3b0c
|
||||
Subproject commit a96821769848a711db1ed0b71883f91383e2b4ab
|
|
@ -1 +1 @@
|
|||
Subproject commit ff79306a50b484ce992d02a23e091d79fcde4cac
|
||||
Subproject commit c0d938b8f64f9e1353ef290049f66c8dcc40e46d
|
|
@ -1 +1 @@
|
|||
Subproject commit 76809270588f87c6c14df96fef2dde9a7bac84f4
|
||||
Subproject commit 55a8e460c6343229597a13e973ba4855c27a1c4c
|
Loading…
Reference in a new issue