steamruntime

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvocation

func IsInvocation(path string) bool

IsInvocation reports whether this process was started through the Runtime symlink.

func Run

func Run(ctx context.Context) error

Run receives and executes one pending command from Core.

func Uninstall

func Uninstall() error

Types

type Broker

type Broker struct {
	// contains filtered or unexported fields
}

Broker coordinates Steam-owned Runtime sessions for Core launches.

func NewBroker

func NewBroker() *Broker

NewBroker creates a Broker using the installed Runtime shortcut.

func (*Broker) Available

func (b *Broker) Available() bool

func (*Broker) Clear

func (b *Broker) Clear(pid int) bool

Clear removes the tracked session for pid. It returns true only when pid is the latest Runtime launch, allowing callers to decide whether active-media cleanup is still required.

func (*Broker) HasActive

func (b *Broker) HasActive() bool

func (*Broker) Owns

func (b *Broker) Owns(pid int) bool

func (*Broker) Start

func (b *Broker) Start(ctx context.Context, spec *Command) (*os.Process, error)

func (*Broker) Stop

func (b *Broker) Stop(ctx context.Context) error

func (*Broker) Wait

func (b *Broker) Wait(ctx context.Context, pid int) error

type Command

type Command struct {
	Executable string   `json:"executable"`
	Dir        string   `json:"dir,omitempty"`
	LaunchID   string   `json:"launchId"`
	Args       []string `json:"args,omitempty"`
	Env        []string `json:"env,omitempty"`
	Version    int      `json:"version"`
}

Command describes one emulator process for Steam Runtime to own.

type InstallPaths

type InstallPaths struct {
	FS       afero.Fs
	Binary   string
	Runtime  string
	Desktop  string
	SteamDir string
}

func DefaultInstallPaths

func DefaultInstallPaths() *InstallPaths

type InstallResult

type InstallResult struct {
	ShortcutID         uint64
	ShortcutAdded      bool
	SteamRestartNeeded bool
}

func Install

func Install(ctx context.Context) (InstallResult, error)

type StatusResult

type StatusResult struct {
	State       string
	RuntimePath string
	DesktopPath string
	ShortcutIDs []uint64
}

func Status

func Status() (StatusResult, error)

Jump to

Keyboard shortcuts

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