Create a custom ES system able to launch games for many systems
-
@meleu I had some time to checkout your script for creating the gamelist.xml based on existing roms, and yes, it does work, and is pretty slick! Nice that its only reading existing metadata to create the list. I've never seen 'xmlstarlet' before, more reading to do.
How is the symbolic link program going? Please let me know if you want me to run some tests.
One thing I'm discovering is that I don't have the video previews setup for ES (working fine for Attract Mode). I have a bunch of video snaps and marquees, so I don't need to scrape my games again, only point to the existing files that Attract Mode is using. Do you know if anyone has created a script to embed the video and marquee data into an existing gamelist.xml file? I went through one post with almost 600 replies (somewhat fast), and didn't see a script to add these.
-
@Howitzer99 There was a script by @Nismo, I think, using Powershell, I believe, that does that. If you search the forums for something like that, you'll get the gist of it. If you can't, do let me know (on the go at the moment). The script just adds the proper "video" tags to the gamelists, based on the rom name, and to a folder that you can change in the script. It does assume that the video name will be the same as the rom name. Oh, and it had some minor issues with game names that had "." in the middle, but you can fix those as one-offs.
-
@Howitzer99 Someone posted a tutorial on adding videos and marquees with regular expressions a few days ago but i can't find it for whatever reason.
But there is also a windows tool that can do what you want.
https://retropie.org.uk/forum/topic/9486/gengal-gamelist-xml-generator -
@EctoOne Thanks, I did see the Windows version, I should have prefaced the request that I'm looking for a linux script not windows.
-
@Howitzer99 Check my post. I ran it on a Mac, and it's a terminal script. You just need to install PowerShell for Linux.
-
@pjft Awesome, thanks, will checkout PowerShell as well.
GenGal definitely hits the request, thanks for the fast replies!
-
@Howitzer99 said in Create a custom ES system able to launch games for many systems:
How is the symbolic link program going? Please let me know if you want me to run some tests.
Almost done. I had to be away from my computers in the last few days but now I'm back. I'm going to post about it here in a couple of days. ;-)
I'm making it create the link and the respective gamelist.xml entry at the same time. So, you will just have to run this tool to accomplish these two tasks.
-
Is there a way to expand the script @meleu made for batch linking to have maybe the original system added as suffix in the link? I finally had some time to try this out and i ran into a problem when i tried to made just a SEGA system. Since i have all my Roms zipped, i ran into an issue with having the same filename inside my GameGear and MasterSystem folder. IDK if it is possible on linux but it would be great if i could links like gamename (europe)-gamegear.zip
# in this example I'm creating links for every file in gameboy directory original_system="/home/pi/RetroPie/roms/gb" destination_system="/home/pi/RetroPie/roms/nintendo" while read -r file; do ln -s "$original_system/$file" "$destination_system/$file" done < <(ls "$original_system")
-
@EctoOne the link can have any name you want. You can batch all, and then manually create those with the same name.
Or maybe wait a day or two and see the script I'm planning to release. ;-)
-
@meleu oh my! I can't wait! This must be an impressive script! Can you confirm that it will link the rom and gamelist info all in one script command? I was going to use your script to populate all of my new systems in the theme today, but now I will have to wait to see what you have in store for us!
-
@TMNTturtlguy said in Create a custom ES system able to launch games for many systems:
Can you confirm that it will link the rom and gamelist info all in one script command?
Confirmed!
Wait a little, I'm at work now and planning to finish the script this evening. ;-)
edit: I mean evening in Brazil.
-
@meleu,@pjft I just tried running GenGal, and yes it's working to add the missing video and marquees attributes to my gamelists. One problem is that it's completely overwriting the existing metadata, so how are people adding (back) the extra information that GenGal doesn't provide (game information, rating, plays, etc)?
Between GenGal and FatMatch, looks like I'm sorted for now dealing with naming issues and creating the missing metadata attributes, just need to be able to merge and it should be good.
-
@Howitzer99 as said, I don't use GenGal but a separate PowerShell script that adds those to the existing gamelists without deleting anything.
Here's the thread:
-
@TMNTturtlguy @EctoOne @Howitzer99 @mattrixk @pjft and everyone else interested in an easier way to create the symbolic links and updating the custom system gamelist.xml: I've created a "fancier" script :-)
You can see it here: https://github.com/meleu/share/blob/master/add-game-to-custom-system.sh
And get it with this command:
wget https://raw.githubusercontent.com/meleu/share/master/add-game-to-custom-system.sh chmod a+x add-game-to-custom-system.sh
Here is the
--help
output:$ ./add-game-to-custom-system.sh --help This script creates symbolic links for a custom ES system and tries to create a gamelist.xml based on already existent metadata, boxart, marquee, and video. More info here: https://retropie.org.uk/forum/post/84125 Usage: ./add-game-to-custom-system.sh -d /path/to/custom/system/directory rom1 [rom2 [romN...]]
As it gets the rom file names from command line you can use the shell wildcards, as you can see in the examples below.
adding Contra (NES) to
konami
custom system$ ./add-game-to-custom-system.sh -d ~/RetroPie/roms/konami ~/RetroPie/roms/nes/Contra\ \(USA\).zip
all gameboy games to
nintendo
custom system (as @EctoOne wants)$ ./add-game-to-custom-system.sh -d ~/RetroPie/roms/nintendo ~/RetroPie/roms/gb/*.zip
all Mega Man games to
megaman
custom system (as @meleu wants)$ ./add-game-to-custom-system.sh -d ~/RetroPie/roms/megaman ~/RetroPie/roms/{gb,gba,gbc,nes,snes,megadrive}/Mega\ Man*.zip
-
@meleu Awesome, congrats with finishing the script, and thanks for posting!
-
Once again, awesome job! Now my system looks so much cleaner without having systems that only had 1-5 games. The only thing i want to mention is that I had to edit
/opt/retropie/configs/all/emulationstation/es_systems.cfg
and NOT/etc/emulationstation/es_systems.cfg
to change what system i wanted to show up. -
@meleu Briliant work my friend!
I think we should open a new thread for that tool. I'm not very common with bash scripts ... can you show me how I can create ONE fav-system created out of one TXT file?Example content of
my_beloved_roms.txt
path to ....Mega_Man1.nes path to ....Mega_Man2.nes path to ....Mega_Man.gb .......
What command should I use to read out txt file line to line? head, ls, find?
After that I think I can pipe your script ;)
How long took it to create that? -
@EctoOne actually
~/.emulationstation
is a symbolic link to/opt/retropie/configs/all/emulationstation
. I've updated the OP with this info, thanks! -
I think we should open a new thread for that tool.
The tool is very specific to what we are doing here, also I updated the OP talking about the tool. I think we can stick in this same thread. :-)
Example content of
my_beloved_roms.txt
path to ....Mega_Man1.nes path to ....Mega_Man2.nes path to ....Mega_Man.gb .......
What command should I use to read out txt file line to line? head, ls, find?
After that I think I can pipe your script ;)Assuming each line in
my_beloved_roms.txt
is a full path to a Mega Man ROM, here is the command you need:xargs -I MY_ROM -a my_beloved_roms.txt ./add-game-to-custom-system.sh -d ~/RetroPie/roms/megaman MY_ROM
Sorry if it's not very clear, but
xargs
is the one doing the "magic" here. It might be worth reading the man page to completely understand what's happening in that command.How long took it to create that?
IMHO it's reasonably fast.
-
@meleu
You got me wrong :DHow long took it to create that?
IMHO it's reasonably fast.
I ment how many hours of work did you invest to create that script.
Thank you about the xargs
The reason for doing this is, if someone created a gamelist.xml of the best roms then a script can extract pure rom_pathes out of it and then uses your script for symlinking.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.