mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Updated README.md/THEMES.md for twolife's changes.
DESCNAME is a new, optional tag. You can now use ~/.emulationstation/SYSTEMNAME/ for theme and gamelist files!
This commit is contained in:
parent
56ae7c1b69
commit
529c3a24c7
|
@ -76,9 +76,11 @@ Unfortunately, there is no built-in way to change keyboard mappings - if you nee
|
|||
|
||||
Writing an es_systems.cfg
|
||||
=========================
|
||||
The file `~/.emulationstation/es_systems.cfg` contains the system configuration data for EmulationStation. A system is a NAME, PATH, EXTENSION, and COMMAND. You can define any number of systems. You can switch between them by pressing left and right. They will cycle in the order they are defined.
|
||||
The file `~/.emulationstation/es_systems.cfg` contains the system configuration data for EmulationStation. A system is a NAME, DESCNAME, PATH, EXTENSION, and COMMAND. You can define any number of systems. You can switch between them by pressing left and right. They will cycle in the order they are defined.
|
||||
|
||||
The NAME is what ES will show in the header if you're not using a theme.
|
||||
The NAME is what ES will use to internally identify the system. Theme.xml and gamelist.xml files will also be searched for in `~/.emulationstation/NAME/` if not found at the root of PATH. It is recommended that you abbreviate here if necessary, e.g. "nes".
|
||||
|
||||
The DESCNAME is a "pretty" name for the system - it show up in a header if one is displayed. It is optional; if not supplied, it will copy NAME (note: DESCNAME must also *not* be the last tag you define for a system! This is due to the nature of how optional tags are implemented.).
|
||||
|
||||
The PATH is where ES will start the search for ROMs. All subdirectories (and links!) will be included.
|
||||
|
||||
|
@ -97,7 +99,7 @@ The following "tags" are replaced by ES in COMMANDs:
|
|||
gamelist.xml
|
||||
============
|
||||
|
||||
If a file named gamelist.xml is found in the root of a system's search directory, it will be parsed and the detailed GuiGameList will be used. This means you can define images, descriptions, and different names for files. Note that only standard ASCII characters are supported (if you see a weird [X] symbol, you're probably using unicode!).
|
||||
If a file named gamelist.xml is found in the root of a system's search directory OR within `~/.emulationstation/%NAME%/`, it will be parsed and the detailed GuiGameList will be used. This means you can define images, descriptions, and different names for files. Note that only standard ASCII characters are supported (if you see a weird [X] symbol, you're probably using unicode!).
|
||||
Images will be automatically resized to fit within the left column of the screen. Smaller images will load faster, so try to keep your resolution low.
|
||||
An example gamelist.xml:
|
||||
```
|
||||
|
|
|
@ -4,7 +4,7 @@ Themes
|
|||
EmulationStation allows each system to have its own "theme." A theme is a collection of display settings and images defined in an XML document.
|
||||
|
||||
ES will check 3 places for a theme, in the following order:
|
||||
- a theme.xml file in the sysytem's %PATH% directory.
|
||||
- a theme.xml file in the root of a system's %PATH% directory.
|
||||
- $HOME/.emulationstation/%NAME%/theme.xml
|
||||
- $HOME/.emulationstation/es_theme.xml
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ extern bool IGNOREGAMELIST;
|
|||
std::string SystemData::getStartPath() { return mStartPath; }
|
||||
std::string SystemData::getExtension() { return mSearchExtension; }
|
||||
|
||||
SystemData::SystemData(std::string name, std::string desc, std::string startPath, std::string extension, std::string command)
|
||||
SystemData::SystemData(std::string name, std::string descName, std::string startPath, std::string extension, std::string command)
|
||||
{
|
||||
mName = name;
|
||||
mDesc = desc;
|
||||
mDescName = descName;
|
||||
|
||||
//expand home symbol if the startpath contains it
|
||||
if(startPath[0] == '~')
|
||||
|
@ -158,9 +158,9 @@ std::string SystemData::getName()
|
|||
return mName;
|
||||
}
|
||||
|
||||
std::string SystemData::getDesc()
|
||||
std::string SystemData::getDescName()
|
||||
{
|
||||
return mDesc;
|
||||
return mDescName;
|
||||
}
|
||||
|
||||
//creates systems from information located in a config file
|
||||
|
@ -176,7 +176,7 @@ void SystemData::loadConfig()
|
|||
if(file.is_open())
|
||||
{
|
||||
std::string line;
|
||||
std::string sysName, sysDesc, sysPath, sysExtension, sysCommand;
|
||||
std::string sysName, sysDescName, sysPath, sysExtension, sysCommand;
|
||||
while(file.good())
|
||||
{
|
||||
std::getline(file, line);
|
||||
|
@ -204,8 +204,8 @@ void SystemData::loadConfig()
|
|||
//map the value to the appropriate variable
|
||||
if(varName == "NAME")
|
||||
sysName = varValue;
|
||||
else if(varName == "DESC")
|
||||
sysDesc = varValue;
|
||||
else if(varName == "DESCNAME")
|
||||
sysDescName = varValue;
|
||||
else if(varName == "PATH")
|
||||
{
|
||||
if(varValue[varValue.length() - 1] == '/')
|
||||
|
@ -218,9 +218,12 @@ void SystemData::loadConfig()
|
|||
sysCommand = varValue;
|
||||
|
||||
//we have all our variables - create the system object
|
||||
if(!sysName.empty() && !sysDesc.empty() && !sysPath.empty() &&!sysExtension.empty() && !sysCommand.empty())
|
||||
if(!sysName.empty() && !sysPath.empty() &&!sysExtension.empty() && !sysCommand.empty())
|
||||
{
|
||||
SystemData* newSystem = new SystemData(sysName, sysDesc, sysPath, sysExtension, sysCommand);
|
||||
if(sysDescName.empty())
|
||||
sysDescName = sysName;
|
||||
|
||||
SystemData* newSystem = new SystemData(sysName, sysDescName, sysPath, sysExtension, sysCommand);
|
||||
if(newSystem->getRootFolder()->getFileCount() == 0)
|
||||
{
|
||||
std::cout << "System \"" << sysName << "\" has no games! Deleting.\n";
|
||||
|
@ -230,7 +233,7 @@ void SystemData::loadConfig()
|
|||
}
|
||||
|
||||
//reset the variables for the next block (should there be one)
|
||||
sysName = ""; sysDesc = ""; sysPath = ""; sysExtension = ""; sysCommand = "" ;
|
||||
sysName = ""; sysDescName = ""; sysPath = ""; sysExtension = ""; sysCommand = "" ;
|
||||
}
|
||||
}else{
|
||||
std::cerr << "Error reading config file \"" << path << "\" - no equals sign found on line \"" << line << "\"!\n";
|
||||
|
@ -256,20 +259,20 @@ void SystemData::writeExampleConfig()
|
|||
file << "# Lines that begin with a hash (#) are ignored, as are empty lines." << std::endl;
|
||||
file << "# A sample system might look like this:" << std::endl;
|
||||
file << "#NAME=nes" << std::endl;
|
||||
file << "#DESC=Nintendo Entertainment System" << std::endl;
|
||||
file << "#DESCNAME=Nintendo Entertainment System" << std::endl;
|
||||
file << "#PATH=~/ROMs/nes/" << std::endl;
|
||||
file << "#EXTENSION=.nes .NES" << std::endl;
|
||||
file << "#COMMAND=retroarch -L ~/cores/libretro-fceumm.so %ROM%" << std::endl << std::endl;
|
||||
|
||||
file << "#NAME is a short name used internaly." << std::endl;
|
||||
file << "#DESC is just a pretty desciption to identify the system." << std::endl;
|
||||
file << "#NAME is a short name used internally (and in alternative paths)." << std::endl;
|
||||
file << "#DESCNAME is a descriptive name to identify the system. It may be displayed in a header." << std::endl;
|
||||
file << "#PATH is the path to start the recursive search for ROMs in. ~ will be expanded into the $HOME variable." << std::endl;
|
||||
file << "#EXTENSION is a list of extensions to search for, separated by spaces. You MUST include the period, and it must be exact - it's case sensitive, and no wildcards." << std::endl;
|
||||
file << "#COMMAND is the shell command to execute when a game is selected. %ROM% will be replaced with the (bash special-character escaped) path to the ROM." << std::endl << std::endl;
|
||||
|
||||
file << "#Now try your own!" << std::endl;
|
||||
file << "NAME=" << std::endl;
|
||||
file << "DESC=" << std::endl;
|
||||
file << "DESCNAME=" << std::endl;
|
||||
file << "PATH=" << std::endl;
|
||||
file << "EXTENSION=" << std::endl;
|
||||
file << "COMMAND=" << std::endl;
|
||||
|
|
|
@ -10,12 +10,12 @@ class GameData;
|
|||
class SystemData
|
||||
{
|
||||
public:
|
||||
SystemData(std::string name, std::string desc, std::string startPath, std::string extension, std::string command);
|
||||
SystemData(std::string name, std::string descName, std::string startPath, std::string extension, std::string command);
|
||||
~SystemData();
|
||||
|
||||
FolderData* getRootFolder();
|
||||
std::string getName();
|
||||
std::string getDesc();
|
||||
std::string getDescName();
|
||||
std::string getStartPath();
|
||||
std::string getExtension();
|
||||
std::string getGamelistPath();
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
static std::vector<SystemData*> sSystemVector;
|
||||
private:
|
||||
std::string mName;
|
||||
std::string mDesc;
|
||||
std::string mDescName;
|
||||
std::string mStartPath;
|
||||
std::string mSearchExtension;
|
||||
std::string mLaunchCommand;
|
||||
|
|
|
@ -91,7 +91,7 @@ void GuiGameList::onRender()
|
|||
|
||||
//header
|
||||
if(!mTheme->getBool("hideHeader"))
|
||||
Renderer::drawCenteredText(mSystem->getDesc(), 0, 1, 0xFF0000FF, Renderer::getDefaultFont(Renderer::LARGE));
|
||||
Renderer::drawCenteredText(mSystem->getDescName(), 0, 1, 0xFF0000FF, Renderer::getDefaultFont(Renderer::LARGE));
|
||||
|
||||
if(mDetailed)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue