engine

package
v1.0.105 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Config *config.Config
}

Engine is the core domain service orchestrating game scanning, patching, and launcher integrations.

func New

func New(cfg *config.Config) *Engine

New creates a new Engine instance.

func (*Engine) BatchProcess

func (e *Engine) BatchProcess(ctx context.Context, parentDir string, opts ProcessOptions) ([]*ProcessResult, error)

BatchProcess scans a parent directory containing multiple game folders and processes each discovered game.

func (*Engine) InspectStatus

func (e *Engine) InspectStatus(ctx context.Context, targetPath string) (*GameStatus, error)

InspectStatus inspects a game directory to determine its patch and configuration state.

func (*Engine) ProcessGame

func (e *Engine) ProcessGame(ctx context.Context, opts ProcessOptions) (*ProcessResult, error)

ProcessGame processes a game directory according to the supplied options.

func (*Engine) Rollback

func (e *Engine) Rollback(ctx context.Context, targetPath string, dryRun bool) error

Rollback restores original backup files and cleans up generated configuration files in a game directory.

type GameStatus

type GameStatus struct {
	Name               string
	AppID              string
	GameDir            string
	Platform           string
	ExePath            string
	State              string // "Original", "Loader-Configured", "Portable-Patched"
	OriginalBackups    []string
	SettingsDirExists  bool
	SteamAppIDTxtFound bool
}

GameStatus describes the current patch & integration state of a game.

type ProcessOptions

type ProcessOptions struct {
	Path        string
	AddLutris   bool
	Portable    bool
	Promote     bool
	DryRun      bool
	AutoYes     bool
	NoSteamless bool
	WinePrefix  string
	Runner      string
}

ProcessOptions holds configuration flags for processing a game directory.

type ProcessResult

type ProcessResult struct {
	Info              *detector.GameInfo
	LutrisAdded       bool
	Patched           bool
	SteamlessUnpacked bool
	ManifestsMoved    bool
	Errors            []string
}

ProcessResult summarizes the outcome of processing a game.

func ProcessGame

func ProcessGame(ctx context.Context, cfg *config.Config, opts ProcessOptions) (*ProcessResult, error)

ProcessGame executes the end-to-end post-download setup for a single game directory.

Jump to

Keyboard shortcuts

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