Documentation
¶
Index ¶
- Constants
- type Build
- func (b *Build) Default() *Build
- func (b *Build) GetBuildMode() build.Mode
- func (b *Build) GetBuildModeAsString() string
- func (b *Build) GetCompilerPath() string
- func (b *Build) GetDefaultArch() string
- func (b *Build) GetTags() []string
- func (b *Build) GetTargets() *slicer.StringSlicer
- func (b *Build) GetWebView2Strategy() string
- func (b *Build) Process() error
- type BuildCommon
- type Common
- type Dev
- type Doctor
- type GenerateModule
- type GenerateTemplate
- type Init
- type ShowReleaseNotes
- type Update
Constants ¶
View Source
const ( Quiet int = 0 Normal int = 1 Verbose int = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct {
Common
BuildCommon
NoPackage bool `name:"noPackage" description:"Skips platform specific packaging"`
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
Upx bool `description:"Compress final binary with UPX (if installed)"`
UpxFlags string `description:"Flags to pass to upx"`
Platform string `description:"Platform to target. Comma separate multiple platforms"`
OutputFilename string `name:"o" description:"Output filename"`
Clean bool `description:"Clean the bin directory before building"`
WebView2 string `description:"WebView2 installer strategy: download,embed,browser,error"`
ForceBuild bool `name:"f" description:"Force build of application"`
UpdateWailsVersionGoMod bool `name:"u" description:"Updates go.mod to use the same Wails version as the CLI"`
Debug bool `description:"Builds the application in debug mode"`
Devtools bool `description:"Enable Devtools in productions, Already enabled in debug mode (-debug)"`
NSIS bool `description:"Generate NSIS installer for Windows"`
TrimPath bool `description:"Remove all file system paths from the resulting executable"`
WindowsConsole bool `description:"Keep the console when building for Windows"`
Obfuscated bool `description:"Code obfuscation of bound Wails methods"`
GarbleArgs string `description:"Arguments to pass to garble"`
DryRun bool `description:"Prints the build command without executing it"`
// contains filtered or unexported fields
}
TODO: unify this and `build.Options`
func (*Build) GetBuildMode ¶
func (*Build) GetBuildModeAsString ¶
func (*Build) GetCompilerPath ¶
func (*Build) GetDefaultArch ¶
func (*Build) GetTargets ¶
func (b *Build) GetTargets() *slicer.StringSlicer
func (*Build) GetWebView2Strategy ¶
type BuildCommon ¶
type BuildCommon struct {
LdFlags string `description:"Additional ldflags to pass to the compiler"`
Compiler string `description:"Use a different go compiler to build, eg go1.15beta1"`
SkipBindings bool `description:"Skips generation of bindings"`
RaceDetector bool `name:"race" description:"Build with Go's race detector"`
SkipFrontend bool `name:"s" description:"Skips building the frontend"`
Verbosity int `name:"v" description:"Verbosity level (0 = quiet, 1 = normal, 2 = verbose)"`
Tags string `description:"Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"`
NoSyncGoMod bool `description:"Don't sync go.mod"`
}
func (BuildCommon) Default ¶
func (c BuildCommon) Default() BuildCommon
type Dev ¶
type Dev struct {
BuildCommon
AssetDir string `flag:"assetdir" description:"Serve assets from the given directory instead of using the provided asset FS"`
Extensions string `flag:"e" description:"Extensions to trigger rebuilds (comma separated) eg go"`
ReloadDirs string `flag:"reloaddirs" description:"Additional directories to trigger reloads (comma separated)"`
Browser bool `flag:"browser" description:"Open the application in a browser"`
NoReload bool `flag:"noreload" description:"Disable reload on asset change"`
NoColour bool `flag:"nocolor" description:"Disable colour in output"`
NoGoRebuild bool `flag:"nogorebuild" description:"Disable automatic rebuilding on backend file changes/additions"`
WailsJSDir string `flag:"wailsjsdir" description:"Directory to generate the Wails JS modules"`
LogLevel string `flag:"loglevel" description:"LogLevel to use - Trace, Debug, Info, Warning, Error)"`
ForceBuild bool `flag:"f" description:"Force build of application"`
Debounce int `flag:"debounce" description:"The amount of time to wait to trigger a reload on change"`
DevServer string `flag:"devserver" description:"The address of the wails dev server"`
AppArgs string `flag:"appargs" description:"arguments to pass to the underlying app (quoted and space separated)"`
Save bool `flag:"save" description:"Save the given flags as defaults"`
FrontendDevServerURL string `flag:"frontenddevserverurl" description:"The url of the external frontend dev server to use"`
// contains filtered or unexported fields
}
func (*Dev) DevServerURL ¶
func (*Dev) GenerateBuildOptions ¶
GenerateBuildOptions creates a build.Options using the flags
func (*Dev) ProjectConfig ¶
type GenerateModule ¶
type GenerateTemplate ¶
type Init ¶
type Init struct {
Common
TemplateName string `name:"t" description:"Name of built-in template to use, path to template or template url"`
ProjectName string `name:"n" description:"Name of project"`
CIMode bool `name:"ci" description:"CI Mode"`
ProjectDir string `name:"d" description:"Project directory"`
Quiet bool `name:"q" description:"Suppress output to console"`
InitGit bool `name:"g" description:"Initialise git repository"`
IDE string `name:"ide" description:"Generate IDE project files"`
List bool `name:"l" description:"List templates"`
}
type ShowReleaseNotes ¶
Click to show internal directories.
Click to hide internal directories.