[dev] Little Favourite Launcher (lfl) v.085 - User Menu release
-
lfl-create the FAVOURITE Creater for RetroPie
... and of course it can launch the FAVOURITES
coded by cyperghost
06/21/17Get all versions on GitHub
DOWNLOAD HERE
Source Code Pastebin
How does it looks like?
Like a folder with FAVs inside ... Sorted by system :D
What is this now? Tell me!
A small tutorial with pictures I've written here
This piece of software automatically creates favourites to your beloved ROMs and store it in your favourite folder.
All you need to tell lfl-create is
- Where are your Favourites stored?
- What ROM do you want to run?
- What is the systems name?
- What cmdline is used to run a ROM (optional as last ressort if nothing works!)
So if you tell lfl-create you want to favourise Tetris for GB then do it like this.
./lfl-create "/home/pi/RetroPie/roms/My Favourites" "/home/pi/RetroPie/roms/gb/Tetris (JUE) 1.1.gb" "gb"
After this a FAV file is created into folder My Favourites and it is named
GB - Tetris (JUE) 1.1.FAV
What are FAV files?
FAV is a creation by me. In old old old times as the internet was empty space it was used to be good style to use description and info files on BB-systems. You could read them and later (during night) you activated a download to get the software you wanted. The DIZ and NFO files were a short description of the distributor of the software and also offered version number, system depedencies and other useful information.
The the retro idea was born to use description files for a favourite launcher system.
If we open that file every information is introduced here
First line gives the full ROM-path Second line gives system Name Third line gives command call - this is only for deep digging if there is a failure /home/pi/RetroPie/roms/gb/Tetris (JUE) 1.1.gb gb (empty)
The name lfl-create is indeed a bit misleading! It's not just a creator it is also a lauchner and is able to decode the FAV files and run them
like theruncommand.sh
does.Prerequisite #1
Push RetroPie-Setup to version 4.2.8 (version from 06/16/17)
Go to RetroPie menu and select and run "RetroPie Setup", Update RetroPie-Setup
This will cause to get a "User Menu" in runcommand.sh if we press a button during the grey loading box appears....Prerequisite #2
Create a system "My Favourites" in es_system.cfg
Therefore edites_systems.cfg
in path/etc/emulationstation/
and add code block vianano /etc/emulationstation/es_systems.cfg
<system> <name>favourites</name> <fullname>Favourites</fullname> <path>/home/pi/RetroPie/roms/My Favourites</path> <extension>.fav .FAV</extension> <command>/opt/retropie/supplementary/runcommand/lfl-create %ROM%</command> <platform>all</platform> <theme>favourites</theme> </system>
Prerequisite #3
Compile the source code or copy the delivered binary to
/opt/retropie/supplementary/runcommand/
the binary should be namedlfl-create
, please check if settings managment is right - file must be executablePrerequisite #4
Content of runcommand_system.txt is available here
Copy fileruncommand_systems.txt
to your favourite folder.
This file is necessary because here are the launching commands for each system deposited.If your favourite folder is also located in the ROM folder then the FAVs files are available wie SMB in Windows systems. So use network folders in Windows to copy
runcommand_systems.txt
in the right place.I think that future versions of lfl-create should be able to read out the commands through
es_system.cfg
directly but well I'm not affinated to do this in the right time now. I know that this is a dirty quirk.But the advantages are clear: There is no difference between lauchching the ROM directly from it's system selection or if you run it by FAV call.
Prerequisite #5
Last step ... madame e misseu
The wonderfull User Menu!
create folderruncommand-menu
in/opt/retropie/configs/all
Place the two usermenuscripts from down in
/opt/retropie/configs/allruncommand-menu
Content of
Create Favourite.sh
#!/bin/bash #Add favourites to definated folder #by cyperghost 06/21/17 #FAV folder is the first parameter given to binary lfl-create #for ex. lfl-create "/home/pi/RetroPie/My Favourites" let's store all favourites to "My Favourites" # #Usage and parameters: #Scripts get called like this: bash "$script" "$system" "$emulator" "$rom" "$command" #So script is the root dir, $system=$1, $emulator=$2, $rom=$3 and $command=$4 # full command # first parameter gives location to your favourite folder ... be sure last character is / # Please don't change order of parameters! This will cause conflicts! /opt/retropie/supplementary/runcommand/lfl-create "/home/pi/RetroPie/roms/My Favourites/" "$3" "$1" "$4" sleep 5
Content of
Delete Favourite.sh
#!/bin/bash #Delete favourites to definated folder #by cyperghost 06/21/17 #FAV folder is the first parameter given to binary lfl-create #for ex. lfl-create "/home/pi/RetroPie/My Favourites" deletes the "$SYSTEM - $rom.FAV" entry in "My Favourites" #the only difference is that at last parameter the -del command is written # #Usage and parameters: #Scripts get called like this: bash "$script" "$system" "$emulator" "$rom" "$command" #So script is the root dir, $system=$1, $emulator=$2, $rom=$3 and $command=$4 # full command # first parameter gives location to your favourite folder ... be sure last character is / # Please don't change order of parameters! This will cause conflicts! /opt/retropie/supplementary/runcommand/lfl-create "/home/pi/RetroPie/roms/My Favourites/" "$3" "$1" "-DEL" sleep 5
Take care of owners rights! User Pi and status X (=755) must be setted.
Restart Emulationstation!
Enjoy your FavouritesBTW: You can create more than one favourites folder - one for the MAME ROW, one for Arcade/NeoGeo, one for Consoles, one for HPC....
With best wishes and feel free to ask or give contributions
Please respect the work of others! -
Version history
Intital version 0.1 created on 06/08/17
- Just launching ability and a test what can be done in simple coding
- Just released for laughing....
- Never released official! The name lfl-create was used in future version
version 0.15 created 06/12/17
- Initial version for lfl-create $ROM $SYSTEM and $COMMAND were used and processed
- Created a FAV file with only $COMMAND inside
- launch was initiated just via BASH call from ES
- Worked also but is dirty and gives a lot of errors
- First version for public
version 0.55 created 06/13/17
- Heavy rework because of using runcommand_systems.txt to initiate 1:1 behaviour to runcommand. sh usual launch
- lfl-creates acts as launcher and creater now
- Nicer looking favnames (SYSTEM - romname)
- Favnames or now lowercase
- FAVs can called by bash if there is no description available (rename .sh files from ports to .fav and copy them to Favourite folder)
Version 0.65 created 06/15/17
- FAVs can now be deleted by double adding ROM to favourite, First add > creates FAV file, second add > deletes fav, third add > creates....
- FAVs deletion will be indicated by small text message!
- Never released
Version 0.75 created 06/21/17
- Added -DEL Parameter to delete FAVs (if they exists), instead of $4 or $Command use "-del"
- Never released a bit bogus in the code (to much if and then)
version 0.85 created 06/21/17
- Nicer selections via case values
- Gives output to the user what is happening
FAV file deleted
FAV file created
FAV file already there - do nothing!
Answer and Question
Which language did you use?
This was written in FreeBasic 0.9 for ARMv6 devices
There is no speed difference between a native compiled C binary -
Content of
runcommand_systems.txt
Please place this file into your favourite folder locations. If you have two folder of favourites then copy this file in the two folders. I know that's a quirk I should remove but therefore I first have to parse XML files (which is not very difficult) but this takes a bit of time.
This file is necessary to get 1:1 runcommand launch!
Content of
runcommand_systems.txt
locate to your favourite folder maybehome/pi/RetroPie/roms/My Favourites
You might see that it is just an extraction of our well knowen es_systems.cfg/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ amstradcpc %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ arcade %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ atari2600 %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ atari7800 %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ atarilynx %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ fba %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ fds %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gamegear %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gb %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gba %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gbc %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ mame-libretro %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ mame-mame4all %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ mastersystem %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ megadrive %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ msx %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ n64 %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ neogeo %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ nes %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ ngp %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ ngpc %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ pcengine %ROM% bash %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ psp %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ psx %ROM% sudo /home/pi/RetroPie-Setup/retropie_packages.sh retropiemenu launch %ROM% </dev/tty >/dev/tty /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ sega32x %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ segacd %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ sg-1000 %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes %ROM% /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ vectrex %ROM% bash %ROM%
-
reserved
-
How To
1. Restart from lfl-create
- Create emptly fav-file with any programm you want maybe
Relaunch.fav
- Add in first line:
touch /tmp/es-restart; pkill -f "/opt/retropie/supplementary/.*/emulationstation([^.]|$)"
- Restart ES one time manually
- Now you can Restart ES via Favourites if you need rescan of directories to discover new ROMs or FAVs
2. Stop Musik (if mpg123 is installed)
- Create emptly fav-file with any programm you want maybe
Stop Musik.fav
- Add in first line:
pkill -STOP mpg123
- Create emptly fav-file with any programm you want maybe
-
How To create Favourites
1. Choose your ROM and start as usual
2. If grey box appears press a button
3. Select U for User Menu
4. Select Add to Favourite
5. Favourite added - ready to go
-
I think I can push this programm to finish (means version 1.0) with all features included that was in my first intension as I designed that program.
The v085 is a big step in the right position the only thing that lacks for now is the need for external readout from
runcommand_systems.txt
. For v100 it would be better to get the runcommands directly fromes_systems.cfg
My intension was that the program should be as flexible as it could. So I regard the program as flexible as it should and so the path of the
es_systems.cfg
won't be hard coded in the binary rather given by parameter during start.But this is - in my humble opinion - only a cosmetic effect...
-
lfl-create is now on github
Feel free to use https://github.com/crcerror/lfl-create
May the forks be with you
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.