Can't see new system in EmulationStation
-
@mitu Well, I've already used the "one-by-one" method, but here's what I had
function configure_godot-engine() { mkRomDir "godot-engine" local bin_files if isPlatform "x86"; then bin_files=("godot-3.0-x11-x86-32.bin" "godot-3.1-x11-x86-32.bin") elif isPlatform "aarch64"; then bin_files=("frt_094_310_arm64.bin") elif isPlatform "rpi1"; then bin_files=("frt_094_310_pi1.bin") elif isPlatform "rpi2" || isPlatform "rpi3"; then bin_files=("frt_094_310_pi2.bin") fi for i in "${!bin_files[@]}"; do addEmulator 0 "$md_id-$i" "godot-engine" "$md_inst/${bin_files[$i]} --main-pack %ROM%" done addSystem "godot-engine" "Godot" ".pck .zip" }
-
Indirect expansion will not work in a loop, is possibly how to get only one emulator.
Try using single quotation for the variables, so that it knows the expansion is protected and invariable.
and/or without the indirect reference since it will be read like
for i in godot-3.0-x11-x86-32.bin godot-3.1-x11-x86-32.bin do add emulator
-
Ignore my previous msg. Misread (and deleted it). Run with
sudo __debug=1 ./retropie_packages
etc and check what's going on. Or add some debugging manually. -
@hiulit The code you posted seems ok. I've scoured through the existing modules and I've found something similar to your case - Oricutrun. It adds a few emulators for the same system (i.e same
emulators.cfg
). Incidentally, the code has a bug (i.e. always ads a default emulator instead of using$default
).
I've run the install script and the.cfg
file is created correctly - has all the emulators' entries.Just a crazy idea - remove the
emulators.cfg
and re-run theconfigure
action for your modulesudo ./retropie_packages.sh godot-engine configure
and check again the
.cfg
file. -
@mitu @BuZz @Efriim I finally got it working! :D
local bin_file local bin_files local default local id local index local version ... some other code ... for index in "${!bin_files[@]}"; do default=0 [[ "$index" -eq "${#bin_files[@]}-1" ]] && default=1 # Default to the last item in 'bin_files'. version="${bin_files[$index]}" version="$(echo $version | cut -d'_' -f 2)" addEmulator "$default" "$md_id-$version-$id" "godot-engine" "$md_inst/${bin_files[$index]} --main-pack %ROM%" done
So it seems like the error had something to do with the
index
variable (previously it was namedi
). Either it needed to be initialized as alocal
variable or the script didn't like that it was calledi
... I really don't know. But I got it working :)Another thing that I found and maybe it's worth mentioning (and correct me if I'm wrong) is that when I run:
sudo ./retropie_packages.sh godot-engine configure
the config file:
/opt/retropie/configs/godot-engine/emulators.cfg
seems to just add the new stuff on top of the previous configs that were already there. I mean, it doesn't delete the file and creates it again with the new configs.
Shouldn't "deleting the old file and creating a new one" be the "correct" thing to do?
Thanks! :)
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.