github.com/cybriq/giocore@v0.0.7-0.20210703034601-cfb9cb5f3900/cmd/gogio/help.go (about) 1 // SPDX-License-Identifier: Unlicense OR MIT 2 3 package main 4 5 const mainUsage = `The gogio command builds and packages Gio (github.com/cybriq/giocore) programs. 6 7 Usage: 8 9 gogio -target <target> [flags] <package> [run arguments] 10 11 The gogio tool builds and packages Gio programs for platforms where additional 12 metadata or support files are required. 13 14 The package argument specifies an import path or a single Go source file to 15 package. Any run arguments are appended to os.Args at runtime. 16 17 Compiled Java class files from jar files in the package directory are 18 included in Android builds. 19 20 The mandatory -target flag selects the target platform: ios or android for the 21 mobile platforms, tvos for Apple's tvOS, js for WebAssembly/WebGL. 22 23 The -arch flag specifies a comma separated list of GOARCHs to include. The 24 default is all supported architectures. 25 26 The -o flag specifies an output file or directory, depending on the target. 27 28 The -buildmode flag selects the build mode. Two build modes are available, exe 29 and archive. Buildmode exe outputs an .ipa file for iOS or tvOS, an .apk file 30 for Android or a directory with the WebAssembly module and support files for 31 a browser. 32 33 The -ldflags and -tags flags pass extra linker flags and tags to the go tool. 34 35 As a special case for iOS or tvOS, specifying a path that ends with ".app" 36 will output an app directory suitable for a simulator. 37 38 The other buildmode is archive, which will output an .aar library for Android 39 or a .framework for iOS and tvOS. 40 41 The -icon flag specifies a path to a PNG image to use as app icon on iOS and Android. 42 If left unspecified, the appicon.png file from the main package is used 43 (if it exists). 44 45 The -appid flag specifies the package name for Android or the bundle id for 46 iOS and tvOS. A bundle id must be provisioned through Xcode before the gogio 47 tool can use it. 48 49 The -version flag specifies the integer version code for Android and the last 50 component of the 1.0.X version for iOS and tvOS. 51 52 For Android builds the -minsdk flag specify the minimum SDK level. For example, 53 use -minsdk 22 to target Android 5.1 (Lollipop) and later. 54 55 For Windows builds the -minsdk flag specify the minimum OS version. For example, 56 use -mindk 10 to target Windows 10 only, -minsdk 6 for Windows Vista and later. 57 58 The -work flag prints the path to the working directory and suppress 59 its deletion. 60 61 The -x flag will print all the external commands executed by the gogio tool. 62 63 The -signkey flag specifies the path of the keystore, used for signing Android apk/aab files. 64 65 The -signpass flag specifies the password of the keystore, ignored if -signkey is not provided. 66 `