Daniel Martí
e8ba5b6aff
all: remove a couple of unused parameters
...
Both from unexported functions, to keep the change low-risk. Found via
unparam.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc >
2019-08-25 22:48:15 +01:00
Daniel Martí
2542c55e9d
all: fix some issues spotted by static analysis
...
First, vet was upset by two incorrect fmt verbs. One was an extra %x,
when there was just one argument, so remove it. Another was a %p with a
non-pointer. It's a struct, so for now simply use %#v.
Second, staticcheck found some unused or unnecessary bits of code;
remove the obvious ones.
Finally, staticcheck also complained about some error strings which were
capitalized or had periods. Adjust those, which also makes all error
messages more consistent.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc >
2019-08-25 22:41:05 +01:00
Elias Naur
44c7be6750
cmd/gio: expand usage document
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-24 22:48:00 +01:00
Elias Naur
470478e574
cmd/gio: replace errorf with a main function returning errors
...
While we're here, split the usage print out to its own function and
don't display the usage when a package is missing.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-24 21:44:21 +01:00
Elias Naur
7780cf1353
cmd/gio: use path.Base for Go import paths
...
Go import paths always use forward slashes as separators.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-24 17:44:51 +01:00
Elias Naur
6433cb2d88
cmd/gio: change all occurences of *appID with the buildInfo field
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-24 17:44:14 +01:00
Elias Naur
1f918c751e
cmd/gio: use package name for iOS binaries
...
To make it easier to locate the app in the Console app.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-20 11:10:59 +02:00
Elias Naur
c52376065e
cmd/gio: list available bundle ids when no match was found
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-16 14:24:58 +02:00
Elias Naur
9d9051d468
cmd/gio: provide DT* fields in iOS Info.plists
...
Required by App Store.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-16 13:50:55 +02:00
Elias Naur
6007a8c90e
cmd/gio: specify CFBundleSupportedPlatforms in iOS ipa bundles
...
Required by App Store.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-16 12:53:09 +02:00
Elias Naur
c4e46e0348
cmd/gio: add support for iOS App Store icons
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-16 12:32:53 +02:00
Elias Naur
50599bc65d
cmd/gio: support app icons
...
If there is an appicon.png file in the main package the gio tool
will use it for Android and iOS apps in buildmode exe.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-16 12:08:44 +02:00
Elias Naur
c578043970
cmd/gio: handle subdirectories in apk files
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-15 17:50:56 +02:00
Elias Naur
2440e1880e
cmd/gio: specify UISupportedInterfaceOrientations
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-15 09:43:31 +02:00
Elias Naur
b10175b233
cmd/gio: add -version flag
...
For Android and iOS.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 17:09:44 +02:00
Elias Naur
105d094030
cmd/gio: drop appDir function
...
It's not worth its weight.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 17:02:36 +02:00
Elias Naur
632e4e3ae6
cmd/gio: specify UIDeviceFamily
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 16:52:58 +02:00
Elias Naur
ed0bbe9dd2
cmd/gio: filter out unsupported architectures, specify MinimumOSVersion
...
For the App Store.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 16:43:44 +02:00
Elias Naur
5ac1b6ea3c
cmd/gio: set DTPlatformName, DTPlatformVersion, UIRequiredDeviceCapabilities
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 14:59:27 +02:00
Elias Naur
564f30ca0f
cmd/gio: use the package name for app directories inside ipa files
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 14:24:51 +02:00
Elias Naur
2a07890086
cmd/gio: add provisioning file to ipa apps
...
Required by App Store.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-14 12:49:50 +02:00
Elias Naur
3c69c81401
cmd/gio: add package documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 20:03:39 +02:00
Elias Naur
f223c7b0c9
cmd/gio: clarify usage summary
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-07 14:01:32 +02:00
Elias Naur
ddcbccf041
cmd/gio: simplify -o flag description
...
Only mention the special case for iOS simulators.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-07 12:37:44 +02:00
Elias Naur
8472bbc78b
ui/app,cmd/gio: move running of main from driver to GioAppDelegate
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-05 15:38:34 +02:00
Elias Naur
6ce224b89f
cmd/gio: don't strip debug info for webassembly builds
...
The space savings are minimal and we lose function names in the
browser debuggers.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-02 15:48:27 +02:00
Elias Naur
1c5ceab9c1
cmd/gio: don't add a container div for -target js
...
THe webassembly backend can create and add it itself.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-02 09:05:34 +02:00
Elias Naur
5bf5f1e64d
cmd/gio: (wasm) support command line flags
...
Strip also DWARF and the symbol table while here.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-29 13:36:12 +02:00
Elias Naur
c080a54038
ui/app: call main from Android and iOS
...
Android can only run c-shared libraries which means that every
Gio program must create its window and event loop from an init
function.
The same applies to iOS but for a more benign reason: the gio tool
builds programs in c-archive mode for iOS and links the binary with
a Objective-C driver.
Allow Gio programs to run off its main function by linking to and
invoking main even from Android libraries and iOS ditto.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-22 11:33:09 +02:00
Elias Naur
cde040369c
cmd/gio: use the import path as basis for the output file
...
Before this change `go list <pkg>` was used to sanitize the import
path of the package argument. That doesn't work well for building
Go source files directly:
gio -target android helloworld.go
where `go list helloworld.go` simply returns "command-line-arguments".
A better way is to leave the package path alone, and compute the
output file separately from the import path, as reported by
`go list -f {{.ImportPath}} <pkg>`.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-13 20:19:25 +02:00
Elias Naur
9d8d5da106
cmd/gio: (android) don't compress resources.arsc in apks
...
Compressing resources.arsc result in warnings such as
"resources.arsc in APK '...' is compressed."
in the adb logs.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-11 13:22:42 +02:00
Elias Naur
15c4ce9e22
ui/app,cmd/gio: support edge-to-edge layout on Android
...
Implement recomendations from
https://developer.android.com/preview/features/gesturalnav#java
While here, give up on providing translucent top and bottom bars on
Android 4.4 and below. It's simpler to use the app drawn system
backgrounds from 5.0 and newer.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-11 13:05:29 +02:00
Elias Naur
828a695086
cmd/gio: rename -v to -x and add -work
...
The verbose flag only triggered printing of commands, which is
traditionally named -x by other Go tools.
The -work flag will print and preserve the temporary directory.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-11 11:11:06 +02:00
Elias Naur
491d81e0c8
cmd/gio: set windowSoftInputMode=adjustResize in AndroidManifest.xml
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-07 21:03:25 +02:00
Elias Naur
8e46bea6dc
cmd/gio: use package name for app name in -buildmode=exe
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-06 15:30:39 +02:00
Elias Naur
07d99ab182
cmd/gio: set default buildmode to "exe"
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-06 15:16:59 +02:00
Elias Naur
62419e05a4
cmd/gio: don't silently skip apk signing if no certificate is found
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 15:59:00 +02:00
Elias Naur
821862b4c6
README.md: use the -buildmode=exe flag for running demos
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 15:41:28 +02:00
Elias Naur
441ca835c3
cmd/gio: add -target=js support for creating webassembly packages
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 14:58:00 +02:00
Elias Naur
3c345a67b8
cmd/gio: add iOS/tvOS support for -buildmode=exe
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 14:26:57 +02:00
Elias Naur
c3697fd189
cmd/gio: change runCmd to return a trimmed string
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 14:26:57 +02:00
Elias Naur
d458070d29
cmd/gio: add buildmode=exe for building gio programs ready to run
...
And add Android implementation.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 14:26:57 +02:00
Elias Naur
108160f502
cmd/gio: update usage documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-08 11:10:16 +02:00
Elias Naur
af46b2bf29
cmd/gio: remove NDK r19b Windows workaround vestiges
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 14:28:43 +02:00
Elias Naur
ef20c9339f
cmd/gio: drop 32-bit support for iOS
...
64-bit support was added in iOS 8 on iPhone 5S and newer,
32-bit support was dropped from iOS 12.
Gio is new and we have an opportunity to see if we can live without it.
We can always add 32-bit support back; it's harder to break users
later.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-06 16:37:26 +02:00
Elias Naur
1475fa6833
cmd/gio: don't use stderr output from the go tool
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-03-31 11:11:15 +02:00
Elias Naur
0f05231c35
all: initial import
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-03-31 10:47:22 +02:00