Packaging and installing
Run bellui package in the folder of your app’s main package. It builds the
app and wraps it in the target platform’s format:
bellui package -os darwin-os (also spelled --target) chooses the platform. Without it, the command
packages for the system it runs on. The app name comes from --name, then the
manifest’s name, then the last element of your module path.
-os | Output |
|---|---|
darwin | Name.app, a macOS application bundle. |
windows | Name.exe with the icon, version information and an application manifest built in. |
linux, freebsd, openbsd, netbsd | Name.tar.xz (.tar.gz on OpenBSD) holding the binary, a desktop entry, the icon and a Makefile. |
android, android/arm64, android/arm, android/amd64, android/386 | Name.apk. Plain android includes all four architectures. |
ios, iossimulator | Name.app, for a device or for the iOS Simulator. |
web (or wasm) | A wasm folder holding everything needed to serve the app. |
Useful flags:
--app-id,--name,--app-version,--app-buildand--iconoverride the manifest.--releasebuilds an optimised, non-debuggable package. It is still signed with a development key on Android, so you can install it directly. For a store submission usebellui release.--tagspasses Go build tags, for example--tags glfor the OpenGL renderer.--exewraps an executable you built yourself instead of building one (desktop and web only).--srcpackages a different folder than the current one (not for mobile).
Platform notes
The bundle holds the executable in Contents/MacOS, an icon.icns made from
your icon, and an Info.plist with the app ID, name, version and build
number. File associations, URL schemes and usage descriptions from the
manifest are written into Info.plist too.
Without an app ID the bundle gets com.example.<name>.
Installing on this computer
bellui install packages the app and installs it in the usual place:
| System | Installed to |
|---|---|
| macOS | /Applications |
| Windows | Program Files\<name>, after an administrator prompt |
| Linux and BSD | /usr/local (or /usr if there is no /usr/local) |
--dst chooses another folder. On Linux, installing to the system folders
needs root.
bellui install can also fetch an app from its Git repository, build it in
release mode and install it:
bellui install github.com/example/notes@latest@<branch-or-tag> installs that branch or tag, and with no @ the default
branch is used. @latest takes the last tag starting with v in the
repository’s tag list.
Installing on a phone or simulator
With -os, bellui install packages for a mobile target and installs there:
-os | Uses |
|---|---|
android and the android/… variants | adb install to the connected device or emulator |
ios | ios-deploy to the connected device |
iossimulator | xcrun simctl install to the booted simulator, then starts the app |
The tools in the right-hand column must be installed and on your PATH.
Building without packaging
bellui build builds only the executable, with the same -os, --tags,
--release and -o flags. --pprof adds Go’s profiling server, on port
6060 unless you set --pprof-port.