Packaging and distribution
Packaging and distribution
go build gives you an executable. To ship an app you usually need more: an
application bundle on macOS, an icon and version information in a Windows
executable, a desktop entry on Linux, an APK for Android, an app bundle for
iOS, or a folder of files for the web. The bellui command builds these for
you.
Install the command
The command is its own Go module, separate from the Bellui library:
go install github.com/belluikit/bellui/cmd/bellui@latestCheck that it is on your PATH:
bellui versionThis prints the version of the command and, when run inside your app’s module, the version of the Bellui library your app uses.
Commands
| Command | What it does |
|---|---|
bellui init [module] | Starts a new project in the current folder: go.mod, main.go, manifest.pxf and translations/en.json. |
bellui build | Builds the executable. In this release it does not compile your app’s metadata in; see App metadata. |
bellui package | Builds and wraps the app in the package format of the target platform. |
bellui install | Packages the app and installs it on this computer, or on a connected phone. |
bellui release | Packages and signs the app for an app store or other public distribution. |
bellui serve | Builds the web version and serves it on http://localhost:8080. |
bellui bundle | Turns files into Go resources compiled into your app. |
bellui translate | Collects the strings your code translates into a translation file. |
bellui env | Prints the Go, OS and Bellui versions, for bug reports. |
Run bellui help <command> for every flag of a command.
In this release the
main.go that bellui init writes ends with
w.ShowAndRun(), which does not compile. Change that line to
bellui.ShowAndRun(w).The manifest.pxf file: ID, name, version, icon and more.
What bellui package produces on each platform, and bellui install.
Signing and store packages for macOS, Windows, Android and iOS.
Where the icon comes from and how each platform uses it.
Compile images and other files into your app with bellui bundle.
Let users choose theme, colour and scale for all Bellui apps.