MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / writeExampleConfig

Method writeExampleConfig

src/SystemData.cpp:285–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void SystemData::writeExampleConfig(const std::string& path)
286{
287 std::cerr << "Writing example config to \"" << path << "\"...";
288
289 std::ofstream file(path.c_str());
290
291 file << "# This is the EmulationStation Systems configuration file." << std::endl;
292 file << "# Lines that begin with a hash (#) are ignored, as are empty lines." << std::endl;
293 file << "# A sample system might look like this:" << std::endl;
294 file << "#NAME=nes" << std::endl;
295 file << "#DESCNAME=Nintendo Entertainment System" << std::endl;
296 file << "#PATH=~/ROMs/nes/" << std::endl;
297 file << "#EXTENSION=.nes .NES" << std::endl;
298 file << "#COMMAND=retroarch -L ~/cores/libretro-fceumm.so %ROM%" << std::endl << std::endl;
299
300 file << "#NAME is a short name used internally (and in alternative paths)." << std::endl;
301 file << "#DESCNAME is a descriptive name to identify the system. It may be displayed in a header." << std::endl;
302 file << "#PATH is the path to start the recursive search for ROMs in. ~ will be expanded into the $HOME variable." << std::endl;
303 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;
304 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;
305
306 file << "#Now try your own!" << std::endl;
307 file << "NAME=" << std::endl;
308 file << "DESCNAME=" << std::endl;
309 file << "PATH=" << std::endl;
310 file << "EXTENSION=" << std::endl;
311 file << "COMMAND=" << std::endl;
312
313 file.close();
314
315 std::cerr << "done. Go read it!\n";
316}
317
318void SystemData::deleteSystems()
319{

Callers

nothing calls this directly

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected