So I was looking around in different forums and exploring the RetroPie files myself a bit.
I want to create a menu selection under the RetroPie menu to run the save file backup. Here is what I'm thinking may work:
create an empty .rp file called
gavesave-backup.rp under
/home/pi/RetroPie/retropiemenu
create an icon and call it
gsbackup.png and save it under
~/RetroPie/retropiemenu/icons/
create an entry in the
gamelist.xml file under
/home/pi/RetroPie-Setup/scriptmodules/supplementary/retropiemenu/ directory with:
<game>
<path>./gamesave-backup.rp</path>
<name>Gamesave Backup</name>
<desc>Create a backup of all your games savefiles and save states and export them to a USB stick.</desc>
<image>~/RetroPie/retropiemenu/icons/gsbackup.png</image>
</game>
create a SH script named
gamesave-backup.sh under
/home/pi/RetroPie-Setup/scriptmodules/supplementary/ to backup SRM, STATE, and DAT files (for CaveStory gamesaves). For example:
#!/bin/bash
find . -name "*.srm" -o -name "*.state*" -o -name "*.dat" | xargs cp --parents -t /media/(name of USB drive)/
So once all that is done, it should hopefully run from the menu. I have a few concerns though.
Will it run and come back to the RetroPie menu?
Will it just go to a black screen and not come back?
What will happen if someone runs it without having the USB plugged in, or puts in another USB that doesn't have the name listed in the SH file?
Is there a better way to define the USB by mounting it first rather than specifying it by name?
Can anyone check this or give me some clarification? Thanks in advance.