Commit Graph

16 Commits

Author SHA1 Message Date
Elias Naur 681bafce08 cmd/gogio: use filepath for Windows compatibility
Fixes gio#112

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-05-07 15:52:13 +02:00
Elias Naur 84d4800a16 cmd/gogio: match Android window background with default Gio color
While launching an app on Android, the hard-coded theme is used for
the color. That color is by default black, and results in a jarring
transition to the actual app background.

The default Gio color is white, so use that for the theme background
as well.

This change will break for "dark mode" programs and similar.  A future
improvement would be to reflect the actual app background in the theme.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-04-24 15:59:30 +02:00
Elias Naur 2b1935d657 cmd/gogio: include Android themes in .aar outputs
Not strictly necessary, but makes embedding a Gio Android Activity
easier; adding

	<activity android:name="org.gioui.GioActivity"
		android:theme="@style/Theme.GioApp"
		android:configChanges="orientation|keyboardHidden"
		android:windowSoftInputMode="adjustResize">
		<intent-filter>
			<action android:name="android.intent.action.MAIN" />
			<category android:name="android.intent.category.LAUNCHER" />
		</intent-filter>
	</activity>

should be enough.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-04-18 20:24:42 +02:00
Elias Naur 761ab68868 cmd/gogio: support newer NDKs
Newer Windows NDKs add the "x86_64" platform suffix like other
OS'es. Remove the special case.

Newer NDKs are also installed in "ndk/x.y.z" versioned directories
instead of in "ndk-bundle". Support that.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-01-27 17:34:43 +00:00
Daniel Martí ec0c2498a1 cmd/gogio: fix a couple of staticcheck positives
Spotted the javac one by chance when reading the code, so I ran the tool
and fixed another small bug while at it.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2019-11-04 00:09:40 +01:00
Greg Pomerantz af353822fa cmd/gogio: add permissions system for Android
Search for imports of the form gioui.org/app/permission/* and add
required permissions to AndroidManifest.xml.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-11-01 18:58:13 +01:00
Greg Pomerantz 3cd633ee44 cmd/gogio: Android: include jar files from dependencies
On Android, in addition to adding jar files found in the source
directory of the program being compiled, cmd/gogio also searches
every dependency for jar files to include in the output APK.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-11-01 17:59:49 +01:00
Elias Naur 439d3e652c app/internal: consolidate CFLAGS and move -Werror to #cgo directives
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-28 13:30:51 +01:00
Greg Pomerantz 175144fa99 cmd/gogio: Android: include jar files from package directory
Look for *.jar files in package directory for inclusion in
Android .apk file.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-10-18 16:45:43 +02:00
Elias Naur fc521ec1ff cmd/gogio: update gio version
The path of the supporting Android Java files and iOS header file
moved.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 16:43:21 +02:00
Elias Naur e4b1a46dd2 cmd/gogio: create a temporary signing key if debug.keystore isn't found
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-09 19:08:28 +02:00
Elias Naur 468731538e cmd/gogio: look for javac in JAVA_HOME if it is not in PATH
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-09 18:38:05 +02:00
Elias Naur b749c5dd28 cmd/gogio: fix Android toolchain path for Windows 64-bit
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-09 18:27:09 +02:00
Greg Pomerantz 81814e6fa4 cmd/gogio: add -minversion flag to specify minimum Android platform
Allow the user to specify a minimum supported Android platform
version.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-10-07 17:00:24 +02:00
Elias Naur 962bc36dac apps,cmd: update to renamed gioui.org module
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 12:41:29 +02:00
Elias Naur a12912c944 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>
2019-09-18 22:46:47 +02:00