-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to GameActivity 4.0.0 #191
base: main
Are you sure you want to change the base?
Conversation
going to update this to not use submodules, but to use a similar structure so that it maps nicer to the external repo. as per: It would be nice to have android-game-sdk-rs host on rust-mobile so that I can reference it in the docs in the subdir: |
fc9439c
to
89600ed
Compare
6ad67f5
to
2f6ca63
Compare
Starting to look this; I pulled this draft PR, re-ran I'm currently hitting a Backtrace
It's not a useful backtrace, but apparently it's currently blowing up in
@jb55 In terms of being stuck with generating bindings, I'm not entirely sure what issue you might have hit and I guess I was lucky that I didn't seem to hit an issue here. |
I think i was hitting this, then i just update games-activity to the correct version on the gradle side? |
Oh, presumably it's just because the example was pulling in the older 2.0.2 version of GameActivity - I had only skimmed the first few commit messages and got the wrong impression that the current PR just re-worked things in prep for the 4.0 update but didn't have those changes. I'll make sure to pull in GameActivity 4.0 in the example and see how that goes. |
Ah, yep the initial issues with RegisterNatives was just because the example was pulling in GameActivity 2.0.2. Now though I do seem to hit a different issue with 4.0.0:
No useful panic backtrace atm, but that's the |
I've pushed some follow ups that I think bash this into a state where we can merge. Since the latest bindgen-cli requires rustc 1.70 this PR also bumps our rust-version from 1.69 to 1.73 (it's bumped a bit further because 1.73 has an Android fix for the When generating the bindings, we now pass I've pushed a couple of extra patches to
The first two should be redundant with android-activity since we already have The For future convenience, it's fairly straight-forward now to build against an external games-sdk by setting the So far, I've only tested with |
We are going to use a submodule so that it is easier to track and rebase our local changes onto new versions of android-games-sdk Signed-off-by: William Casarin <[email protected]>
Also includes our patches on top (branch android-activity-2.0.2). This is mainly to test to make sure everything is still working. We will switch to the android-activity-4.0.0 branch when we're done Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
This replaces `copy-files` + `file_list.txt` (subjective simplification) This imports the SDK from commit 1b544f896646b29e798c5be0a151a488906797f7, from: https://github.com/rust-mobile/android-games-sdk/commits/android-activity-4.0.0
Signed-off-by: William Casarin <[email protected]>
For convenience, when updating to new GameActivity versions, this makes it possible to build against the out-of-tree `android-games-sdk` repo. This also updates `generate-bindings.sh` to point at $ANDROID_GAMES_SDK if set. E.g. ``` git clone [email protected]:rust-mobile/android-games-sdk.git \ --branch android-activity-4.0.0 export ANDROID_GAMES_SDK=$PWD/android-games-sdk ./generate-bindings.sh cargo build --features=game-activity --target=aarch64-linux-android ```
For reference, I'm going to look at updating some of the rust-android-examples so I can smoke test this a bit more. @jb55 maybe you can smoke test this updated branch if you get a moment and check that it works for your needs |
@rib yup i will try soon |
When I went to test against An issue I've hit is that #163 was a breaking change that makes android-activity incompatible with winit 0.30.x which is awkward. It's made me worried about the decision to swap in the ndk input types. |
Oh yeah i have this applied on top of the tagged version in our branch to avoid that issue |
For reference here I've tested this PR against updated agdk-mainloop, agdk-egui and agdk-eframe examples here: https://github.com/rust-mobile/rust-android-examples/tree/rib/wip/android-activity-0.6.x To remain compatible with android-activity 0.6.x (and thus winit 0.30 / egui 0.31) I reverted #163 locally |
Instead of reverting #163 on main, perhaps we can create a Note: even though this PR updates to a new major version of I.e. it's acceptable that applications currently based on |
Update the notes on how to update to new GameActivity releases
This updates the
game-activity
backend to be based on the latestGameActivty
4.0.0
release from Google's AGDK.To make it easier to manage future updates to new versions of
GameActivity
theandroid-activity
integration patches are now maintained under a fork of Google's games-sdk repo which can be found here:https://github.com/rust-mobile/android-games-sdk/tree/android-activity-4.0.0
During development it's possible to build against an external games-sdk repo (as well we re-generate bindings) by setting the
ANDROID_GAMES_SDK
environment variable to point to a clone of theandroid-games-sdk
repo.To avoid having downstream developers need to deal with Git submodules, this adds an
import-games-sdk.sh
script that will copy theprefab-src
code from the games-sdk into this repo.Closes #185
Fixes #188
Fixes #186