config

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput = config.ErrInvalidInput
	ErrMissingInput = config.ErrMissingInput
)
View Source
var ErrConflictingValue = errors.New("conflicting setting")

Functions

func DefaultFilename

func DefaultFilename() string

DefaultFilename returns the default name of the 'gdbuild' manifest file.

func Export added in v0.2.1

func Export(
	rc *run.Context,
	m *Manifest,
	tl *template.Template,
	target string,
) (*export.Export, error)

Export creates an `Export` instance which contains an action for exporting the specified target.

func Init added in v0.2.0

func Init(path string) error

Init initializes a GDBuild manifest at the specified path. Note that 'path' can be a directory or a '.toml' file.

func Template added in v0.2.1

func Template(rc *run.Context, m *Manifest) (*template.Template, error)

Template creates a `Template` instance which contains an action for compiling Godot based on the specified configuration.

Types

type Config

type Config struct {
	// Extends is a path to another GDBuild manifest to extend. Note that value
	// override rules work the same as within a manifest; any primitive values
	// will override those defined in the base configuration, while arrays will
	// be appended to the base configuration's arrays.
	Extends osutil.Path `toml:"extends"`
}

Configs specifies GDBuild manifest-related settings.

type Godot added in v0.2.1

type Godot struct {
	*engine.Source
}

func (*Godot) Configure added in v0.2.1

func (g *Godot) Configure(rc *run.Context) error

func (*Godot) MergeInto added in v0.2.1

func (g *Godot) MergeInto(other any) error

func (*Godot) Validate added in v0.2.1

func (g *Godot) Validate(_ *run.Context) error

type Manifest

type Manifest struct {
	// Config contains GDBuild configuration-related settings.
	Config Config `toml:"config"`
	// Godot contains settings on which Godot version/source code to use.
	Godot Godot `toml:"godot"`
	// Target includes settings for exporting Godot game executables and packs.
	Target map[string]platform.Targets `toml:"target"`
	// Template includes settings for building custom export templates.
	Template platform.Templates `toml:"template"`
}

Manifest defines the supported structure of the GDBuild manifest file.

func Parse

func Parse(bb []byte) (*Manifest, error)

Parse parses a 'Manifest' struct from a 'toml' document.

func ParseFile

func ParseFile(path string) (*Manifest, error)

Parse parses a 'Manifest' struct from a 'toml' file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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