manager

package
v0.0.0-...-4cf11e7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(consumer *state.Consumer, installFolder string, runtime ox.Runtime) (*dash.Verdict, error)

func ExclusivityScore

func ExclusivityScore(p itchio.Platforms) int64

ExclusivityScore returns a higher value the closest an upload is to being *only for this platform*

func IsCompatible

func IsCompatible(p itchio.Platforms, rt ox.Runtime) bool

Types

type ClassificationAction

type ClassificationAction string
const (
	ClassificationActionOpen   ClassificationAction = "open"
	ClassificationActionLaunch ClassificationAction = "launch"
)

type Host

type Host struct {
	// os + arch, e.g. windows-i386, linux-amd64
	Runtime ox.Runtime `json:"runtime"`

	// wrapper tool (wine, etc.) that butler can launch itself
	Wrapper *Wrapper `json:"wrapper,omitempty"`

	RemoteLaunchName string `json:"remoteLaunchName,omitempty"`
}

func NativeHost

func NativeHost() Host

func (Host) String

func (h Host) String() string

func (Host) Validate

func (h Host) Validate() error

type HostEnumerator

type HostEnumerator interface {
	// Returns a list of supported hosts, from most preferred
	// to least preferred
	Enumerate(consumer *state.Consumer) (Hosts, error)
}

func DefaultHostEnumerator

func DefaultHostEnumerator() HostEnumerator

func SingleHostEnumerator

func SingleHostEnumerator(rt ox.Runtime) HostEnumerator

type Hosts

type Hosts []Host

func (Hosts) IsCompatible

func (h Hosts) IsCompatible(p itchio.Platforms) bool

func (Hosts) Platforms

func (h Hosts) Platforms() []ox.Platform

type NarrowDownUploadsResult

type NarrowDownUploadsResult struct {
	InitialUploads []*itchio.Upload
	Uploads        []*itchio.Upload
	HadWrongFormat bool
	HadWrongArch   bool
}

func NarrowDownUploads

func NarrowDownUploads(consumer *state.Consumer, game *itchio.Game, uploads []*itchio.Upload, runtimeEnum HostEnumerator) (*NarrowDownUploadsResult, error)

type Wrapper

type Wrapper struct {
	// wrapper {HERE} game.exe --launch-editor
	BeforeTarget []string `json:"beforeTarget"`
	// wrapper game.exe {HERE} --launch-editor
	BetweenTargetAndArgs []string `json:"betweenTargetAndArgs"`
	// wrapper game.exe --launch-editor {HERE}
	AfterArgs []string `json:"afterArgs"`

	// full path to the wrapper, like "wine"
	WrapperBinary string `json:"wrapperBinary"`

	// additional environment variables
	Env map[string]string `json:"env"`

	// When this is true, the wrapper can't function like this:
	//
	//   $ wine /path/to/game.exe
	//
	// It needs to function like this:
	//
	//   $ cd /path/to
	//   $ wine game.exe
	//
	// This is at least true for wine, which cannot find required DLLs
	// otherwise. This might be true for other wrappers, so it's an option here.
	NeedRelativeTarget bool `json:"needRelativeTarget"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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