Compare commits
No commits in common. "5b7262c6ab31c90dff10b2181a6a14780ecb2602" and "8338359f3149d3dbd075d07846aa03c5e6386932" have entirely different histories.
5b7262c6ab
...
8338359f31
|
@ -2,118 +2,128 @@
|
|||
|
||||
rom_dir=$(echo "$1" | sed -e 's/\/$//')
|
||||
sys_type="$(basename "$rom_dir")"
|
||||
ROM_PREFIX=${ROM_PREFIX:-"/storage/roms"}
|
||||
CORE_PREFIX=${CORE_PREFIX:-"/tmp/cores"}
|
||||
|
||||
case "$sys_type" in
|
||||
'nes')
|
||||
rom_ext="nes"
|
||||
core_path="$CORE_PREFIX/fceumm_libretro.so"
|
||||
core_path="/tmp/cores/fceumm_libretro.so"
|
||||
core_name="Nintendo - NES / Famicom (FCEUmm)"
|
||||
db_name="Nintendo - Nintendo Entertainment System.lpl"
|
||||
;;
|
||||
'atari2600')
|
||||
rom_ext="a26"
|
||||
core_path="$CORE_PREFIX/stella_libretro.so"
|
||||
if [ -n "$GPI_CASE" ]; then
|
||||
core_path="/tmp/cores/stella2014_libretro.so"
|
||||
core_name="Atari - 2600 (Stella 2014)"
|
||||
else
|
||||
core_path="/tmp/cores/stella_libretro.so"
|
||||
core_name="Atari - 2600 (Stella)"
|
||||
fi
|
||||
db_name="Atari - 2600.lpl"
|
||||
;;
|
||||
'atarilynx')
|
||||
rom_ext="lnx"
|
||||
core_path="$CORE_PREFIX/handy_libretro.so"
|
||||
core_path="/tmp/cores/handy_libretro.so"
|
||||
core_name="Atari - Lynx (Handy)"
|
||||
db_name="Atari - Lynx.lpl"
|
||||
;;
|
||||
'arcade')
|
||||
rom_ext="zip"
|
||||
core_path="$CORE_PREFIX/mame2003_plus_libretro.so"
|
||||
core_path="/tmp/cores/mame2003_plus_libretro.so"
|
||||
core_name="Arcade (MAME 2003-Plus)"
|
||||
db_name="MAME 2003-Plus.lpl"
|
||||
;;
|
||||
'pcengine')
|
||||
rom_ext="pce"
|
||||
core_path="$CORE_PREFIX/mednafen_supergrafx_libretro.so"
|
||||
core_path="/tmp/cores/mednafen_supergrafx_libretro.so"
|
||||
core_name="NEC - PC Engine SuperGrafx (Beetle SuperGrafx)"
|
||||
db_name="NEC - PC Engine - TurboGrafx 16.lpl"
|
||||
;;
|
||||
'gba')
|
||||
rom_ext="gba"
|
||||
core_path="$CORE_PREFIX/mgba_libretro.so"
|
||||
if [ -n "$GPI_CASE" ]; then
|
||||
core_path="/tmp/cores/gpsp_libretro.so"
|
||||
core_name="Nintendo - Game Boy Advance (gpSP)"
|
||||
else
|
||||
core_path="/tmp/cores/mgba_libretro.so"
|
||||
core_name="Nintendo - Game Boy Advance (mGBA)"
|
||||
fi
|
||||
db_name="Nintendo - Game Boy Advance.lpl"
|
||||
;;
|
||||
'gbc')
|
||||
rom_ext="gbc"
|
||||
core_path="$CORE_PREFIX/gambatte_libretro.so"
|
||||
core_path="/tmp/cores/gambatte_libretro.so"
|
||||
core_name="Nintendo - Game Boy / Color (Gambatte)"
|
||||
db_name="Nintendo - Game Boy Color.lpl"
|
||||
;;
|
||||
'gb')
|
||||
rom_ext="gb"
|
||||
core_path="$CORE_PREFIX/gambatte_libretro.so"
|
||||
core_path="/tmp/cores/gambatte_libretro.so"
|
||||
core_name="Nintendo - Game Boy / Color (Gambatte)"
|
||||
db_name="Nintendo - Game Boy.lpl"
|
||||
;;
|
||||
'n64')
|
||||
rom_ext="z64"
|
||||
core_path="$CORE_PREFIX/mupen64plus_next_libretro.so"
|
||||
core_path="/tmp/cores/mupen64plus_next_libretro.so"
|
||||
core_name="Nintendo - Nintendo 64 (Mupen64Plus-Next)"
|
||||
db_name="Nintendo - Nintendo 64.lpl"
|
||||
;;
|
||||
'snes')
|
||||
rom_ext="sfc"
|
||||
core_path="$CORE_PREFIX/snes9x_libretro.so"
|
||||
if [ -n "$GPI_CASE" ]; then
|
||||
core_path="/tmp/cores/snes9x2002_libretro.so"
|
||||
core_name="Nintendo - SNES / SFC (Snes9x 2002)"
|
||||
else
|
||||
core_path="/tmp/cores/snes9x_libretro.so"
|
||||
core_name="Nintendo - SNES / SFC (Snes9x - Current)"
|
||||
fi
|
||||
db_name="Nintendo - Super Nintendo Entertainment System.lpl"
|
||||
;;
|
||||
'ngpc')
|
||||
rom_ext="ngc"
|
||||
core_path="$CORE_PREFIX/mednafen_ngp_libretro.so"
|
||||
core_path="/tmp/cores/mednafen_ngp_libretro.so"
|
||||
core_name="SNK - Neo Geo Pocket / Color (Beetle NeoPop)"
|
||||
db_name="SNK - Neo Geo Pocket Color.lpl"
|
||||
;;
|
||||
'gamegear')
|
||||
rom_ext="gg"
|
||||
core_path="$CORE_PREFIX/genesis_plus_gx_libretro.so"
|
||||
if [ -n "$GPI_CASE" ]; then
|
||||
core_path="/tmp/cores/gearsystem_libretro.so"
|
||||
core_name="Sega - MS/GG/SG-1000 (Gearsystem)"
|
||||
else
|
||||
core_path="/tmp/cores/genesis_plus_gx_libretro.so"
|
||||
core_name="Sega - MS/GG/MD/CD (Genesis Plus GX)"
|
||||
fi
|
||||
db_name="Sega - Game Gear.lpl"
|
||||
;;
|
||||
'mastersystem')
|
||||
rom_ext="sms"
|
||||
core_path="$CORE_PREFIX/genesis_plus_gx_libretro.so"
|
||||
if [ -n "$GPI_CASE" ]; then
|
||||
core_path="/tmp/cores/picodrive_libretro.so"
|
||||
core_name="Sega - MS/MD/CD/32X (PicoDrive)"
|
||||
else
|
||||
core_path="/tmp/cores/genesis_plus_gx_libretro.so"
|
||||
core_name="Sega - MS/GG/MD/CD (Genesis Plus GX)"
|
||||
fi
|
||||
db_name="Sega - Master System - Mark III.lpl"
|
||||
;;
|
||||
'megadrive')
|
||||
rom_ext="md"
|
||||
core_path="$CORE_PREFIX/genesis_plus_gx_libretro.so"
|
||||
if [ -n "$GPI_CASE" ]; then
|
||||
core_path="/tmp/cores/picodrive_libretro.so"
|
||||
core_name="Sega - MS/MD/CD/32X (PicoDrive)"
|
||||
else
|
||||
core_path="/tmp/cores/genesis_plus_gx_libretro.so"
|
||||
core_name="Sega - MS/GG/MD/CD (Genesis Plus GX)"
|
||||
fi
|
||||
db_name="Sega - Mega Drive - Genesis.lpl"
|
||||
;;
|
||||
'psx')
|
||||
rom_ext="cue"
|
||||
core_path="$CORE_PREFIX/pcsx_rearmed_libretro.so"
|
||||
core_path="/tmp/cores/pcsx_rearmed_libretro.so"
|
||||
core_name="Sony - PlayStation (PCSX ReARMed)"
|
||||
db_name="Sony - PlayStation.lpl"
|
||||
;;
|
||||
'psp')
|
||||
rom_ext="iso"
|
||||
core_path="$CORE_PREFIX/ppsspp_libretro.so"
|
||||
core_name="Sony - PlayStation Portable (PPSSPP)"
|
||||
db_name="Sony - PlayStation Portable.lpl"
|
||||
;;
|
||||
'ws')
|
||||
rom_ext="ws"
|
||||
core_path="$CORE_PREFIX/mednafen_wswan_libretro.so"
|
||||
core_name="Bandai - WonderSwan (Beetle Cygne)"
|
||||
db_name="Bandai - WonderSwan.lpl"
|
||||
;;
|
||||
'wsc')
|
||||
rom_ext="wsc"
|
||||
core_path="$CORE_PREFIX/mednafen_wswan_libretro.so"
|
||||
core_name="Bandai - WonderSwan Color (Beetle Cygne)"
|
||||
db_name="Bandai - WonderSwan Color.lpl"
|
||||
;;
|
||||
*)
|
||||
echo "Don't recognize system for roms in $sys_type directory..."
|
||||
exit 1
|
||||
|
@ -125,6 +135,7 @@ cat > temp.json <<EOF
|
|||
"version": "1.5",
|
||||
"default_core_path": "$core_path",
|
||||
"default_core_name": "$core_name",
|
||||
"base_content_directory": ".com/assets/cores/.index-dirs",
|
||||
"label_display_mode": 0,
|
||||
"right_thumbnail_mode": 0,
|
||||
"left_thumbnail_mode": 0,
|
||||
|
@ -140,14 +151,15 @@ for rom in "$rom_dir"/*."$rom_ext"; do
|
|||
mame_name="${rom_file%.$rom_ext}"
|
||||
rom_label="$(jq -r '.[] | select(.name=="'"$mame_name"'") | .description' mame2003plusdb.json | sed 's/\( ([^)]\+)\)*$//')"
|
||||
else
|
||||
rom_label="$(echo "$rom_file" | sed 's/ \?\[[^]]\+\]//g' | sed 's/\( ([^)]\+)\)*\.[^.]\+$//')"
|
||||
|
||||
rom_label="$(echo "$rom_file" | sed -e 's/\( ([^)]\+)\)*\.[^.]\+$//')"
|
||||
fi
|
||||
rom_path="$ROM_PREFIX/$sys_type/$rom_file"
|
||||
rom_path="/storage/roms/$sys_type/$rom_file"
|
||||
cat >> temp.json <<EOF
|
||||
$comma{
|
||||
"path": "$rom_path",
|
||||
"label": "$rom_label",
|
||||
"core_path": "$core_path",
|
||||
"core_name": "$core_name",
|
||||
"crc32": "DETECT",
|
||||
"db_name": "$db_name"
|
||||
}
|
Loading…
Reference in New Issue