scons

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 12 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

func EncryptionKeyFromEnv

func EncryptionKeyFromEnv() string

EncryptionKeyFromEnv returns the encryption key set via environment variable.

func TemplateName

func TemplateName(pl platform.OS, arch platform.Arch, pr engine.Profile) string

TemplateName returns the base name of the export template defined by the specified parameters.

Types

type Build

type Build struct {
	// Arch is the CPU architecture of the Godot export template.
	Arch platform.Arch

	// CustomModules is a list of paths to custom modules to include in the
	// template build.
	CustomModules []osutil.Path `hash:"ignore"` // Ignore; paths are separately hashed.

	// CustomPy is a path to a 'custom.py' file which defines export template
	// build options.
	CustomPy osutil.Path `hash:"ignore"` // Ignore; path is separately hashed.

	// DoublePrecision enables double floating-point precision.
	DoublePrecision bool

	// EncryptionKey is an encryption key to embed in the export template.
	//
	// NOTE: While this could just be set in 'Env', exposing it here simplifies
	// setting it externally (i.e. via the 'target' command).
	EncryptionKey string

	// Env is a map of environment variables to set during the build step.
	Env map[string]string

	// Source is the source code specification for the build.
	Source engine.Source

	// Optimize is the level of optimization for the Godot export template.
	Optimize engine.Optimize

	// Platform defines which OS/platform to build for.
	Platform platform.OS

	// Profile is the optimization level of the template.
	Profile engine.Profile

	// SCons contains a specification for how to invoke the compiler.
	SCons SCons
}

Build uniquely specifies a compilation of a Godot export template.

func (*Build) Filename

func (b *Build) Filename() string

Filename returns the base name of the export template generated by this 'Binary' specification.

func (*Build) SConsCommand

func (b *Build) SConsCommand(rc *run.Context) *action.Process

SConsCommand returns the 'SCons' command to build the export template.

type SCons

type SCons struct {
	// CCFlags are additional 'CFLAGS' to append to the SCons build command.
	// Note that 'CCFLAGS=...' will be appended *before* 'ExtraArgs'.
	CCFlags []string `hash:"set" toml:"ccflags"`
	// CFlags are additional 'CFLAGS' to append to the SCons build command. Note
	// that 'CFLAGS=...' will be appended *before* 'ExtraArgs'.
	CFlags []string `hash:"set" toml:"cflags"`
	// CXXFlags are additional 'CXXFLAGS' to append to the SCons build command.
	// Note that 'CXXFLAGS=...' will be appended *before* 'ExtraArgs'.
	CXXFlags []string `hash:"set" toml:"cxxflags"`
	// CacheSizeLimit is the limit in MiB.
	CacheSizeLimit *uint32 `hash:"ignore" toml:"cache_size_limit"` // Ignore; doesn't affect binary.
	// Command contains arguments used to invoke SCons. Defaults to ["scons"].
	Command []string `hash:"set" toml:"command"`
	// ExtraArgs are additional arguments to append to the SCons build command.
	ExtraArgs []string `hash:"set" toml:"extra_args"`
	// LinkFlags are additional flags passed to the linker during the SCons
	// build command.
	LinkFlags []string `hash:"set" toml:"link_flags"`
	// PathCache is the path to the SCons cache, relative to the manifest.
	PathCache osutil.Path `hash:"ignore" toml:"cache_path"` // Ignore; doesn't affect binary.
}

SCons defines options and settings for use with the Godot build system.

func (*SCons) CacheSizeLimitFromEnv

func (c *SCons) CacheSizeLimitFromEnv() *uint32

CacheSizeLimitFromEnv returns a SCons cache size limit set via environment variable.

func (*SCons) Configure

func (c *SCons) Configure(rc *run.Context) error

func (*SCons) ExtraArgsFromEnv

func (c *SCons) ExtraArgsFromEnv() []string

ExtraArgsFromEnv returns extra SCons arguments set via environment variable.

func (*SCons) PathCacheFromEnv

func (c *SCons) PathCacheFromEnv() osutil.Path

PathCacheFromEnv returns a SCons cache path set via environment variable.

func (*SCons) Validate

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

Jump to

Keyboard shortcuts

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