Selector

From wiki.gp2x.org

rolmonb

Selector
Screenshot
Download(s) (archive)
Developer(s) Kounch
Version 1.2
Status Released
Webpage official page

Selector is a GP2X frontend which helps to launch other programs that need as a parameter the path to a file (for example, the first beta versions of GNUBoy2X), or to pass command line options (for example, to load a quake MOD).

In order to use Selector, three files are needed:

  1. Selector. This is the program that does all the job.
  2. A configuration file. Keep on reading to understand its format.
  3. A launch script which calls selector telling it where is the configuration file and afterwards launchs the main menu of GP2X. Keep on reading to see an example.


Contents

Controls

Once configured, after launching, it will appear a file selection interface where you can navigate using the joystick, and choose a file using B, X, Select or the joystick button. A and Y buttons let you select different command line options (useful to launch, for example, Quake with different startup options, or gnuboy2x with different sound qualities of disabling it). L and R buttons are used to navigate faster (screen by screen).


Configuration file

The configuration file is a text file with UNIX line-endings (not MS-DOS/Windows).

Each line of the configuration file can be in one of the following formats:

  • (Optional)</TD> All lines preceded by # are considered as comments and will be ignored.
  • (Optional) A line starting with the keyword langCode= followed by a language code (actually only EN for English, TR for Turkish and ES for Spanish are valid language codes). Default value is Spanish.
  • (Optional) A line starting with the keyword skinPath= followed by a path. The program will look in the directory defined by the path for a PNG image file named fondo.PNG, which must have a size of 320x240 pixels, and use it as Background for the interface. There are some examples in the Skins folder. Default value is no skin (green background).
  • (Optional) A line starting with the keyword layoutCode= followed by a number, which indicates a layout number for the interface elements. At the moment there are two options;
    • 0, where the screen is updated with a copyright message at the top, followed by the actual command line selected, and a help message at the bottom of the screen.
    • 1, with no copyright message, and the bottom help message is substituted by the command line selected.
  • (Mandatory) A line (or lines) starting with the keyword cmdLine= followed to the path to an executable GP2X file, including

all the desired parameters. Each of this lines will be an option to launch from the selector.

  • (Mandatory) A line starting with the keyword baseDir= followed with the path to the directory which will be taken as base for the program file interface. Uppon starting selector, it will display the directories and files filtered inside this directory, and will allow to navigate through it and its subdirectories

but not through upper directories.

  • (Optional) A line (or lines) starting with the keyword fileFilter= followed by one file extension which will be used as a filter when showing files. If there was no line with this keyword, selector will display all the files in the directories.


Execution Script

As selector needs as a parameter the name of its configuration file, a shell script is needed to launch it as well as, if necessary, to launch back the GP2X main menu.

This is a simple example script:

 #!/bin/sh
 ./selector ./gnuboy_config
 sync
 cd /usr/gp2x/
 exec /usr/gp2x/gp2xmenu


Now copying this script into a directory of your SD card, along with selector and a configuration file named gnuboy_config, it would launch selector with that configuration, sync the SD card after exit, and launch again the GP2X main menu.

It is important to remember that the script file is a text file with UNIX line-endings (not MS-DOS/Windows) and that it must have .gpe extension.


Known Problems

- Screen flickering (working on it). - File and directory paths in cmdLine must not have blank spaces for the moment.


Future plans, features, etc.

  • Better graphical interface, with icons.
  • CPU Speed chooser.
  • Sound?


Version history

  • 0.7 Added turkish translation, thanks to techFreak from gp32 Extreme boards.
  • 0.6 Third public version. Adpated to Minimal Lib 0.B. Added control for faster navigation with L and R. Better skin support. Added multiple layouts.
  • 0.5 Second public version. Background PNG image support.
  • 0.4 (Interna). CPU speed set to 60MHz while running, recovering at exit the previous value.
  • 0.3 (Internal). Directory identification bugs corrected. Added error message inplementation.
  • 0.2 (Internal). Text strings localization to english and spanish.
  • 0.1 First public version. Basic Functionality.
Personal tools