config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StyleEg = "英文"
	StyleCh = "中文"
)
View Source
const (
	CompilerBlackMoon    = "黑月编译"
	CompilerBlackMoonAsm = "黑月汇编"
	CompilerBlackMoonCPP = "黑月C++"
	CompilerBlackMoonMFC = "黑月MFC"
	CompilerStatic       = "静态编译"
	CompilerIndependent  = "独立编译"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Compiler CompilerType `mapstructure:"compiler"`
}

type CompilerType

type CompilerType string

func (*CompilerType) Args

func (c *CompilerType) Args(config string, description string) (args []string)

func (*CompilerType) IsBM

func (c *CompilerType) IsBM() bool

type Config

type Config struct {
	Project       *Project          `mapstructure:"project"`
	Includes      []string          `mapstructure:"includes"`
	Excludes      []string          `mapstructure:"excludes"`
	ExcludeBuilds []string          `mapstructure:"exclude-builds"` // 不被用于构建目标的源文件
	E2Txt         *E2Txt            `mapstructure:"e2txt"`
	Build         *Build            `mapstructure:"build"`
	Targets       []*Target         `mapstructure:"targets"`
	Scripts       map[string]string `mapstructure:"scripts"`
}

type E2Txt

type E2Txt struct {
	Style     string `mapstructure:"name-style"`
	GenerateE bool   `mapstructure:"generate-e"`
}

func (*E2Txt) ArgsE2Txt

func (et *E2Txt) ArgsE2Txt(source string, ecode string) (args []string)

func (*E2Txt) ArgsTxt2E

func (et *E2Txt) ArgsTxt2E(ecode string, source string) (args []string)

type Project

type Project struct {
	Name        string `mapstructure:"name"`
	Description string `mapstructure:"description"`
	Version     string `mapstructure:"version"`
	Author      string `mapstructure:"author"`
	Repository  string `mapstructure:"repository"`
	Homepage    string `mapstructure:"homepage"`
}

type Target

type Target struct {
	Name               string            `mapstructure:"name"`        // 目标名称,只是一个简单名字介绍
	Description        string            `mapstructure:"description"` // 目标描述
	Source             string            `mapstructure:"source"`      // 约定为相对于 ebuild.yaml 的相对路径
	Output             string            `mapstructure:"output"`
	Build              *Build            `mapstructure:"build"`
	CompileConfig      string            `mapstructure:"compile-config"`
	CompileDescription string            `mapstructure:"compile-description"`
	Package            bool              `mapstructure:"package"` // 是否为易包
	Hooks              map[string]string `mapstructure:"hooks"`
}

Jump to

Keyboard shortcuts

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