RetroPie
4
System to install/configure Emulators in a Debian Environment
|
RetroPie Helper library. More...
Functions | |
printMsgs (type, message) | |
prints messages in a variety of ways More... | |
printHeading (message) | |
calls PrintMsgs with "heading" type More... | |
fatalError (message) | |
calls PrintMsgs with "heading" type, and exits immediately More... | |
runCmd (command) | |
calls command and record any non zero return codes for later printing More... | |
hasFlag (string, flag) | |
checks for a flag in a string (consisting of space separated flags) More... | |
isPlatform () | |
check for current platform / platform flags More... | |
hasPackage (package, version, comparison) | |
check for installed Debian package / package version. More... | |
aptUpdate () | |
calls apt-get update (unless it has already been called before) | |
aptInstall (package) | |
calls apt-get install with the packages provided More... | |
aptRemove (package) | |
calls apt-get remove with the packages provided More... | |
getDepends (package) | |
installs packages if they are not installed More... | |
rpSwap (command, memory) | |
adds additional swap to the system More... | |
gitPullOrClone (dest, repo, branch) | |
git clones or pulls a repository More... | |
rmDirExists (dir) | |
removes a directory and all contents if it exists More... | |
mkUserDir (dir) | |
creates a directory owned by the current user More... | |
mkRomDir (dir) | |
creates a directory under $romdir owned by the current user More... | |
moveConfigDir (from, to) | |
moves the contents of a folder and symlinks to the new location More... | |
moveConfigFile (from, to) | |
moves the file and symlinks to the new location More... | |
diffFiles (file1, file2) | |
compares two files using diff More... | |
copyDefaultConfig (from, to) | |
copies from the source file to the destination file if the destination file doesn't exist. If the destination is the same nothing is done. if different the source is copied to destination.rp-dist More... | |
addUdevInputRules () | |
creates udev rule in /etc/udev/rules.d/99-input.rules for /dev/input to make it writable by any user in input group | |
setDispmanx (module_id, status) | |
sets a flag for a module as to whether it should use the sdl1 dispmanx backend by default or not (0 for framebuffer, 1 for dispmanx) More... | |
setESSystem (fullname, name, path, extension, command, platform, theme) | |
adds a system entry for Emulation Station (to /etc/emulationstation/es_systems.cfg) More... | |
RetroPie Helper library.
aptInstall | ( | package | ) |
calls apt-get install with the packages provided
package | package / list of packages to install |
aptRemove | ( | package | ) |
calls apt-get remove with the packages provided
package | package / list of packages to remove |
copyDefaultConfig | ( | from | , |
to | |||
) |
copies from the source file to the destination file if the destination file doesn't exist. If the destination is the same nothing is done. if different the source is copied to destination.rp-dist
from | source file |
to | destination file |
diffFiles | ( | file1 | , |
file2 | |||
) |
compares two files using diff
file1 | file to compare |
file2 | file to compare |
0 | if the files were the same |
1 | if they were not |
>1 | an error occured |
fatalError | ( | message | ) |
calls PrintMsgs with "heading" type, and exits immediately
message | string or array of messages to display |
getDepends | ( | package | ) |
installs packages if they are not installed
package | package / list of packages to install (if not already installed) |
0 | on success |
1 | on failure |
gitPullOrClone | ( | dest | , |
repo | , | ||
branch | |||
) |
git clones or pulls a repository
dest | destination directory |
repo | repository to clone or pull from |
branch | branch to clone or pull from (optional) |
hasFlag | ( | string | , |
flag | |||
) |
checks for a flag in a string (consisting of space separated flags)
string | string to search in |
flag | flag to search for |
0 | if the flag was found |
1 | if the flag was not found |
hasPackage | ( | package | , |
version | , | ||
comparison | |||
) |
check for installed Debian package / package version.
package | name of Debian package |
version | requested version (optional) |
comparison | type of comparison - defaults to ge (greater than or equal) if using a version |
0 | if the requested package / version was installed |
1 | if the requested package / version was not installed |
isPlatform | ( | ) |
check for current platform / platform flags
platform |
mkRomDir | ( | dir | ) |
creates a directory under $romdir owned by the current user
dir | rom directory to create |
mkUserDir | ( | dir | ) |
creates a directory owned by the current user
dir | directory to create |
moveConfigDir | ( | from | , |
to | |||
) |
moves the contents of a folder and symlinks to the new location
from | source directory |
to | destination directory |
moveConfigFile | ( | from | , |
to | |||
) |
moves the file and symlinks to the new location
from | source file |
to | destination file |
printHeading | ( | message | ) |
calls PrintMsgs with "heading" type
message | string or array of messages to display |
printMsgs | ( | type | , |
message | |||
) |
prints messages in a variety of ways
type | style of display to use - dialog, console or heading |
message | string or array of messages to display |
rmDirExists | ( | dir | ) |
removes a directory and all contents if it exists
dir | directory to remove |
rpSwap | ( | command | , |
memory | |||
) |
adds additional swap to the system
command | on to add swap if needed and off to remove later |
memory | total memory needed (swap added = memory - available memory) |
runCmd | ( | command | ) |
calls command and record any non zero return codes for later printing
0 | if the function name exists |
1 | if the function name does not exist |
command | command to run |
setDispmanx | ( | module_id | , |
status | |||
) |
sets a flag for a module as to whether it should use the sdl1 dispmanx backend by default or not (0 for framebuffer, 1 for dispmanx)
module_id | name of module to add dispmanx flag for |
status | initial status of flag (0 or 1) |
setESSystem | ( | fullname | , |
name | , | ||
path | , | ||
extension | , | ||
command | , | ||
platform | , | ||
theme | |||
) |
adds a system entry for Emulation Station (to /etc/emulationstation/es_systems.cfg)
fullname | full name of system |
name | short name of system |
path | rom path |
extension | file extensions to show |
command | command to run |
platform | platform (used by es for scraping) |
theme | name of theme to use |