petrockblog/RetroPie-Setup — pull request #369 by joolswills (2014-07-15 17:42:22+00:00)
Title: rework the main sources/setup menus so that the control for the menus is...

... configured in retropie_packages. This allows for considerable

de-duplication, and new packages can be added without having to manually add menu entries for them.

retropie_setup.sh calls retropie_packages with the parameter init, to load the arrays with the package information. this will also
allow some de-duplication of start up code between these two scripts later.

the rp_registerFunction now takes an additional parameter after the description which is in the format

I+command

where I= the menu you want it to appear in (2=source menu, 3=setup menu)
+ or - says whether the item will be enabled or disabled by default (for the source menus which uses checkboxes)
command is optional and sets the default command to pass to retropie_packages when building. for example in the setup menu
some options use "configure".

you can add multiple menu entries. eg for SNESDev to appear in the sources menu as well as setup menu, you could use

"2+ 3+configure"

in the sources menu it would download/build/install and in the setup menu it would just configure

the next step with this could besplit/separate out the packages to their own modules and have them dynamically included, so it is even easier to add new items without
having to edit the large cumbersome rp_registerFunction list