mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
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:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
@@ -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.
|
||||
`
|
||||
Reference in New Issue
Block a user