export

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Export

type Export struct {
	// EncryptionKey is an encryption key used to encrypt game assets with.
	EncryptionKey string
	// Features contains the slice of Godot project feature tags to build with.
	Features []string
	// Options are 'export_presets.cfg' overrides, specifically the preset
	// 'options' table, for the exported artifact.
	Options map[string]any
	// PackFiles defines the game files exported as part of this artifact.
	PackFiles []PackFile
	// Template specifies the export template to use.
	Template *template.Template `hash:"string"`
	// RunBefore contains an ordered list of actions to execute prior to
	// exporting the target.
	RunBefore action.Action `hash:"string"`
	// RunAfter contains an ordered list of actions to execute after exporting
	// the target.
	RunAfter action.Action `hash:"string"`
	// 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
	// Server configures the target as a server-only executable, enabling some
	// optimizations like disabling graphics.
	Server bool
	// Version is the editor version to use for exporting.
	Version engine.Version
}

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

func (*Export) Action

func (x *Export) Action() action.Action

Action creates an 'action.Action' for running the export action.

func (*Export) Artifacts

func (x *Export) Artifacts() []string

Artifacts returns the set of exported project artifacts required by the underlying target definition.

func (*Export) Checksum

func (x *Export) Checksum(rc *run.Context) (string, error)

Checksum produces a checksum hash of the export specification. When the checksums of two 'Export' definitions matches, the resulting exported artifacts will be equivalent.

type PackFile

type PackFile struct {
	// Embed defines whether the associated '.pck' file should be embedded in
	// the binary. If true, then the target this 'PackFile' is associated with
	// must be runnable.
	Embed *bool `toml:"embed"`
	// Encrypt determines whether or not to encrypt the game files contained in
	// the resulting '.pck' files.
	Encrypt *bool `toml:"encrypt"`
	// Glob is a slice of glob expressions to match game files against. These
	// will be evaluated from the directory containing the GDBuild manifest.
	Glob []string `toml:"glob"`
	// PackFilePartition is a ruleset for how to split the files matched by
	// 'glob' into one or more '.pck' files.
	Partition PackFilePartition `toml:"partition"`
	// Zip defines whether to compress the matching game files. The pack files
	// will use the '.zip' extension instead of '.pck'.
	Zip *bool `toml:"zip"`
}

PackFile defines instructions for assembling one or more '.pck' files containing exported game files.

func (*PackFile) Configure

func (c *PackFile) Configure(_ *run.Context) error

func (*PackFile) Files

func (c *PackFile) Files(path osutil.Path) ([]osutil.Path, error)

func (*PackFile) Validate

func (c *PackFile) Validate(_ *run.Context) error

type PackFilePartition

type PackFilePartition struct {
	// Depth is the maximum folder depth from the project directory containing
	// the GDBuild manifest to split files between. Any folders past this depth
	// limit will all be included within the same '.pck' file.
	Depth uint `toml:"depth"`
	// Limit describes limits on the files within individual '.pck' files in the
	// partition.
	Limit PackFilePartitionLimit `toml:"limit"`
}

PackFilePartition describes how to automatically partition a collection of files into multiple '.pck' files.

NOTE: This struct contains multiple different expressions of limits, multiple of which may be true at a time. If any of the contained rules would trigger a new '.pck' to be formed within a partition, then that rule will be respected.

type PackFilePartitionLimit

type PackFilePartitionLimit struct {
	// Size is a human-readable file size limit that all '.pck' files within the
	// partition must adhere to.
	Size string `toml:"size"`
	// Files is the maximum count of files within a single '.pck' file within a
	// partition.
	Files uint `toml:"files"`
}

PackFilePartitionLimit describes limits used to determine when a new '.pck' file within a partition should be started.

Jump to

Keyboard shortcuts

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