Update READMEs

This commit is contained in:
Robert Bragg
2022-07-03 23:34:25 +01:00
parent 2264826535
commit b63b5e15fa
8 changed files with 78 additions and 136 deletions
+6 -10
View File
@@ -1,21 +1,17 @@
This tests using the game_activity crate with egui, winit and wgpu.
This tests using `GameActivity` with egui, winit and wgpu.
This is based on a re-worked winit backend here:
https://github.com/rib/winit/tree/agdk-game-activity
and based on updated egui-winit and egui-wgpu crates here:
https://github.com/rib/egui/tree/android-deferred-winit-wgpu
https://github.com/rib/winit/tree/android-activity
```
rustup target add aarch64-linux-android
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-ndk
export ANDROID_NDK_HOME="path/to/ndk"
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
export ANDROID_HOME="path/to/sdk"
./gradlew build
./gradlew installDebug
adb shell am start -n co.realfit.agdkegui/.MainActivity
```
```
+8 -10
View File
@@ -1,19 +1,17 @@
This is a minimal test application that just runs a mainloop based
on game_activity::poll_events() and traces the events received
without doing any rendering. It also saves and restores some
minimal application state.
This is a minimal test application based on `GameActivity` that just
runs a mainloop based on android_activity::poll_events() and traces
the events received without doing any rendering. It also saves and
restores some minimal application state.
```
rustup target add aarch64-linux-android
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-ndk
export ANDROID_NDK_HOME="path/to/ndk"
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
export ANDROID_HOME="path/to/sdk"
./gradlew build
./gradlew installDebug
adb shell am start -n co.realfit.agdkmainloop/.MainActivity
```
```
+5 -6
View File
@@ -1,7 +1,7 @@
This tests using the game_activity crate with winit and wgpu.
This tests using `GameActivity` with winit and wgpu.
This is based on a re-worked winit backend here:
https://github.com/rib/winit/tree/agdk-game-activity
https://github.com/rib/winit/tree/android-activity
Although it would have been possible to handle the suspend/resume
lifecycle events with a simpler approach of destroying and
@@ -16,14 +16,13 @@ applications (that need to be portable) can work. (enable
"desktop" feature to build binary)
```
rustup target add aarch64-linux-android
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-ndk
export ANDROID_NDK_HOME="path/to/ndk"
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
export ANDROID_HOME="path/to/sdk"
./gradlew build
./gradlew installDebug
adb shell am start -n co.realfit.agdkwinitwgpu/.MainActivity
+9 -16
View File
@@ -1,31 +1,22 @@
This is a minimal test application similar to `agdk-mainloop` that
is based on `NativeActivity` instead of `GameActivity`.
It shows how to run a mainloop based on `native_activity::poll_events()` and
traces the events received without doing any rendering. It also saves and
This is a minimal test application based on `NativeActivity` that just
runs a mainloop based on android_activity::poll_events() and traces
the events received without doing any rendering. It also saves and
restores some minimal application state.
Since this test doesn't require a custom `Activity` subclass it's
optionally possible to build this example with `cargo apk`.
The idea here is to test whether we can have a `NativeActivity` based
glue layer which is API compatible with `game-activity`, which can
optionally be used for _very_ basic tests/demos that want the convenience
of not needing to compile any Java code.
# Gradle Build
```
rustup target add aarch64-linux-android
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-ndk
export ANDROID_NDK_HOME="path/to/ndk"
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
export ANDROID_HOME="path/to/sdk"
./gradlew build
./gradlew installDebug
adb shell am start -n co.realfit.namainloop/.MainActivity
```
# Cargo APK Build
@@ -33,7 +24,9 @@ adb shell am start -n co.realfit.namainloop/.MainActivity
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_SDK_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-apk
cargo apk build
cargo apk run
```
```
+3 -4
View File
@@ -7,14 +7,13 @@ Note: unlike the `na-mainloop` example, this one can't be built via
# Gradle Build
```
rustup target add aarch64-linux-android
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-ndk
export ANDROID_NDK_HOME="path/to/ndk"
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
export ANDROID_HOME="path/to/sdk"
./gradlew build
./gradlew installDebug
adb shell am start -n co.realfit.nasubclassjni/.MainActivity
+3 -6
View File
@@ -1,8 +1,5 @@
This is the same as agdk-winit-wgpu except it enables the "native-activity"
feature for winit, for running with `NativeActivity` instead of `GameActivity`
This is to see if it's practical to support multiple glue implementations with
a common API.
This is the same as agdk-winit-wgpu except it runs with `NativeActivity`
instead of `GameActivity`
# Gradle Build
```
@@ -23,7 +20,7 @@ export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_SDK_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-apk
cargo apk run
```