detector

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsolidateManifests

func ConsolidateManifests(info *GameInfo, promoteFolder bool) error

ConsolidateManifests copies/moves appmanifest and .manifest files into <GameDir>/[Manifests]/. If a legacy [Steam] folder exists, its contents are migrated into [Manifests] and [Steam] is removed. If promoteFolder is true and the game is inside a raw steamapps/common layout, it moves the game folder up to the main parent directory and cleans up steamapps/depotcache.

Types

type ACFData

type ACFData struct {
	AppID         string
	Name          string
	InstallDir    string
	BuildID       string
	Language      string
	LaunchOptions []LaunchCandidate
}

ACFData represents extracted metadata from a Steam appmanifest_<appid>.acf file.

func ParseACF

func ParseACF(r io.Reader) (*ACFData, error)

ParseACF parses a Steam ACF/VDF manifest file from a reader.

func ParseACFFile

func ParseACFFile(path string) (*ACFData, error)

ParseACFFile opens and parses an ACF manifest file from disk.

type GameInfo

type GameInfo struct {
	AppID            string
	Name             string
	Platform         string // "linux", "win64", "win32"
	GameDir          string // Primary root directory of the game
	ExePath          string // Path to the main executable
	ExeArgs          string // Command line arguments for launch
	TargetLibPath    string // Path to steam_api library
	ManifestPath     string // Path to appmanifest_<appid>.acf
	RawDepotLayout   bool   // True if raw steamapps/common/... structure
	LaunchCandidates []LaunchCandidate
}

GameInfo represents auto-detected metadata and paths for a game directory.

func Detect

func Detect(ctx context.Context, path string) (*GameInfo, error)

Detect scans a target path and automatically identifies its AppID, Title, Platform, and Executable.

type LaunchCandidate added in v1.0.107

type LaunchCandidate struct {
	Name        string `json:"name"`
	Executable  string `json:"executable"`
	Arguments   string `json:"arguments"`
	Description string `json:"description"`
}

LaunchCandidate represents a Steam app launch option.

Jump to

Keyboard shortcuts

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