Custom libretrocore isn't showing up in the setupscript
-
I made a game to learn the libretro framework and am trying to add it to the retropie_setup menu. I based my script on the dinothawr script.
my
superflappybirds.sh
looks like this:#!/usr/bin/env bash # This file is part of The RetroPie Project # # The RetroPie Project is the legal property of its developers, whose names are # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source. # # See the LICENSE.md file at the top-level directory of this distribution and # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md # rp_module_id="superflappybirds" rp_module_desc="Super Flappy Birds - Multiplayer Flappy Bird Clone" rp_module_licence="GPL3 https://raw.githubusercontent.com/IgniparousTempest/libretro-superflappybirds/master/LICENSE" rp_module_help="Checkout the wiki on my github page." rp_module_section="exp" rp_module_menus="4+" function depends_superflappybirds() { getDepends libsdl2-dev } function sources_superflappybirds() { gitPullOrClone "$md_build" https://github.com/IgniparousTempest/libretro-superflappybirds.git cmake . make md_ret_require="$md_build/liblr_superflappybirds.so" } function install_superflappybirds() { md_ret_files=( 'liblr_superflappybirds.so' 'resources' ) } function configure_superflappybirds() { setConfigRoot "ports" addPort "$md_id" "superflappybirds" "Super Flappy Birds" "$md_inst/liblr_superflappybirds.so" mkRomDir "ports/superflappybirds" ensureSystemretroconfig "ports/superflappybirds" cp -Rv "$md_inst/resources" "$romdir/ports/superflappybirds" chown $user:$user -R "$romdir/ports/superflappybirds" }
I placed the
superflappybirds.sh
in/home/pi/RetroPie-Setup/scriptmodules/libretrocores/
and restarted, ran the./retropie_setup.sh
script and my game wasn't listed under the exp submenu. I also tried puttingsuperflappybirds.sh
in/home/pi/RetroPie-Setup/scriptmodules/ports/
, but same result.Pi Model or other hardware: 3B
Power Supply used: Raspberry Pi Official Universal Power Supply 5.1V 2.5A
RetroPie Version Used: 4.4
Built From: retropie-4.4-rpi2_rpi3.img
USB Devices connected: Logitech F710 controller
Controller used: Logitech F710 controller
Error messages received: None
Guide used: https://github.com/RetroPie/RetroPie-Setup/wiki/Ports -
Works for me - FWIW I named the module
lr-sfb.sh
. -
Thanks for the quick reply.
It itsn't there for me:
Do I need to refresh somehow or is it simply a matter of putting the script in the folder and running
./retropie_setup.sh
? -
@Rincewind If your script is named
superflappybird.sh
, then it should lower down the list. -
I renamed it to
lr-sfb.sh
, I have also checked lower down the list. It isn't there. -
@Rincewind If you've edited the script on Windows, make sure the script has UNIX line endings. Other than that, as I said, I don't see a problem with the script.
-
@Rincewind first of all, it's very nice you are creating original games!
Some friendly tips for your scriptmodule in RetroPie (unfortunately this is not related to not being able to make it show in the menu, you should try @mitu's suggestion about line endings).
It is advised to separate the sources and build phases of your package. The
sources
function is responsible for fetching and (potentially) patching the source code to be compiled later bythebuild
function. So, you should separate your script like this:function sources_superflappybirds() { gitPullOrClone "$md_build" https://github.com/IgniparousTempest/libretro-superflappybirds.git } function build_superflappybirds() { cmake . make md_ret_require="$md_build/liblr_superflappybirds.so" }
Also, there is a
configure
phase that you should implement for setting up your package, i.e. set up folders, configs or add it to EmulationStation.function configure_superflappybirds() { ... }
As a reference, this is how your scriptmodule will be executed for installation:
for mode in depends sources build install configure clean; do rp_callModule "$md_idx" "$mode" || return 1 done
I strongly recommend you to take a look on the other existing scriptmodules to get an idea. Because your libretrocore doesn't load roms, I think you have a rather special package here, that should be handled like a
port
system, that uses retroarch to launch.Let us know if you have any questions ;)
-
@Rincewind said in Custom libretrocore isn't showing up in the setupscript:
Do I need to refresh somehow or is it simply a matter of putting the script in the folder and running ./retropie_setup.sh?
No need to reboot or anything, just restart
retropie_setup.sh
and it should show. -
@mitu Thank you so much. You were right. I had mixed line endings from editing it on Windows. It install and runs. It runs really slow on the Pi, but I'm sure I'll figure that out.
@hhromic I have changed my script module to include the
sources_superflappybirds
function as you have suggested. I'll also set it up under the ports folder.I am hoping to get the game added to zerojay/RetroPie-Extra repo, once it is working well.
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.