cmd/gogio: rename the gio too to gogio

The `gio` name clashes with a widely deployed GNOME tool.
Rename our tool to `gogio`, "the go tool for gio programs".

Fixes gio#20

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-09-18 22:42:31 +02:00
parent 31f7f04181
commit a12912c944
9 changed files with 28 additions and 28 deletions
+8 -8
View File
@@ -46,25 +46,25 @@ with the `-token` flag:
## Running on mobiles
For Android, iOS, tvOS the `gio` tool can build and package a Gio program for you.
For Android, iOS, tvOS the `gogio` tool can build and package a Gio program for you.
To build an Android .apk file from the `gophers` example:
$ go run gioui.org/cmd/gio -target android gioui.org/apps/gophers
$ go run gioui.org/cmd/gogio -target android gioui.org/apps/gophers
The apk can be installed to a running emulator or attached device with adb:
$ adb install gophers.apk
The gio tool passes command line arguments to os.Args at runtime:
The `gogio` tool passes command line arguments to os.Args at runtime:
$ go run gioui.org/cmd/gio -target android gioui.org/apps/gophers -token <github token>
$ go run gioui.org/cmd/gogio -target android gioui.org/apps/gophers -token <github token>
The `-appid` flag specifies the iOS bundle id or Android package id. The flag is required
for creating signed .ipa files for iOS and tvOS devices, because the bundle id must match an id
previously provisioned in Xcode. For example,
$ go run gioui.org/cmd/gio -target ios -appid <bundle-id> gioui.org/apps/gophers
$ go run gioui.org/cmd/gogio -target ios -appid <bundle-id> gioui.org/apps/gophers
Use the `Window->Devices and Simulators` option in Xcode to install the ipa file to the device.
If you have [ideviceinstaller](https://github.com/libimobiledevice/ideviceinstaller) installed,
@@ -75,7 +75,7 @@ you can install the app from the command line:
If you just want to run a program on the iOS simulator, use the `-o` flag to specify a .app
directory:
$ go run gioui.org/cmd/gio/ -o gophers.app -target ios gioui.org/apps/gophers
$ go run gioui.org/cmd/gogio -o gophers.app -target ios gioui.org/apps/gophers
Install the app to a running simulator with simctl:
@@ -84,10 +84,10 @@ Install the app to a running simulator with simctl:
## Webassembly/WebGL
To run a Gio program in a compatible browser, the `gio` tool can output a directory ready to
To run a Gio program in a compatible browser, the `gogio` tool can output a directory ready to
serve. With the `goxec` tool you don't even need a web server:
$ go run gioui.org/cmd/gio -target js gioui.org/apps/gophers
$ go run gioui.org/cmd/gogio -target js gioui.org/apps/gophers
$ go get github.com/shurcooL/goexec
$ goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir("gophers")))'
-10
View File
@@ -1,10 +0,0 @@
// SPDX-License-Identifier: Unlicense OR MIT
/*
The gio tool builds and packages Gio programs for Android, iOS/tvOS
and WebAssembly.
Run gio with no arguments for instructions, or see the examples at
https://gioui.org.
*/
package main
+10
View File
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: Unlicense OR MIT
/*
The gogio tool builds and packages Gio programs for Android, iOS/tvOS
and WebAssembly.
Run gogio with no arguments for instructions, or see the examples at
https://gioui.org.
*/
package main
+5 -5
View File
@@ -49,7 +49,7 @@ func main() {
}
flag.Parse()
if err := mainErr(); err != nil {
fmt.Fprintln(os.Stderr, err)
fmt.Fprintf(os.Stderr, "gogio: %v\n", err)
os.Exit(1)
}
os.Exit(0)
@@ -76,11 +76,11 @@ func mainErr() error {
// Find package name.
pkgPath, err := runCmd(exec.Command("go", "list", "-f", "{{.ImportPath}}", pkg))
if err != nil {
return fmt.Errorf("gio: %v", err)
return err
}
dir, err := runCmd(exec.Command("go", "list", "-f", "{{.Dir}}", pkg))
if err != nil {
return fmt.Errorf("gio: %v", err)
return err
}
elems := strings.Split(pkgPath, "/")
name := elems[len(elems)-1]
@@ -113,7 +113,7 @@ func mainErr() error {
bi.ldflags = fmt.Sprintf("-X gioui.org/ui/app.extraArgs=%s", strings.Join(appArgs, "|"))
}
if err := build(bi); err != nil {
return fmt.Errorf("gio: %v", err)
return err
}
return nil
}
@@ -151,7 +151,7 @@ func appIDFromPackage(pkgPath string) string {
}
func build(bi *buildInfo) error {
tmpDir, err := ioutil.TempDir("", "gio-")
tmpDir, err := ioutil.TempDir("", "gogio-")
if err != nil {
return err
}
+5 -5
View File
@@ -2,14 +2,14 @@
package main
const mainUsage = `The Gio command builds and packages Gio (gioui.org) programs.
const mainUsage = `The gogio command builds and packages Gio (gioui.org) programs.
Usage:
gio -target <target> [flags] <package> [run arguments]
gogio -target <target> [flags] <package> [run arguments]
The go tool is sufficient to build, install and run Gio programs on platforms
where a single executable is sufficient. The gio tool can build and package Gio
where a single executable is sufficient. The gogio tool can build and package Gio
programs for platforms where additional metadata or support files are required.
The package argument specifies an import path or a single Go source file to
@@ -38,7 +38,7 @@ The other buildmode is archive, which will output an .aar library for Android
or a .framework for iOS and tvOS.
The -appid flag specifies the package name for Android or the bundle id for
iOS and tvOS. A bundle id must be provisioned through Xcode before the gio
iOS and tvOS. A bundle id must be provisioned through Xcode before the gogio
tool can use it.
The -version flag specifies the integer version for Android and the last
@@ -47,5 +47,5 @@ component of the 1.0.X version for iOS and tvOS.
The -work flag prints the path to the working directory and suppress
its deletion.
The -x flag will print all the external commands executed by the gio tool.
The -x flag will print all the external commands executed by the gogio tool.
`