common

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput = errors.New("invalid input")
	ErrMissingInput = errors.New("missing input")
)

Functions

This section is empty.

Types

type Target

type Target struct {
	// DefaultFeatures contains the slice of Godot project feature tags to build
	// with.
	DefaultFeatures []string `toml:"default_features"`
	// Encrypt sets whether the exported artifacts will be encrypted or not.
	Encrypt *bool `toml:"encrypt"`
	// EncryptionKey is the encryption key to encrypt game assets with.
	EncryptionKey string `toml:"encryption_key"`
	// Hook defines commands to be run before or after the target artifact is
	// generated.
	Hook run.Hook `toml:"hook"`
	// Options are 'export_presets.cfg' overrides, specifically the preset
	// 'options' table, for the exported artifact.
	Options map[string]any `toml:"options"`
	// PackFiles defines the game files exported as part of this artifact.
	PackFiles []export.PackFile `toml:"pack_files"`
	// Runnable is whether the export artifact should be executable. This should
	// be true for client and server targets and false for artifacts like DLC.
	Runnable *bool `toml:"runnable"`
	// Server configures the target as a server-only executable, enabling some
	// optimizations like disabling graphics.
	Server *bool `toml:"server"`
}

Target specifies a single, platform-agnostic exportable artifact within the Godot project.

func (*Target) Collect

func (t *Target) Collect(rc *run.Context, tl *template.Template, ev engine.Version) *export.Export

func (*Target) Configure

func (t *Target) Configure(rc *run.Context) error

func (*Target) MergeInto

func (t *Target) MergeInto(other any) error

func (*Target) Validate

func (t *Target) Validate(rc *run.Context) error

type TargetWithFeaturesAndProfile

type TargetWithFeaturesAndProfile struct {
	*Target

	Feature map[string]TargetWithProfile `toml:"feature"`
	Profile map[engine.Profile]Target    `toml:"profile"`
}

func (*TargetWithFeaturesAndProfile) Build

func (t *TargetWithFeaturesAndProfile) Build(rc *run.Context, dst *Target) error

type TargetWithProfile

type TargetWithProfile struct {
	*Target

	Profile map[engine.Profile]Target `toml:"profile"`
}

type Template

type Template struct {
	// Arch is the CPU architecture of the Godot export template.
	Arch platform.Arch `toml:"arch"`
	// CustomModules is a list of paths to custom modules to include in the
	// template build.
	CustomModules []osutil.Path `toml:"custom_modules"`
	// DoublePrecision enables double floating-point precision.
	DoublePrecision *bool `toml:"double_precision"`
	// EncryptionKey is the encryption key to embed in the export template.
	EncryptionKey string `toml:"encryption_key"`
	// Env is a map of environment variables to set during the build step.
	Env map[string]string `toml:"env"`
	// Hook defines commands to be run before or after a build step.
	Hook run.Hook `toml:"hook"`
	// Optimize is the specific optimization level for the template.
	Optimize engine.Optimize `toml:"optimize"`
	// PathCustomPy is a path to a 'custom.py' file which defines export
	// template build options.
	PathCustomPy osutil.Path `toml:"custom_py_path"`
	// SCons contains build command-related settings.
	SCons template.SCons `toml:"scons"`
}

Template contains platform-agnostic settings for constructing a custom Godot export template.

func (Template) Collect

func (t Template) Collect(src engine.Source, rc *run.Context) *template.Template

func (*Template) Configure

func (t *Template) Configure(rc *run.Context) error

func (*Template) MergeInto

func (t *Template) MergeInto(other any) error

func (*Template) Validate

func (t *Template) Validate(rc *run.Context) error

type TemplateWithFeaturesAndProfile

type TemplateWithFeaturesAndProfile struct {
	*Template

	Feature map[string]TemplateWithProfile `toml:"feature"`
	Profile map[engine.Profile]Template    `toml:"profile"`
}

func (*TemplateWithFeaturesAndProfile) Build

type TemplateWithProfile

type TemplateWithProfile struct {
	*Template

	Profile map[engine.Profile]Template `toml:"profile"`
}

Jump to

Keyboard shortcuts

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