batocera

package
v2.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: GPL-3.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ESConfigDir is the EmulationStation config directory on Batocera.
	ESConfigDir = "/userdata/system/configs/emulationstation"
	// ESSystemsConfigFile is the main ES systems config file.
	ESSystemsConfigFile = "es_systems.cfg"
	// ESSystemsOverlayPattern is the glob pattern for overlay config files.
	ESSystemsOverlayPattern = "es_systems_*.cfg"
)
View Source
const (
	// HomeDir is hardcoded because home in env is not set at the point which
	// the service file is called to start.
	HomeDir   = "/userdata/system"
	DataDir   = HomeDir + "/.local/share/" + config.AppName
	ConfigDir = HomeDir + "/.config/" + config.AppName
	LogDir    = DataDir + "/" + config.LogsDir
)

Variables

This section is empty.

Functions

func UpdatePayload added in v2.17.0

func UpdatePayload() []updatepayload.File

UpdatePayload lists the platform-owned files an update installs alongside the binary. The list itself lives in the payload subpackage so build tooling can read it without compiling this one.

Types

type ESSystem added in v2.9.0

type ESSystem struct {
	Name      string `xml:"name"`
	Path      string `xml:"path"`
	Extension string `xml:"extension"`
}

ESSystem represents a single system entry from es_systems.cfg.

func (ESSystem) ParseExtensions added in v2.10.0

func (s ESSystem) ParseExtensions() []string

ParseExtensions splits the space-separated extension string from ES config into a deduplicated slice of extensions. Each extension is normalized to lowercase with a leading dot.

type ESSystemConfig added in v2.9.0

type ESSystemConfig struct {
	// Systems maps system name to its configuration.
	Systems map[string]ESSystem
}

ESSystemConfig holds parsed ES system configuration.

func ParseESSystemsConfig added in v2.9.0

func ParseESSystemsConfig(configDir string) (*ESSystemConfig, error)

ParseESSystemsConfig parses EmulationStation config files and returns discovered system configurations. It reads the main config file and any overlay files (es_systems_*.cfg).

func (*ESSystemConfig) GetROMPaths added in v2.9.0

func (c *ESSystemConfig) GetROMPaths() []string

GetROMPaths returns deduplicated ROM paths from parsed ES config. Paths are expanded (environment variables resolved) and normalized.

type ESSystemList added in v2.9.0

type ESSystemList struct {
	XMLName xml.Name   `xml:"systemList"`
	Systems []ESSystem `xml:"system"`
}

ESSystemList is the root element of es_systems.cfg.

type Platform

type Platform struct {
	shared.LinuxInput
	// contains filtered or unexported fields
}

func (*Platform) ConsoleManager added in v2.7.0

func (*Platform) ConsoleManager() platforms.ConsoleManager

func (*Platform) ForwardCmd

func (*Platform) ForwardCmd(env *platforms.CmdEnv) (platforms.CmdResult, error)

func (*Platform) ID

func (*Platform) ID() string

func (*Platform) LaunchMedia

func (p *Platform) LaunchMedia(
	cfg *config.Instance, path string, launcher *platforms.Launcher, db *database.Database,
	opts *platforms.LaunchOptions,
) error

func (*Platform) LaunchSystem

func (p *Platform) LaunchSystem(_ *config.Instance, systemID string) error

func (*Platform) Launchers

func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher

func (*Platform) LookupMapping

func (*Platform) LookupMapping(_ *tokens.Token) (string, bool)

func (*Platform) ManagedByPackageManager added in v2.10.0

func (*Platform) ManagedByPackageManager() bool

ManagedByPackageManager checks if this install was done via the Batocera pacman package by looking for the batoexec hook file created during install.

func (*Platform) PresentUI added in v2.16.0

func (*Platform) PresentUI(
	_ context.Context,
	event *models.UIEvent,
) (func() error, error)

func (*Platform) RefreshLauncherDependencies added in v2.16.0

func (p *Platform) RefreshLauncherDependencies() error

RefreshLauncherDependencies invalidates external EmulationStation config so the following launcher rebuild reparses current system paths and extensions.

func (*Platform) ReturnToMenu added in v2.7.0

func (p *Platform) ReturnToMenu() error

func (*Platform) RootDirs

func (p *Platform) RootDirs(cfg *config.Instance) []string

func (*Platform) ScanHook

func (*Platform) ScanHook(_ *tokens.Token) error

func (*Platform) Scrapers added in v2.12.0

func (*Platform) Scrapers(_ *config.Instance) map[string]platforms.Scraper

func (*Platform) Screenshot added in v2.10.0

func (*Platform) Screenshot() (*platforms.ScreenshotResult, error)

func (*Platform) SetTrackedProcess added in v2.6.1

func (p *Platform) SetTrackedProcess(proc *os.Process)

func (*Platform) Settings

func (*Platform) Settings() platforms.Settings

func (*Platform) StartPost

func (p *Platform) StartPost(
	_ context.Context,
	cfg *config.Instance,
	_ platforms.LauncherContextManager,
	activeMedia func() *models.ActiveMedia,
	setActiveMedia func(*models.ActiveMedia),
	_ *database.Database,
	_ *idle.Scheduler,
) error

func (*Platform) StartPre

func (p *Platform) StartPre(cfg *config.Instance) error

func (*Platform) Stop

func (p *Platform) Stop() error

func (*Platform) StopActiveLauncher

func (p *Platform) StopActiveLauncher(reason platforms.StopIntent) error

func (*Platform) SupportedReaders

func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader

func (*Platform) UpdatePayload added in v2.17.0

func (*Platform) UpdatePayload() []updatepayload.File

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL