Commit Graph

24 Commits

Author SHA1 Message Date
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 91de9acc4a cmd/assets: delete
It is unused.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-07-01 18:19:02 +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