builders

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {

	// App build info.
	Info GuarkConfig

	// Build Config
	Config struct {

		// RC for linux.
		Linux struct {
			CC      string
			CXX     string
			Ldflags string
		}

		// RC for darwin.
		Darwin struct {
			CC      string
			CXX     string
			Ldflags string
		}

		// Build config for windows.
		Windows struct {
			CC      string
			CXX     string
			Windres string
			Ldflags string
		}
	}

	// build temp dir.
	Temp string

	// build logs output.
	Log *utils.Output

	// Build dest.
	Dest string

	// Clean dest dir if exists.
	Clean bool

	// Build targets.
	Targets []string

	// Builders
	Builders []Builder

	// Builder funcs
	BeforeFunc  func(*Build) error
	RunFunc     func(*Build) error
	CleanupFunc func(*Build)
}

func (*Build) Before

func (b *Build) Before() error

func (*Build) Cleanup

func (b *Build) Cleanup()

func (*Build) Run

func (b *Build) Run() error

type Builder

type Builder interface {

	// Setup before run.
	Before() error

	// Run the builder.
	Run() error

	// Cleanup build.
	Cleanup()
}

Builders/Compilers/Packagers interface.

type DarwinBuilder

type DarwinBuilder struct {

	// Main build.
	Build *Build
}

Darwin app builder.

func (DarwinBuilder) Before

func (b DarwinBuilder) Before() error

func (DarwinBuilder) Cleanup

func (b DarwinBuilder) Cleanup()

func (DarwinBuilder) Run

func (b DarwinBuilder) Run() (err error)

Build and compile MacOS app.

type EmbedBuilder

type EmbedBuilder struct {

	// Main build.
	Build *Build
	// contains filtered or unexported fields
}

Embeded files builder.

func (EmbedBuilder) Before

func (b EmbedBuilder) Before() error

func (EmbedBuilder) Cleanup

func (b EmbedBuilder) Cleanup()

func (EmbedBuilder) Run

func (b EmbedBuilder) Run() error

Build embed.go file.

type GuarkConfig

type GuarkConfig struct {
	GuarkFileVersion string `yaml:"guark"`
	Version          string `yaml:"version"` // App version
	ID               string `yaml:"id"`
	Name             string `yaml:"name"`
	License          string `yaml:"license"`
	LogLevel         string `yaml:"logLevel"`
	EngineName       string `yaml:"engineName"`
}

type LinuxBuilder

type LinuxBuilder struct {

	// Main build.
	Build *Build
}

Linux app builder.

func (LinuxBuilder) Before

func (b LinuxBuilder) Before() error

func (LinuxBuilder) Cleanup

func (b LinuxBuilder) Cleanup()

func (LinuxBuilder) Run

func (b LinuxBuilder) Run() error

Build and compile linux app.

type MetaBuilder

type MetaBuilder struct {

	// Main build.
	Build *Build
}

Meta files builder.

func (MetaBuilder) Before

func (b MetaBuilder) Before() error

func (MetaBuilder) Cleanup

func (b MetaBuilder) Cleanup()

func (MetaBuilder) Run

func (b MetaBuilder) Run() (err error)

Parse and build meta files.

type UIBuilder

type UIBuilder struct {

	// Task/Package manager.
	Pkg string

	// Main build.
	Build *Build
}

Front-end UI builder

func (UIBuilder) Before

func (b UIBuilder) Before() error

func (UIBuilder) Cleanup

func (b UIBuilder) Cleanup()

func (UIBuilder) Run

func (b UIBuilder) Run() error

type WindowsBuilder

type WindowsBuilder struct {

	// Main build.
	Build *Build
}

Windows app builder.

func (WindowsBuilder) Before

func (b WindowsBuilder) Before() error

func (WindowsBuilder) Cleanup

func (b WindowsBuilder) Cleanup()

func (WindowsBuilder) Run

func (b WindowsBuilder) Run() error

Build and compile windows app.

Jump to

Keyboard shortcuts

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