gogio

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT, MIT, Unlicense Imports: 27 Imported by: 0

README

gogio

English | 简体中文

Keel's copy of Gio's v0.10.0 packager runs through Run(args, Options) inside the keel CLI. The standalone cmd/gogio entrypoint also packages examples for the site. The upstream license is retained in LICENSE; patches are recorded in third_party/README.md.

GioRoot selects the import prefix used for application IDs, launch arguments, Android permissions and mobile resources. Options supply the working directory, environment and output writers. Calls are serialized because the upstream implementation keeps package-level state. The packager does not import Gio or other Keel packages. Windows resources and Keel's iOS simulator adapter stay in the CLI.

Run go test ./internal/gogio/... from the repository root.

Documentation

Index

Constants

View Source
const GioRoot = "github.com/dyike/keel/gio"

GioRoot is the import path of Keel's copy of Gio.

Variables

View Source
var AndroidFeatures = map[string][]string{
	"default": {`glEsVersion="0x00020000"`, `name="android.hardware.type.pc"`},
	"bluetooth": {
		`name="android.hardware.bluetooth"`,
		`name="android.hardware.bluetooth_le"`,
	},
	"camera": {
		`name="android.hardware.camera"`,
	},
}
View Source
var AndroidPermissions = map[string][]string{
	"network": {
		"android.permission.INTERNET",
	},
	"networkstate": {
		"android.permission.ACCESS_NETWORK_STATE",
	},
	"bluetooth": {
		"android.permission.BLUETOOTH",
		"android.permission.BLUETOOTH_ADMIN",
		"android.permission.ACCESS_FINE_LOCATION",
	},
	"camera": {
		"android.permission.CAMERA",
	},
	"storage": {
		"android.permission.READ_EXTERNAL_STORAGE",
		"android.permission.WRITE_EXTERNAL_STORAGE",
	},
	"wakelock": {
		"android.permission.WAKE_LOCK",
	},
	"microphone": {
		"android.permission.RECORD_AUDIO",
	},
}

Functions

func Run

func Run(args []string, o Options) error

Run packages a Gio program; args are gogio's command line, without the program name.

func UppercaseName

func UppercaseName(name string) string

UppercaseName returns a string with its first rune in uppercase.

Types

type Options

type Options struct {
	Dir            string    // working directory; default: the current one
	Env            []string  // environment; default: os.Environ()
	Stdout, Stderr io.Writer // default: os.Stdout, os.Stderr
	GioRoot        string    // Gio's import path; default: GioRoot
}

Options is the context a packaging run would get from its process.

type Semver

type Semver struct {
	Major, Minor, Patch int
	VersionCode         uint32
}

func (Semver) String

func (s Semver) String() string

func (Semver) StringCompact

func (s Semver) StringCompact() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL