2
0
mirror of synced 2025-02-21 14:08:14 +00:00
David Crawshaw e6e0a35f70 sprite/glsprite: add very basic package docs
Fixes golang/go#9286.

Change-Id: I231571e8a70e48ee9f8541fe710874f0086d3396
Reviewed-on: https://go-review.googlesource.com/1424
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2014-12-12 14:44:04 +00:00
2014-12-10 01:59:04 +00:00
2014-12-10 01:59:04 +00:00
2014-12-10 01:59:04 +00:00
2014-12-11 21:20:01 +00:00
2014-12-08 10:43:03 +11:00
2012-03-17 15:20:58 +11:00

Go support for Mobile devices

The Go mobile repository holds packages and build tools for using Go on Android.

This is early work and the build system is a bumpy ride. Building a binary for Android requires using a Go cross compiler and an external linker from the NDK.

For now, the easiest way to setup a build environment is using the provided Dockerfile:

go get -d golang.org/x/mobile/...
docker build -t mobile $GOPATH/src/golang.org/x/mobile

In your app directory under your $GOPATH, copy the following files from either the golang.org/x/mobile/basic or golang.org/x/mobile/libhello apps:

AndroidManifest.xml
all.bash
build.xml
jni/Android.mk
make.bash

Start with basic if you are writing an all-Go application (that is, an OpenGL game) or libhello if you are building a .so file for use from Java via gobind. Edit the files to change the name of your app.

To build, run:

docker run -v $GOPATH/src:/src mobile /bin/bash -c 'cd /src/your/project && ./make.bash'

When working with an all-Go application, this will produce a binary at $GOPATH/src/your/project/bin/name-debug.apk. You can use the adb tool to install and run this app. See all.bash for an example.

--

APIs are currently very limited, but under active development. Package documentation serves as a starting point:

Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.

Languages
Go 86.9%
Objective-C 4.7%
Java 4.6%
C 3.4%
HTML 0.3%
Other 0.1%