GZDOOM: edited script, added config and preliminary reset function

This commit is contained in:
XargonWan 2023-11-23 16:11:55 +01:00
parent 2788beebb9
commit 7187ef3f55
6 changed files with 3551 additions and 7 deletions

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
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'
command="gzdoom +fluid_patchset /app/share/sounds/sf2/gzdoom.sf2 -config /var/config/gzdoom/gzdoom.ini $params >> "$LOG_FILE" 2>&1"
# Function to log messages
log() {
@ -16,8 +16,13 @@ log() {
# 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"
# Execute the command and check for success
if exec "$command"; then
log "Command executed successfully"
else
log "Error executing command"
fi
# Check if the file is .doom
elif [[ $input_file =~ \.doom$ ]]; then
log "Processing file: $input_file"
@ -25,8 +30,16 @@ elif [[ $input_file =~ \.doom$ ]]; then
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"
# Execute the command and check for success
if exec "$command"; then
log "Command executed successfully"
log "Expanded command:"
log "$command"
else
log "Error executing command"
log "Expanded command:"
log "$command"
fi
else
echo "Unsupported file format. Please provide a .wad, .WAD, or .doom file."
log "Unsupported file format: $input_file"

View file

@ -710,7 +710,19 @@ prepare_emulator() {
echo "----------------------"
mkdir -p "/var/config/mame"
mkdir -p "$emuconfigs/mame/**" "/var/config/mame"
cp -fvr "$emuconfigs/mame/**" "/var/config/mame"
fi
if [[ "$emulator" =~ ^(gzdoom|GZDOOM|all)$ ]]; then
# TODO: do a proper script
# This is just a placeholder script to test the emulator's flow
echo "----------------------"
echo "Initializing GZDOOM"
echo "----------------------"
mkdir -p "/var/config/gzdoom"
cp -fvr "$emuconfigs/gzdoom/gzdoom.ini" "/var/config/gzdoom"
fi

View file

@ -1357,7 +1357,7 @@ modules:
- ln -s /app/tools/configurator.sh /app/bin/configurator
# DOOM/WOLF parsers
- cp emu-configs/parsers/*.sh ${FLATPAK_DEST}/bin
- cp emu-configs/gzdoom/*.sh ${FLATPAK_DEST}/bin
sources:
- type: git

View file

@ -72,6 +72,7 @@ source /app/libexec/global.sh
# - Reset Citra
# - Reset Dolphin
# - Reset Duckstation
# - Reset GZDoom
# - Reset MelonDS
# - Reset PCSX2
# - Reset PPSSPP