When the `d8` command from the Android SDK fails because of an incompatible
java version, the error message is cryptic. Before reporting the errors, we
attempt to detect incompatible versions and report a clearer error. This change
adds support for OpenJDK as well as other vendors to the detection logic.
Fixes: https://todo.sr.ht/~eliasnaur/gio/342
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit changes the way that gogio searches for build tools
so that it correctly identifies versions like '31' as equivalent
to '31.0.0'. The Android SDK appears to not provide version
components in the path name when the component is zero.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
Before that patch the minimum iOS version was hardcoded. That patch makes possible
to change the minimum iOS version using `-minsdk`.
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
d8 doesn't check and fails with an inscrutable error when using
unsupported JDK versions such as JDK 11.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The app and app/internal/wm packages are tightly coupled, requiring
quite a bit of forwarding types, values and constants from the internal
package to export it. Further, no other package imports package wm.
This change merges the two packages.
While here, drop the pre-Go 1.14 SIGPIPE workaround.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The CPU fallback renderer relies on posix_memalign, which was exposed in
Android 4.2. Support for Android 4.1 could be restored by writing
posix_memalign outselves, but this change is easier.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Without logging, a failing child result in nondescript errors such as
windows_test.go:126: exit status 2
Signed-off-by: Elias Naur <mail@eliasnaur.com>
That patch makes possible to generate Android App Bundle (`.aab`) instead
of APK. In order to generate AAB use `-o outputfile.aab`.
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
Package wm (for "window manager") is a better fit for the package, and
distinguishes it from the low-level package windows for the Windows API.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
NewDevice creates a Device given an API, which is the necessary GPU
resources for a backend.
Convert gpu.New to take an API instead of a backend.Device directly.
In turn, this frees us to later unexport the backend package along with
the backend implementations (for now just gioui.org/gpu/gl for OpenGL).
It also allows programs that embed Gio (such as gioui.org/example/glfw)
to freely choose a backend, not just OpenGL.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The Windows tests on builds.sr.ht are still flaky:
TestEndToEnd/Windows: e2e_test.go:130: retrying after 400ms
TestEndToEnd/Windows: e2e_test.go:130: retrying after 800ms
TestEndToEnd/Windows: e2e_test.go:130: retrying after 1.6s
TestEndToEnd/Windows: e2e_test.go:130: retrying after 2s
TestEndToEnd/Windows: e2e_test.go:130: last error: encountered 6 color mismatches:
5,5 got 0xffffffffffff, want 0xffff00000000
395,5 got 0xffffffffffff, want 0xffff00000000
5,305 got 0xffff00000000, want 0x000000000000
395,305 got 0xffff00000000, want 0x000000000000
405,305 got 0xffffffffffff, want 0xffff00000000
795,305 got 0xffffffffffff, want 0xffff00000000
TestEndToEnd/Windows: e2e_test.go:130: hit timeout of 4s after 6 tries
Bump the window movement delay in the hope that it helps.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
That change makes possible to provide custom PKCS#12 (JKS/PFX) using `-signkey` and the password with `-signpass`.
By default the gogio will use the `debug.keystore`, if no key is provided.
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
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>
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>
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>
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>
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>