MAME: added folder creation

This commit is contained in:
XargonWan 2024-02-26 13:47:40 +01:00
parent 5fae1b9866
commit d8f550755f

View file

@ -700,14 +700,65 @@ prepare_component() {
echo "Initializing MAME"
echo "----------------------"
# TODO: probably some of these needs to be put elsewhere
mkdir -p $saves_folder/mame-sa
mkdir -p "/var/config/mame"
mkdir -p "$saves_folder/mame-sa/nvram"
mkdir -p "$states_folder/mame-sa"
mkdir -p "$rdhome/screenshots/mame-sa"
mkdir -p "$saves_folder/mame-sa/diff"
mkdir -p "/var/config/ctrlr"
mkdir -p "/var/config/mame/ini"
mkdir -p "/var/config/mame/cfg"
mkdir -p "/var/config/mame/inp"
mkdir -p "/var/data/mame/plugin-data"
mkdir -p "/var/data/mame/hash"
mkdir -p "/var/data/mame/assets/samples"
mkdir -p "/var/data/mame/assets/artwork"
mkdir -p "/var/data/mame/assets/fonts"
mkdir -p "/var/data/mame/cheat"
mkdir -p "/var/data/mame/assets/crosshair"
mkdir -p "/var/data/mame/plugins"
mkdir -p "/var/data/mame/assets/language"
mkdir -p "/var/data/mame/assets/software"
mkdir -p "/var/data/mame/assets/comments"
mkdir -p "/var/data/mame/assets/share"
mkdir -p "/var/data/mame/dats"
mkdir -p "/var/data/mame/folders"
mkdir -p "/var/data/mame/assets/cabinets"
mkdir -p "/var/data/mame/assets/cpanel"
mkdir -p "/var/data/mame/assets/pcb"
mkdir -p "/var/data/mame/assets/flyers"
mkdir -p "/var/data/mame/assets/titles"
mkdir -p "/var/data/mame/assets/ends"
mkdir -p "/var/data/mame/assets/marquees"
mkdir -p "/var/data/mame/assets/artwork-preview"
mkdir -p "/var/data/mame/assets/bosses"
mkdir -p "/var/data/mame/assets/logo"
mkdir -p "/var/data/mame/assets/scores"
mkdir -p "/var/data/mame/assets/versus"
mkdir -p "/var/data/mame/assets/gameover"
mkdir -p "/var/data/mame/assets/howto"
mkdir -p "/var/data/mame/assets/select"
mkdir -p "/var/data/mame/assets/icons"
mkdir -p "/var/data/mame/assets/covers"
mkdir -p "/var/data/mame/assets/ui"
dir_prep "$saves_folder/mame-sa/hiscore" "/var/config/mame/hiscore"
cp -fvr "$emuconfigs/mame/"** "/var/config/mame"
sed -i 's#RETRODECKROMSDIR#'$roms_folder'#g' "/var/config/mame/*.ini"
sed -i 's#RETRODECKHOMESDIR#'$rdhome'#g' "/var/config/mame/*.ini"
sed -i 's#RETRODECKSAVESDIR#'$rdhome'#g' "/var/config/mame/*.ini"
sed -i 's#RETRODECKSTATESDIR#'$rdhome'#g' "/var/config/mame/*.ini"
cp -fvr "$emuconfigs/mame/mame.ini" "/var/config/mame"
cp -fvr "$emuconfigs/mame/ui.ini" "/var/config/mame"
cp -fvr "$emuconfigs/mame/default.cfg" "/var/config/mame"
sed -i 's#RETRODECKROMSDIR#'$roms_folder'#g' "/var/config/mame/mame.ini"
sed -i 's#RETRODECKHOMESDIR#'$rdhome'#g' "/var/config/mame/mame.ini"
sed -i 's#RETRODECKSAVESDIR#'$rdhome'#g' "/var/config/mame/mame.ini"
sed -i 's#RETRODECKSTATESDIR#'$rdhome'#g' "/var/config/mame/mame.ini"
sed -i 's#RETRODECKROMSDIR#'$roms_folder'#g' "/var/config/mame/ui.ini"
sed -i 's#RETRODECKHOMESDIR#'$rdhome'#g' "/var/config/mame/ui.ini"
sed -i 's#RETRODECKSAVESDIR#'$rdhome'#g' "/var/config/mame/ui.ini"
sed -i 's#RETRODECKSTATESDIR#'$rdhome'#g' "/var/config/mame/ui.ini"
fi
if [[ "$component" =~ ^(gzdoom|GZDOOM|all)$ ]]; then