Beta Claunch - Minimal, Flexible Rom-Picker/application-Launcher


lomaxx

Active Member
Joined
Sep 22, 2008
Messages
747
This is an early version of claunch. Get it here. It's a quick, dirty hack of cplay, which is a ncurses-based, python-code musicplayer. Setting it up needs some configuration, but because of that is quite flexible and once configuration is done, it's quite lean and fast. Especially fans of "vi" will like it. At the current state you should have knowledge of using a texteditor and must not fear to edit some scripts. However you can also learn something by doing so. ;) Still this - as a whole - is a little bigger project of mine and still work in progress. So it might not suit everyone so far and might be risky to use. As usual this comes without any warranty. Try it on your own risk.

While cplay is supposed to launch certain, configured musicplayers depening on the filename-extensions, claunch is supposed to be a bit universal: I plan to use it as application-launcher/rom-pickers which determines the preferred application based on the full pathname (mostly directoryname, but also filename/extension). For launching emulators, it relies on scripts that pass on the right command-line-parameters to the emulator itself, which of course must support cmd-line-parameters. Here is the list of the few things i changed so far:

- application determination based on the full-pathname
- disabled automatic play-function on start, because this is not wanted when launching games/movies
- changed the name of the default configuration-file which is being checked for assigned application

So far i used claunch for launching gnuboy-, snes9x-, atari2600-games, but in theory it also can be used to play music, play movies or launch any pnd/application/script you want.


I will open a separate thread with configuration-instructions. For now here is just a quick example of how it works.

My basic thought is to make one large directory containing all type of media (music,movies,games of different platforms). So on my 2nd SD-card i have a directory called /media/trans8/multimedia-data. In this i have subdirectories named:

atari2600
gameboy
movies
music
preferences
scummvm
snes

While i didn't configure movies and music so far, the configuration-file of claunch named "~/.claunchrc" contains the following lines:

Code:
PLAYERS = [
    NoOffsetPlayer("/media/trans8/multimedia-data/preferences/Switch_GUI.sh", "^/media/trans8/multimedia-data/preferences/Switch_GUI\.sh"),
    NoOffsetPlayer("/usr/pandora/scripts/pnd_run.sh -p /media/trans8/pandora/menu/gnuboy.pnd -e ./claunch_sdlgnuboy.sh -a %s -b sdlgnuboy", "^/media/trans8/multimedia-data/gameboy/.*\.zip"),
    NoOffsetPlayer("/usr/pandora/scripts/pnd_run.sh -p /media/trans8/pandora/menu/snes9x4d4p2.pnd -e ./claunch_snes9x.sh -a %s -b snes9x.skeezix.alpha", "^/media/trans8/multimedia-data/snes/.*\.zip"),
    NoOffsetPlayer("/usr/pandora/scripts/pnd_run.sh -p /media/trans8/pandora/menu/stella-3.2.2-beta.pnd -e ./claunch_stella.sh -a %s -b stella", "^/media/trans8/multimedia-data/atari2600/.*\.zip"),
    NoOffsetPlayer("/usr/pandora/scripts/pnd_run.sh -p /media/trans8/pandora/menu/scummvm-openpandora-2010-05-26.pnd -e ./claunch_scummvm.sh -a %s -b scummvm", "^/media/trans8/multimedia-data/scummvm/")
]

If you carefully read the above, then you can see that for example for the files in the folder "gameboy" i launch gnuboy (via pnd_run). However i do not run the usual run.sh which is included in the PND, but use my own script named "claunch_sdlgnuboy.sh". This script has to be copied to the appdata-folder of gnuboy, which for me is /media/trans8/pandora/appdata/sdlgnuboy/. This script is included in the tarball.

Stella needs my beta-version which i posted a few minutes ago in this same subforum. For scummvm i chose a little bit more complex solution. I put the gamedata in a squashfs-file and the game-configuration in a seperate file. Read the included script to understand what happens when i launch a game.

Last but not least (for now in this quick introduction) i used two ways of starting claunch:

- assigning it to a shortkey: i assigned the following line to a shortkey:

Code:
"/usr/bin/xterm -maximize -bg black -fg white -e 'cd /media/trans8/multimedia-data/; /media/trans8/claunch/claunch'"

- and also tried to use it as alternative gui, instead of minimenu and xfce. For that i added this line to "/etc/pandora/conf/gui.conf":

Code:
claunch;An ncurses-python-launcher;/media/trans8/claunch/startscript.sh;/usr/bin/killall python /media/trans8/claunch/claunch

The latter will leave you with not much more than an X-server running a xterminal running claunch.

In the future i plan to offer configurations for all compatible (as in cmd-line-accepting) emulators, movie/music-players and add more functions like "delete file", "move to a favorite-folder".

Ah right...some known issues:

- be careful with the nubs if they are set to mouse-emulation: If you paste text into the claunch-window, then all characters are interpreted as key-presses, causing unhealthy confusion.
- better do not enable playlist-advance (Shift+X), as that directly will start the next game once you quit the emulator.
- other original keyfunctions of cplay are still enabled and may cause unwanted results if you use them

For now i recommend to stick to the following keys:

- cursor up/down -> select
- enter -> choose
- CTRL+R -> search backward
- CTRL+S -> search forward (you have to disable flowcontrol in the shell you use, or CTRL+S will stop all input/output. press CTRL+Q to continue in this case)
- backspace -> go up directory
- gg (twice g) -> go to top of list
- G (Shift+G) -> go to bottom of list
- q followed by y or Shift+q-> quit
 
Back
Top