template

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidInput = config.ErrInvalidInput

Functions

func NewCopyImageFileAction

func NewCopyImageFileAction(
	pathImage build.Path,
	inv *build.Invocation,
) action.WithDescription[action.Function]

NewCopyImageFileAction creates an 'action.Action' which places the specified icon image into the Godot source code.

Types

type Base

type Base struct {
	// Arch is the CPU architecture of the Godot export template.
	Arch build.Arch `toml:"arch"`
	// CustomModules is a list of paths to custom modules to include in the
	// template build.
	CustomModules []build.Path `toml:"custom_modules"`
	// DoublePrecision enables double floating-point precision.
	DoublePrecision *bool `toml:"double_precision"`
	// 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 build.Hook `toml:"hook"`
	// Optimize is the specific optimization level for the template.
	Optimize build.Optimize `toml:"optimize"`
	// PathCustomPy is a path to a 'custom.py' file which defines export
	// template build options.
	PathCustomPy build.Path `toml:"custom_py_path"`
	// SCons contains build command-related settings.
	SCons build.SCons `toml:"scons"`
}

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

func (*Base) Configure

func (c *Base) Configure(inv build.Invocation) error

func (*Base) MergeInto

func (c *Base) MergeInto(other any) error

func (*Base) ToTemplate

func (c *Base) ToTemplate(g build.Godot, inv build.Invocation) build.Template

func (*Base) Validate

func (c *Base) Validate(inv build.Invocation) error

type BaseWithoutFeature

type BaseWithoutFeature struct {
	*Base

	Profile map[build.Profile]Base `toml:"profile"`
}

type Linux

type Linux struct {
	*Base

	// UseLLVM determines whether the LLVM compiler is used.
	UseLLVM *bool `toml:"use_llvm"`
}

func (*Linux) Configure

func (c *Linux) Configure(inv build.Invocation) error

func (*Linux) MergeInto

func (c *Linux) MergeInto(other any) error

func (*Linux) ToTemplate

func (c *Linux) ToTemplate(g build.Godot, inv build.Invocation) build.Template

func (*Linux) Validate

func (c *Linux) Validate(inv build.Invocation) error

type LinuxWithFeaturesAndProfile

type LinuxWithFeaturesAndProfile struct {
	*Linux

	Feature map[string]LinuxWithProfile `toml:"feature"`
	Profile map[build.Profile]Linux     `toml:"profile"`
}

type LinuxWithProfile

type LinuxWithProfile struct {
	*Linux

	Profile map[build.Profile]Linux `toml:"profile"`
}

type MacOS

type MacOS struct {
	*Base

	// LipoCommand contains arguments used to invoke 'lipo'. Defaults to
	// ["lipo"]. Only used if 'arch' is set to 'build.ArchUniversal'.
	LipoCommand []string `toml:"lipo_command"`

	// Vulkan defines Vulkan-related configuration.
	Vulkan Vulkan `toml:"vulkan"`
}

func (*MacOS) Configure

func (c *MacOS) Configure(inv build.Invocation) error

func (*MacOS) MergeInto

func (c *MacOS) MergeInto(other any) error

func (*MacOS) ToTemplate

func (c *MacOS) ToTemplate(g build.Godot, inv build.Invocation) build.Template

func (*MacOS) Validate

func (c *MacOS) Validate(inv build.Invocation) error

type MacOSWithFeaturesAndProfile

type MacOSWithFeaturesAndProfile struct {
	*MacOS

	Feature map[string]MacOSWithProfile `toml:"feature"`
	Profile map[build.Profile]MacOS     `toml:"profile"`
}

type MacOSWithProfile

type MacOSWithProfile struct {
	*MacOS

	Profile map[build.Profile]MacOS `toml:"profile"`
}

type Platforms

type Platforms struct {
	Linux   LinuxWithFeaturesAndProfile   `toml:"linux"`
	MacOS   MacOSWithFeaturesAndProfile   `toml:"macos"`
	Windows WindowsWithFeaturesAndProfile `toml:"windows"`
}

type Template

type Template interface {
	config.Configurable
	build.Templater
}

type Templates

type Templates struct {
	*Base

	Platform Platforms                     `toml:"platform"`
	Feature  map[string]BaseWithoutFeature `toml:"feature"`
	Profile  map[build.Profile]Base        `toml:"profile"`
}

Template defines the parameters for building a Godot export template for a specified platform. A 'Template' definition can be customized based on 'feature', 'platform', and 'profile' labels used in the property names. Note that each specifier label can only be used once per property name (i.e. 'target.profile.release.profile.debug' is not allowed). Additionally, the order of specifiers is strict: 'platform' < 'feature' < 'profile'.

For example, the following are all valid table names:

[template]
[template.profile.release]
[template.platform.macos.feature.client]
[template.platform.linux.feature.server.profile.release_debug]

func (*Templates) Build

func (t *Templates) Build(inv build.Invocation) (Template, error)

type Vulkan

type Vulkan struct {
	// Dynamic enables dynamically linking Vulkan to the template.
	Dynamic *bool `toml:"use_volk"`

	// PathSDK is the path to the Vulkan SDK root.
	PathSDK build.Path `toml:"sdk_path"`
}

Vulkan defines the settings required by the MacOS template for including Vulkan support.

func (*Vulkan) Configure

func (c *Vulkan) Configure(inv build.Invocation) error

func (*Vulkan) Validate

func (c *Vulkan) Validate(_ build.Invocation) error

type Windows

type Windows struct {
	*Base

	// UseMinGW determines whether the MinGW compiler is used.
	UseMinGW *bool `toml:"use_mingw"`

	// PathIcon is a path to a Windows application icon.
	PathIcon build.Path `toml:"icon_path"`
}

func (*Windows) Configure

func (c *Windows) Configure(inv build.Invocation) error

func (*Windows) MergeInto

func (c *Windows) MergeInto(other any) error

func (*Windows) ToTemplate

func (c *Windows) ToTemplate(g build.Godot, inv build.Invocation) build.Template

func (*Windows) Validate

func (c *Windows) Validate(inv build.Invocation) error

type WindowsWithFeaturesAndProfile

type WindowsWithFeaturesAndProfile struct {
	*Windows

	Feature map[string]WindowsWithProfile `toml:"feature"`
	Profile map[build.Profile]Windows     `toml:"profile"`
}

type WindowsWithProfile

type WindowsWithProfile struct {
	*Windows

	Profile map[build.Profile]Windows `toml:"profile"`
}

Jump to

Keyboard shortcuts

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