Hi!
I want to use in the mame folder 7z packed roms, I’m using this script to unpack the file:
#!/bin/bash
gameStatus="${1}"
systemName="${2}"
emulator="${3}"
core="${4}"
fullRomPath="${5}"
romFileName=$(basename -- "$fullRomPath")
romFileName="${romFileName%.*}"
declare -p | diff "$tmpfile" -
# Case selection for first parameter parsed, our event.
case $gameStatus in
gameStart)
# Commands in here will be executed on the start of any game.
[ ! -d "/tmp/cache/" ] && mkdir /tmp/cache/
[ ! -d "/tmp/extractions/" ] && mkdir /tmp/extractions/
if [[ "${systemName}" == "mame" ]]; then
7zr x -y ${fullRomPath} -o/tmp/extractions/${romFileName}
fullRomPath="/tmp/extractions/${romFileName}"
fi
;;
gameStop)
# Commands here will be executed on the stop of every game.
if [[ "${systemName}" == "mame" ]]; then
rm -R /tmp/extractions/${romFileName}/
fi
;;
esac
tmpfile=$(mktemp)
declare -p >"$tmpfile"
The script is not finished because I want to send the new rom path to the launcher, but I don’t know how to do, I didn’t find the information in the wiki.