Documentation ¶
Index ¶
- func Cmd(image string, vol volume.Volume, opts Options, cmdArgs []string) *execabs.Cmd
- func Run(image string, vol volume.Volume, opts Options, cmdArgs []string) error
- func Usage(commands []Command)
- func WindowsResource(ctx Context) (string, error)
- type Android
- type Architecture
- type Command
- type CommonFlags
- type Context
- type Darwin
- type DarwinImage
- type Engine
- type FreeBSD
- type IOS
- type Linux
- type Options
- type Version
- type Web
- type Windows
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WindowsResource ¶
WindowsResource create a windows resource under the project root that will be automatically linked by compliler during the build
Types ¶
type Android ¶
type Android struct {
Context []Context
}
Android build and package the fyne app for the android OS
func (*Android) Description ¶
Description returns the command description
type Architecture ¶
type Architecture string
Architecture represents the Architecture type
const ( // ArchAmd64 represents the amd64 architecture ArchAmd64 Architecture = "amd64" // Arch386 represents the amd64 architecture Arch386 Architecture = "386" // ArchArm64 represents the arm64 architecture ArchArm64 Architecture = "arm64" // ArchArm represents the arm architecture ArchArm Architecture = "arm" // ArchMultiple represents the universal architecture used by some OS to // identify a binary that supports multiple architectures (fat binary) ArchMultiple Architecture = "multiple" )
func (Architecture) String ¶
func (a Architecture) String() string
type Command ¶
type Command interface { Name() string // Name returns the one word command name Description() string // Description returns the command description Parse(args []string) error // Parse parses the cli arguments Usage() // Usage displays the command usage Run() error // Run runs the command }
Command wraps the methods for a fyne-cross command
type CommonFlags ¶
type CommonFlags struct { // AppBuild represents the build number, should be greater than 0 and // incremented for each build AppBuild int // AppID represents the application ID used for distribution AppID string // AppVersion represents the version number in the form x, x.y or x.y.z semantic version AppVersion string // CacheDir is the directory used to share/cache sources and dependencies. // Default to system cache directory (i.e. $HOME/.cache/fyne-cross) CacheDir string // DockerImage represents a custom docker image to use for build DockerImage string // Engine is the container engine to use Engine engineFlag // Env is the list of custom env variable to set. Specified as "KEY=VALUE" Env envFlag // Icon represents the application icon used for distribution Icon string // Ldflags represents the flags to pass to the external linker Ldflags string // Additional build tags Tags tagsFlag // NoCache if true will not use the go build cache NoCache bool // NoStripDebug if true will not strip debug information from binaries NoStripDebug bool // Name represents the application name Name string // Release represents if the package should be prepared for release (disable debug etc) Release bool // RootDir represents the project root directory RootDir string // Silent enables the silent mode Silent bool // Debug enables the debug mode Debug bool // Pull attempts to pull a newer version of the docker image Pull bool }
CommonFlags holds the flags shared between all commands
type Context ¶
type Context struct { // Volume holds the mounted volumes between host and containers volume.Volume Architecture // Arch defines the target architecture Engine Engine // Engine is the container engine to use Env map[string]string // Env is the list of custom env variable to set. Specified as "KEY=VALUE" ID string // ID is the context ID LdFlags []string // LdFlags defines the ldflags to use OS string // OS defines the target OS Tags []string // Tags defines the tags to use AppBuild string // Build number AppID string // AppID is the appID to use for distribution AppVersion string // AppVersion is the version number in the form x, x.y or x.y.z semantic version CacheEnabled bool // CacheEnabled if true enable go build cache DockerImage string // DockerImage defines the docker image used to build Icon string // Icon is the optional icon in png format to use for distribution Name string // Name is the application name Package string // Package is the package to build named by the import path as per 'go build' Release bool // Enable release mode. If true, prepares an application for public distribution StripDebug bool // StripDebug if true, strips binary output Debug bool // Debug if true enable debug log Pull bool // Pull if true attempts to pull a newer version of the docker image // Release context Category string //Category represents the category of the app for store listing [macOS] Certificate string //Certificate represents the name of the certificate to sign the build [iOS, Windows] Developer string //Developer represents the developer identity for your Microsoft store account [Windows] Keystore string //Keystore represents the location of .keystore file containing signing information [Android] KeystorePass string //KeystorePass represents the password for the .keystore file [Android] KeyPass string //KeyPass represents the assword for the signer's private key, which is needed if the private key is password-protected [Android] Password string //Password represents the password for the certificate used to sign the build [Windows] Profile string //Profile represents the name of the provisioning profile for this release build [iOS] }
Context represent a build context
type Darwin ¶
type Darwin struct { Context []Context // contains filtered or unexported fields }
Darwin build and package the fyne app for the darwin OS
func (*Darwin) Description ¶
Description returns the command description
type DarwinImage ¶
type DarwinImage struct {
// contains filtered or unexported fields
}
DarwinImage builds the darwin docker image
func (*DarwinImage) Description ¶
func (cmd *DarwinImage) Description() string
Description returns the command description
func (*DarwinImage) Name ¶
func (cmd *DarwinImage) Name() string
Name returns the one word command name
func (*DarwinImage) Parse ¶
func (cmd *DarwinImage) Parse(args []string) error
Parse parses the arguments and set the usage for the command
func (*DarwinImage) Set ¶
Set is the method to set the flag value, part of the flag.Value interface. Set's argument is a string to be parsed to set the flag.
type Engine ¶
func MakeEngine ¶
MakeEngine returns a new container engine. Pass empty string to autodetect
type FreeBSD ¶
type FreeBSD struct {
Context []Context
}
FreeBSD build and package the fyne app for the freebsd OS
func (*FreeBSD) Description ¶
Description returns the command description
type IOS ¶
type IOS struct {
Context Context
}
IOS build and package the fyne app for the ios OS
func (*IOS) Description ¶
Description returns the command description
type Linux ¶
type Linux struct {
Context []Context
}
Linux build and package the fyne app for the linux OS
func (*Linux) Description ¶
Description returns the command description
type Options ¶
type Options struct { CacheEnabled bool // CacheEnabled if true enable go build cache Engine Engine // Engine is the container engine to use Env map[string]string // Env is the list of custom env variable to set WorkDir string // WorkDir set the workdir, default to volume's workdir Debug bool // Debug if true enable log verbosity }
Options define the options for the docker run command
type Version ¶
type Version struct{}
Version is the version command
func (*Version) Description ¶
Description returns the command description
type Web ¶
type Web struct {
Context Context
}
Web build and package the fyne app for the web
func (*Web) Description ¶
Description returns the command description