Emulationstation from batocera with configs and scripts for integration as Arch-Linux package
This project is maintained by GB609
JS-pendant to /etc/batocera-paths.conf, maintained separately for performance reasons.
This file reads or defines the package-specific file path configuration properties for the current runtime.
In theory, it is duplicated code because it does the same thing as batocera-paths.conf.
However, node can’t parse shell scripts without workarounds and bash can’t directly execute js. Therefore, there is
no direct way to use the very same file in both contexts, without having one context spawn a sub-process just to map
(and parse) the configuration.
This would incur a needless performance hit, because the configuration has to be read everytime.
Most paths defined in this file follow the same pattern as ‘batocera-paths.conf’, with one exception:
FS_ROOT will assumed to be / when not passed from the outside. The reason is that the entire js code is located
under $BTC_PKG_DIR, which itself is a changable path based on FS_ROOT.
The most reliable way to detect FS_ROOT would be to walk up the directory path and pick the first directory which
contains etc/batocera-paths.conf. But this is an expensive operation and btc-config is normally used internally
by scripts which have configured FS_ROOT already. The difference would only be noticable in direct manual usage in
a terminal with unpackaged sources (or complex multi-package installations using different package directories).
Note:
This module does not export anything. For the sake of convenience, the path configuration is placed in globalThis.PATHS instead.
So, it is sufficient to use require('batocera-paths').
Generated with shdoc from /opt/batocera-emulationstation/node_modules/batocera-paths.js