engine

package
v1.0.107 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: LGPL-3.0 Imports: 16 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) CheckLibraryUpdates added in v1.0.107

func (e *Engine) CheckLibraryUpdates(ctx context.Context, parentDir string) ([]LibraryUpdateStatus, error)

CheckLibraryUpdates scans a directory containing game folders and checks for available Steam updates.

func (*Engine) GetPatchNote added in v1.0.107

func (e *Engine) GetPatchNote(ctx context.Context, targetPath string, itemIndex int) (*steam.NewsItem, string, error)

GetPatchNote fetches and retrieves a single patch note at itemIndex (1-indexed) for a game path or AppID.

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) InspectStatusEx added in v1.0.107

func (e *Engine) InspectStatusEx(ctx context.Context, targetPath string, newsCount int) (*GameStatus, error)

InspectStatusEx extends InspectStatus with customizable news history depth.

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
	ManifestID         string
	BuildID            string
	DiskSizeBytes      int64
	FileCount          int
	DLCCount           int
	AchievementCount   int
	LutrisRegistered   bool
	RecentPatchNote    string
	NewsItems          []steam.NewsItem
}

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

type LibraryUpdateStatus added in v1.0.107

type LibraryUpdateStatus struct {
	GameTitle       string
	AppID           string
	GameDir         string
	LocalManifestID string
	HasUpdate       bool
}

LibraryUpdateStatus represents update availability status for a game in the library.

type ProcessOptions

type ProcessOptions struct {
	Path              string
	AddLutris         bool
	Portable          bool
	Promote           bool
	DryRun            bool
	AutoYes           bool
	NoSteamless       bool
	FetchAchievements 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