Libretro cores are now stored by default in the Linux partition for a few purposes:

- prevent any unintentional deletion
- users can still override the default cores by placing theirs into Libretro/cores/ (launcher scripts will search this location first)
- provide an easy way to restore the default cores: just remove yours from Libretro/cores/ and that's it!
This commit is contained in:
DrUm78 2025-03-21 18:41:33 +01:00
parent 3c71f6d2c4
commit 2e7430ffed
14 changed files with 77 additions and 13 deletions

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/picodrive_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/picodrive_libretro.so ]; then
picoarch /mnt/Libretro/cores/picodrive_libretro.so "$1"&
else
picoarch /usr/games/picodrive_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/gambatte_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/gambatte_libretro.so ]; then
picoarch /mnt/Libretro/cores/gambatte_libretro.so "$1"&
else
picoarch /usr/games/gambatte_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -5,8 +5,11 @@
# Do not use asound.conf to avoid saturated sound
rw
mv -f /etc/asound.conf /etc/asound.conf.BAK
cd ${HOME}
picoarch /mnt/Libretro/cores/gpsp_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/gpsp_libretro.so ]; then
picoarch /mnt/Libretro/cores/gpsp_libretro.so "$1"&
else
picoarch /usr/games/gpsp_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -9,7 +9,11 @@ fi
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/mednafen_lynx_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/mednafen_lynx_libretro.so ]; then
picoarch /mnt/Libretro/cores/mednafen_lynx_libretro.so "$1"&
else
picoarch /usr/games/mednafen_lynx_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/picodrive_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/picodrive_libretro.so ]; then
picoarch /mnt/Libretro/cores/picodrive_libretro.so "$1"&
else
picoarch /usr/games/picodrive_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/fceumm_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/fceumm_libretro.so ]; then
picoarch /mnt/Libretro/cores/fceumm_libretro.so "$1"&
else
picoarch /usr/games/fceumm_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/mednafen_ngp_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/mednafen_ngp_libretro.so ]; then
picoarch /mnt/Libretro/cores/mednafen_ngp_libretro.so "$1"&
else
picoarch /usr/games/mednafen_ngp_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/mednafen_supergrafx_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/mednafen_supergrafx_libretro.so ]; then
picoarch /mnt/Libretro/cores/mednafen_supergrafx_libretro.so "$1"&
else
picoarch /usr/games/mednafen_supergrafx_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/pcsx_rearmed_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/pcsx_rearmed_libretro.so ]; then
picoarch /mnt/Libretro/cores/pcsx_rearmed_libretro.so "$1"&
else
picoarch /usr/games/pcsx_rearmed_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/picodrive_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/picodrive_libretro.so ]; then
picoarch /mnt/Libretro/cores/picodrive_libretro.so "$1"&
else
picoarch /usr/games/picodrive_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/snes9x2005_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/snes9x2005_libretro.so ]; then
picoarch /mnt/Libretro/cores/snes9x2005_libretro.so "$1"&
else
picoarch /usr/games/snes9x2005_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -2,7 +2,11 @@
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
picoarch /mnt/Libretro/cores/mednafen_wswan_libretro.so "$1"&
if [ -e /mnt/Libretro/cores/mednafen_wswan_libretro.so ]; then
picoarch /mnt/Libretro/cores/mednafen_wswan_libretro.so "$1"&
else
picoarch /usr/games/mednafen_wswan_libretro.so "$1"&
fi
pid record $!
wait $!
pid erase

View File

@ -63,6 +63,18 @@ do_postinst()
rm /mnt/Emulators/wonderswan_mednafen_funkey-s.opk
rm /mnt/Applications/commander-funkey-s.opk
# Remove Libretro cores from previous location
rm /mnt/Libretro/cores/fceumm_libretro.so
rm /mnt/Libretro/cores/gambatte_libretro.so
rm /mnt/Libretro/cores/gpsp_libretro.so
rm /mnt/Libretro/cores/mednafen_lynx_libretro.so
rm /mnt/Libretro/cores/mednafen_ngp_libretro.so
rm /mnt/Libretro/cores/mednafen_supergrafx_libretro.so
rm /mnt/Libretro/cores/mednafen_wswan_libretro.so
rm /mnt/Libretro/cores/pcsx_rearmed_libretro.so
rm /mnt/Libretro/cores/picodrive_libretro.so
rm /mnt/Libretro/cores/snes9x2005_libretro.so
# Unmount Rootfs
umount ${root_mount}
if [ $? -ne 0 ]; then

View File

@ -61,12 +61,17 @@ BR2_PACKAGE_E2FSPROGS=y
# BR2_PACKAGE_E2FSPROGS_FSCK is not set
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
BR2_PACKAGE_FBGRAB=y
BR2_PACKAGE_SDL=y
BR2_PACKAGE_SDL_GFX=y
BR2_PACKAGE_SDL_IMAGE=y
BR2_PACKAGE_SDL_IMAGE_GIF=y
BR2_PACKAGE_SDL_IMAGE_JPEG=y
BR2_PACKAGE_SDL_IMAGE_PNG=y
BR2_PACKAGE_SDL_MIXER=y
BR2_PACKAGE_SDL_NET=y
BR2_PACKAGE_SDL_SOUND=y
BR2_PACKAGE_SDL_SOUND_PLAYSOUND=y
BR2_PACKAGE_SDL_TTF=y
BR2_PACKAGE_GPTFDISK=y
BR2_PACKAGE_GPTFDISK_GDISK=y
BR2_PACKAGE_GPTFDISK_SGDISK=y