executable

package
v0.6.19 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidName = errors.New("invalid name")
	ErrMissingName = errors.New("missing name")
)
View Source
var ErrChecksumsUnsupported = errors.New("version precedes checksums")

Functions

This section is empty.

Types

type Archive

type Archive = archive.Zip[Executable]

type Checksums added in v0.6.0

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

An 'Artifact' representing a Godot executable archive checksums file.

func NewChecksums added in v0.6.0

func NewChecksums(v version.Version) (Checksums, error)

Returns a new 'Checksums' struct after validating the Godot version.

func (Checksums) Artifact added in v0.6.0

func (c Checksums) Artifact()

Artifact "registers" 'Checksums' as a Godot release artifact.

func (Checksums) Hash added in v0.6.0

func (c Checksums) Hash() hash.Hash

Hash returns a new 'hash.Hash' for computing the file hash of an executable.

func (Checksums) Name added in v0.6.0

func (c Checksums) Name() string

func (Checksums) Supports added in v0.6.0

func (c Checksums) Supports(_ Archive)

Supports "registers" 'Checksums' as containing checksums for the specified artifact type.

func (Checksums) Version added in v0.6.0

func (c Checksums) Version() version.Version

type Executable

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

An 'Artifact' representing the Godot application itself.

func MustParse

func MustParse(input string) Executable

Parses an 'Executable' struct from the name of a Godot executable or panics if it would fail.

func New

Creates a new 'Executable' struct with the specified values.

NOTE: This method is rather pointless, but the 'Versioned' and 'Platformed' interfaces conflict with the desired field names.

func Parse

func Parse(input string) (Executable, error)

Parses an 'Executable' struct from the name of a Godot executable.

func (Executable) Archivable

func (ex Executable) Archivable()

Allows 'Executable' to be used by 'Archive' implementation.

func (Executable) Artifact added in v0.6.0

func (ex Executable) Artifact()

Artifact "registers" 'Executable' as a Godot release artifact.

func (Executable) Name

func (ex Executable) Name() string

Returns the name of the Godot executable, given the specified 'Version' and 'Platform'.

NOTE: Godot names its executables in the format 'Godot_<VERSION>_<PLATFORM>', with Windows executables getting an extra '.exe' extension. Both the version and platform identifiers are version-specific, but the overall naming scheme has not changed (as of v4.2).

func (Executable) Path

func (ex Executable) Path() string

The path relative to the 'Artifact' that executes Godot. For Linux and Windows this will be the executable 'Artifact' itself. On macOS this will be a path within the app folder.

func (Executable) Platform

func (ex Executable) Platform() platform.Platform

func (Executable) String

func (ex Executable) String() string

func (Executable) Version

func (ex Executable) Version() version.Version

Jump to

Keyboard shortcuts

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