Commit Graph

242 Commits

Author SHA1 Message Date
Inkeliz 2a7295750d cmd/gogio: fix icon/resources for Android
Previously that patch, gogio unzip the `link.apk` (generated by AAPT2) to an temporary folder and then compress it again to a new `app.ap_` file.

For some unknown reason, that unzip-then-zip doesn't work. The resources are included but is corrupted in somehow. That PR aims to fix that by avoid the extraction to an temporary folder.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
2021-02-22 12:10:36 +01:00
Elias Naur ffb56f42b9 cmd/gogio/testdata: always clear background to white
The webassembly port changed to use transparent black to allow content
below Gio to show through. However, the end-to-end tests expect a white
background.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-02-18 09:06:24 +01:00
Elias Naur b420fdf096 cmd/gogio: remove obsolete headless chrome workaround
The two listed issues are fixed, and the builders pass with the
workaround removed.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-02-18 08:46:03 +01:00
Elias Naur d420654dbc cmd/gogio: fix argv passing from URL search fragment to Go program
Fixes the examples on gioui.org/doc/architecture.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-02-01 16:51:31 +01:00
Elias Naur 5dd3ce9923 cmd/gogio: [iOS] identify certificates by their SHA-1 fingerprint
Unlike the common name, the fingerprint is almost certainly unique.
Xcode uses the fingerprint as well.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-02-01 13:18:22 +01:00
Inkeliz 07715a8125 cmd/gogio: remove windres dependency
Now, it's possible to compile to Windows (`-target windows`) without
having `windres`. The PNG icon, manifest and version info will be
generated and include using `gogio`.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
2021-01-07 09:49:26 +01:00
Walter Werner SCHNEIDER fd2d96adfc all: fix spelling errors
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-17 08:55:23 +01:00
Robin Eklind 9cc90d9695 cmd/gogio: sort and group imports using goimports
find gio/ -type f -name '*.go' | xargs -I '{}' goimports -w '{}'

Signed-off-by: Robin Eklind
2020-12-16 02:09:44 +01:00
Inkeliz fe844cc489 cmd/gogio: fix support for older browsers
That change removes the "??" operator, it isn't supported
by old browsers [0].

[0]: https://caniuse.com/mdn-javascript_operators_nullish_coalescing

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
2020-12-14 16:33:56 +01:00
Inkeliz 745bb949bb cmd/gogio: [wasm] embed .js files
Similar to the Android, which includes all .jar files into the .apk.
Now, the `gogio -target js` will include all `*_js.js` files
into the resulting `wasm.js`.

That change make possible to adds custom wasm-imports, which might
be used in future versions of Gio.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
2020-12-11 20:24:34 +01:00
Inkeliz fa96e12b6d cmd/gogio: add support for Windows
Now, gogio can build the program for Windows, using the `-target
windows`.

It will build with `-H=windowsgui`, by default. Also, it can compile for
multiple platforms if specified using `-target` (e.g. `-target arm, 386,
amd64`), the executable will have the respective suffix (i.e.
`_386.exe`).

gogio will also attach (any) appicon.png as executable icon resource and
include some information about the file and supported operating system.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
2020-12-11 17:00:21 +01:00
Chris Waldon acc3f704e4 example/{kitchen,tabs,gophers}: update to use material.Palette
Update gioui.org/cmd while here.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
2020-12-06 23:04:52 +01:00
Elias Naur 47ba975899 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-06 22:59:51 +01:00
Elias Naur 9b8e847a05 example,cmd: update gio version
Remove copy/paste from kitchen now that Editor supports it natively.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-06 22:31:43 +01:00
Elias Naur 2230accd34 cmd,example: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-05 10:22:59 +01:00
Elias Naur e9a75cc22a example/glfw: delete GLFW => Gio OpenGL bridge
It's no longer needed.

Update gophers to latest gio while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-04 20:52:33 +01:00
Walter Werner SCHNEIDER 4f8150cd59 cmd/gogio: add gogio test for go import path
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
2020-11-27 09:16:56 +01:00
Elias Naur 9b54892cc4 cmd/gogio: restore package path handling
A previous change converted the package argument to gogio to an absolute path.
However, gogio supports all package paths that may appear in Go import statements.
For example, the path "gioui.org/cmd/example/kitchen" should not be converted.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-11-26 11:17:40 +01:00
Inkeliz eaaffa1f3e cmd/gogio: force GOARM=7 to avoid softfloat on Android
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
2020-11-24 19:53:04 +01:00
Egon Elbre 2affb6eaa4 cmd,example: fix uses of color.NRGBA
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
2020-11-19 11:35:26 +01:00
Walter Werner SCHNEIDER 3c739323cb cmd/gogio: group buildInfo related code
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
2020-11-12 15:52:35 +01:00
Elias Naur dbc0796d02 cmd/gogio,cmd/gogio/testdata: update Gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-11-06 20:56:54 +01:00
Elias Naur d5bdf0756a cmd/gogio: use GOOS=ios to target iOS with Go 1.16 and newer
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-10-20 11:46:34 +02:00
Elias Naur e690c14ddc cmd/gogio: lower minimum OpenGL ES to 2.0 on Android
The Fairphone 2 only supports OpenGL ES 2.0, but otherwise seems
capable of running Gio. By lowering the minimum requirement, Gio apps
will be available in the Play Store for Fairphone 2 devices.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-10-12 15:16:56 +02:00
Sebastien Binet 2f67feafc0 app/permission/camera,cmd/gogio: add support for camera permission
Signed-off-by: Sebastien Binet <s@sbinet.org>
2020-09-12 17:32:11 +02:00
Elias Naur 956bb10a0f cmd/gogio: document -minsdk
Tweak documentation a bit while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-09-12 11:53:07 +02:00
Elias Naur 3dea674390 gogio: skip Android tests when no adb is found
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-08-29 18:10:31 +02:00
axel paulander edef73f580 cmd/gogio: add -icon flag for specifying the app icon file
Before users were limited to only use a appicon.png in the root directory.
Now the user is free to use any png anywhere on the system with the help of the -icon flag.

Signed-off-by: Axel Paulander <axel.paulander@gmail.com>
2020-08-16 10:52:42 +02:00
Elias Naur a063febed9 cmd: use ANDROID_SDK_ROOT instead of ANDROID_HOME
ANDROID_HOME is deprecated and slowly being removed from Android
tools.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-08-09 18:17:02 +02:00
Elias Naur 83673ecb20 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-07-26 11:03:39 +02:00
Elias Naur f958f9512e cmd,example: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-07-15 12:11:02 +02:00
Elias Naur 5a6ad65b85 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-07-09 18:33:56 +02:00
Elias Naur 659849bb82 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-07-08 16:18:40 +02:00
Elias Naur f5985b5e7d cmd,example: bump gio version
Add os.Exit to examples now that app.Main never returns.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-26 16:30:34 +02:00
Elias Naur facf5cbb9d cmd,example: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-26 16:16:15 +02:00
Elias Naur acc0424dd7 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-26 15:57:54 +02:00
Elias Naur d97f7f9093 app/internal/window,cmd/gogio: [iOS] export GioViewController
The Gio GioAppDelegate created the GioViewController programmatically.
When using gogio's -buildmode=archive users may want to use a different
method (for example storyboards) but there can only be one app delegate.

Move the GioAppDelegate to gogio's exe buildmode, and export the
GioViewController for embedding use.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-26 15:47:00 +02:00
Elias Naur 5bd0ecea5e cmd/gogio: add -tags flag for supplying extra tags to the build
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-22 20:57:35 +02:00
Elias Naur 342c0da320 cmd/gogio: add ldflags flag for extra flags
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-22 20:50:28 +02:00
Elias Naur 2f984673a2 cmd/gogio: [Android] use correct android.hardware.type.pc feature
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-22 20:49:49 +02:00
Greg Pomerantz 3a542cc80c cmd/gogio: [Android] check $ANDROID_NDK_ROOT
If the Android NDK is not found in a standard location (e.g. you are
on an F-Droid build server), check the $ANDROID_NDK_ROOT environment
variable.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2020-06-22 18:26:32 +02:00
Gordon Klaus 20cf570709 example/kitchen: add Float/Slider
Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>
2020-06-22 12:19:07 +02:00
Elias Naur 817e0fa9c3 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-21 22:43:46 +02:00
Viktor 1a9ae1af69 example/kitchen: include example of affine transforms
Include an example of transforming the entire UI in the example.

Signed-off-by: Viktor <viktor.ogeman@gmail.com>
2020-06-21 11:38:27 +02:00
Elias Naur e2f3bbdfc3 cmd/gogio: [Android] disable ChromeOS input emulation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-19 20:07:44 +02:00
Egon Elbre 7c98e679ef example,cmd: bump gio version
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
2020-06-19 14:15:55 +02:00
Elias Naur c35d81e828 cmd/gogio: mention that Android builds include jar class files
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-19 11:17:24 +02:00
Elias Naur dd225d5d07 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-17 12:08:08 +02:00
Elias Naur 1eedd19231 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-15 18:16:35 +02:00
Elias Naur d045f492b4 cmd/gogio: [Android] mark GioActivity ready for multi-window configuration changes
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-13 17:47:50 +02:00