Documentation ¶
Index ¶
- Variables
- func AddClass(config *PackageConfig, name string)
- func AddDotGitIgnore(config *PackageConfig)
- func AddLicense(config *PackageConfig, name string)
- func AddQtModule(config *PackageConfig, module string)
- func AddTest(config *PackageConfig, name string)
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func Build(refresh bool, buildType BuildType)
- func BuildFolder(buildType BuildType) string
- func BuildOptions(defaultOption, compileCommand string, path string) []string
- func CMakeOptions(qtDir string) []string
- func Clean()
- func CleanList(modules []string) []string
- func CleanName(name string) string
- func CopyFile(src, dst string) (err error)
- func CreateIcon(rootPackageDir string, buildType BuildType)
- func CreateResource(rootPackageDir string) bool
- func Doc()
- func DownloadZip(installDir, orgName, repoName string) error
- func Env(vars []string)
- func FileCopy(dest, source string) error
- func FindQt(dir string) string
- func FindWix() string
- func Format(targetFiles []string)
- func Get(packageName string, update, useGit bool)
- func GetCompileCommand(dir string) map[string]string
- func GetDefaultIncludeOptions(dir string) string
- func GetLangFromTSFile(filename string) string
- func InitApplication(name, license string)
- func InitLibrary(name, license string)
- func LinguistAdd(language string, update bool)
- func LinguistEdit(language string)
- func LinguistUpdate()
- func MustAsset(name string) []byte
- func NormalizeLicense(licenseName string) (string, string, error)
- func OldestUnixTime(paths ...string) int64
- func Pack(buildType BuildType, zipPack, wixPack bool)
- func ParseName(name string) (dirName, className, parentName string)
- func PrintCommand(cmd *exec.Cmd, envs []string)
- func ReleaseTranslation(rootPackageDir, srcDir string) error
- func RequiredQtModules(config *PackageConfig, dependencies []*PackageConfig) []string
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func Run(refresh bool, buildType BuildType)
- func RunCMakeAndBuild(rootPackageDir string, packageConfig *PackageConfig, buildType BuildType, ...) error
- func SequentialRun(workDir string) *sequentialRun
- func SetUseWebAssemblyCompiler(asmJS, webAsm bool)
- func SetVerbose()
- func SetupWebAssemblyTool(update bool)
- func Test(refresh bool)
- func TopologicalSort(edges [][2]string) ([]string, [][2]string)
- func Touch(rootConfig *PackageConfig, buildType BuildType, verbose bool)
- func UserName() string
- func Vet(targetFiles []string)
- func WriteLicense(dir, license string) error
- func WriteTemplate(basePath, dir, fileName, templateName string, variable interface{}, ...) (bool, error)
- type BuildType
- type Cmd
- type CompileCommand
- type FilterType
- type InstallHeaderDir
- type PackageConfig
- type PackageUserConfig
- type ProjectDetail
- func AddCMakeForApp(config *PackageConfig, rootPackageDir string, dependencies []*PackageConfig, ...) (bool, *ProjectDetail, error)
- func AddCMakeForLib(config *PackageConfig, rootPackageDir string, dependencies []*PackageConfig, ...) (bool, *ProjectDetail, error)
- func BuildPackage(rootConfig, config *PackageConfig, buildType BuildType, ...) (*ProjectDetail, error)
- func (pd *ProjectDetail) AllFiles(isApplication bool, filter FilterType) []string
- func (sv ProjectDetail) AuthorName() string
- func (sv ProjectDetail) CopyRight() string
- func (sv ProjectDetail) Description() string
- func (sv ProjectDetail) InstallHeaders() []*InstallHeaderDir
- func (sv ProjectDetail) LicenseName() string
- func (sv ProjectDetail) Organization() string
- func (sv ProjectDetail) RequireLibs() string
- func (sv *ProjectDetail) SearchFiles()
- func (sv ProjectDetail) ShortVersion() string
- func (sv ProjectDetail) TargetLarge() string
- func (sv ProjectDetail) TargetLibName() string
- func (sv ProjectDetail) TargetSmall() string
- func (sv ProjectDetail) Version() string
- func (sv ProjectDetail) VersionMajor() int
- func (sv ProjectDetail) VersionMinor() int
- func (sv ProjectDetail) VersionPatch() int
- type Require
- type SourceBundle
- type SourcePathFilter
Constants ¶
This section is empty.
Variables ¶
var ( QTPMVersion = []int{0, 8, 8} QTPMVersionString = fmt.Sprintf("%d.%d.%d", QTPMVersion[0], QTPMVersion[1], QTPMVersion[2]) )
var Verbose bool
Functions ¶
func AddClass ¶
func AddClass(config *PackageConfig, name string)
func AddDotGitIgnore ¶
func AddDotGitIgnore(config *PackageConfig)
func AddLicense ¶
func AddLicense(config *PackageConfig, name string)
func AddQtModule ¶
func AddQtModule(config *PackageConfig, module string)
func AddTest ¶
func AddTest(config *PackageConfig, name string)
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func BuildFolder ¶
func BuildOptions ¶
func CMakeOptions ¶
func CreateIcon ¶
func CreateResource ¶
func DownloadZip ¶
func GetCompileCommand ¶
func GetLangFromTSFile ¶
func InitApplication ¶
func InitApplication(name, license string)
func InitLibrary ¶
func InitLibrary(name, license string)
func LinguistAdd ¶
func LinguistEdit ¶
func LinguistEdit(language string)
func LinguistUpdate ¶
func LinguistUpdate()
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func OldestUnixTime ¶
func PrintCommand ¶
func ReleaseTranslation ¶
func RequiredQtModules ¶
func RequiredQtModules(config *PackageConfig, dependencies []*PackageConfig) []string
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
func RunCMakeAndBuild ¶
func RunCMakeAndBuild(rootPackageDir string, packageConfig *PackageConfig, buildType BuildType, update, build, install bool) error
func SequentialRun ¶
func SequentialRun(workDir string) *sequentialRun
func SetUseWebAssemblyCompiler ¶
func SetUseWebAssemblyCompiler(asmJS, webAsm bool)
func SetVerbose ¶
func SetVerbose()
func SetupWebAssemblyTool ¶
func SetupWebAssemblyTool(update bool)
func TopologicalSort ¶
func Touch ¶
func Touch(rootConfig *PackageConfig, buildType BuildType, verbose bool)
func WriteLicense ¶
Types ¶
type Cmd ¶
type Cmd struct { Silent bool // contains filtered or unexported fields }
func CommandWithPath ¶ added in v0.8.7
type CompileCommand ¶
type InstallHeaderDir ¶
type InstallHeaderDir struct { TargetDir string Files *SourceBundle }
type PackageConfig ¶
type PackageConfig struct { Name string `toml:"name"` Description string `toml:"description"` Author string `toml:"author"` Organization string `toml:"organization"` License string `toml:"license"` Requires []string `toml:"requires"` QtModules []string `toml:"qtmodules"` Version []int `toml:"version"` ExtraInstallDirs []string `toml:"extra_install_dirs"` ProjectStartYear int `toml:"project_start_year"` QTPMVersion []int `toml:"qtpm_version"` IsApplication bool `toml:"-"` Dir string `toml:"-"` PackageName string `toml:"-"` Children map[string]*PackageConfig `toml:"-"` DirtyFlag bool `toml:"-"` }
func FilterDependencies ¶
func FilterDependencies(config *PackageConfig, allDependencies []*PackageConfig) []*PackageConfig
func LoadConfig ¶
func LoadConfig(dir string, traverse bool) (*PackageConfig, error)
func MustLoadConfig ¶
func MustLoadConfig(dir string, traverse bool) *PackageConfig
func (*PackageConfig) Save ¶
func (config *PackageConfig) Save() error
func (*PackageConfig) SaveIfDirty ¶
func (config *PackageConfig) SaveIfDirty() error
type PackageUserConfig ¶
func LoadUserConfig ¶
func LoadUserConfig(dirPatb string) (*PackageUserConfig, error)
type ProjectDetail ¶
type ProjectDetail struct { Target string Requires []Require QtModules []string AllDependencies []string Sources *SourceBundle InstallHeaderDirs map[string]*SourceBundle Tests *SourceBundle ExtraTestSources *SourceBundle Examples *SourceBundle ExtraExampleSources *SourceBundle Resources *SourceBundle HasQtResource bool SubDir bool BuildNumber int // contains filtered or unexported fields }
func AddCMakeForApp ¶
func AddCMakeForApp(config *PackageConfig, rootPackageDir string, dependencies []*PackageConfig, refresh bool, buildType BuildType) (bool, *ProjectDetail, error)
func AddCMakeForLib ¶
func AddCMakeForLib(config *PackageConfig, rootPackageDir string, dependencies []*PackageConfig, refresh bool, buildType BuildType) (bool, *ProjectDetail, error)
func BuildPackage ¶
func BuildPackage(rootConfig, config *PackageConfig, buildType BuildType, refresh, build, install bool) (*ProjectDetail, error)
func (*ProjectDetail) AllFiles ¶
func (pd *ProjectDetail) AllFiles(isApplication bool, filter FilterType) []string
func (ProjectDetail) AuthorName ¶
func (sv ProjectDetail) AuthorName() string
func (ProjectDetail) CopyRight ¶
func (sv ProjectDetail) CopyRight() string
func (ProjectDetail) Description ¶
func (sv ProjectDetail) Description() string
func (ProjectDetail) InstallHeaders ¶
func (sv ProjectDetail) InstallHeaders() []*InstallHeaderDir
func (ProjectDetail) LicenseName ¶
func (sv ProjectDetail) LicenseName() string
func (ProjectDetail) Organization ¶
func (sv ProjectDetail) Organization() string
func (ProjectDetail) RequireLibs ¶
func (sv ProjectDetail) RequireLibs() string
func (*ProjectDetail) SearchFiles ¶
func (sv *ProjectDetail) SearchFiles()
func (ProjectDetail) ShortVersion ¶
func (sv ProjectDetail) ShortVersion() string
func (ProjectDetail) TargetLarge ¶
func (sv ProjectDetail) TargetLarge() string
func (ProjectDetail) TargetLibName ¶
func (sv ProjectDetail) TargetLibName() string
func (ProjectDetail) TargetSmall ¶
func (sv ProjectDetail) TargetSmall() string
func (ProjectDetail) Version ¶
func (sv ProjectDetail) Version() string
func (ProjectDetail) VersionMajor ¶
func (sv ProjectDetail) VersionMajor() int
func (ProjectDetail) VersionMinor ¶
func (sv ProjectDetail) VersionMinor() int
func (ProjectDetail) VersionPatch ¶
func (sv ProjectDetail) VersionPatch() int
type Require ¶
func DependenciesLibs ¶
func DependenciesLibs(config *PackageConfig, dependencies []*PackageConfig) []Require
type SourceBundle ¶
type SourceBundle struct { Name string Files []string Test bool PlatformSpecificFiles map[string][]string }
func NewSourceBundle ¶
func NewSourceBundle(name string, test bool) *SourceBundle
func (SourceBundle) DefineList ¶
func (s SourceBundle) DefineList() string
func (SourceBundle) EndLoop ¶
func (s SourceBundle) EndLoop() string
func (SourceBundle) HasItem ¶
func (s SourceBundle) HasItem() bool
func (SourceBundle) StartLoop ¶
func (s SourceBundle) StartLoop() string
type SourcePathFilter ¶
type SourcePathFilter struct {
// contains filtered or unexported fields
}
func NewSourcePathFilter ¶
func NewSourcePathFilter(config *PackageConfig, paths []string) *SourcePathFilter
func (SourcePathFilter) Match ¶
func (pf SourcePathFilter) Match(path string) bool