-
Notifications
You must be signed in to change notification settings - Fork 0
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
Basic android event loop 2.0 #2
Basic android event loop 2.0 #2
Conversation
Are there are still issues with orientation changes? Can we get android added to the CI? |
Not yet. Had to get it working again with the 0.23 branch first, I'll look into it next. |
07f552c
to
e179a70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/goddessfreya/winit/pull/2/files#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR18-R23
Those lines should be moved to # Unreleased
This is a pretty important one that's not fixed yet rust-windowing#789 |
60c8611
to
78f7210
Compare
cc @katyo |
54924ef
to
a56ee31
Compare
@dvc94ch I completely confused... How can I test it for now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a rebase
4759911
to
8cc2fc3
Compare
@katyo I created a repo with an example called
then you need to install the new cargo install --path android-ndk-rs/cargo-ndk then you can build and run the
|
@katyo did you get it to work? cargo-ndk still needs some work, some values are still hardcoded instead of parsed from the manifest, it doesn't resolving libraries recursively, doesn't emit fat binaries and doesn't support examples that work on desktop and mobile (as cargo does not support target specific crate-type) |
@dvc94ch Thanks for expl. |
Unfortunately I cannot get it work due to linking errors:
And error like a:
Same error with "--target arm-linux-androideabi":
It seems something wrong with cargo ndk. |
cargo-ndk is ridiculously simple, the entire build logic is below, so I'm a bit confused how that's happening. Can you post the entire build log? if let Some(triple) = target {
let clang = ndk.clang(triple, manifest.target_sdk_version)?;
cargo.env(cargo_env_target_cfg("LINKER", triple), &clang);
let ar = ndk.toolchain_bin("ar", triple)?;
cargo.env(cargo_env_target_cfg("AR", triple), &ar);
}
if cargo_cmd == "build" || cargo_cmd == "run" {
cargo.arg("build").args(&cargo_args).status()?;
} EDIT: Did a clean build and there does seem to be some issues |
I may mistake but it seems some important env vars is unset: TARGET = Some("armv7-linux-androideabi") As I know the cargo apk sets CC with appropriate C compiler. |
Sry I'm a bit slow today, I've got a hangover. cargo-ndk is updated |
@dvc94ch How can I specify min sdk version? |
@katyo Just finished implementing |
I able to build it but I have an error:
The apk is built but it seems the signing failed so I cannot install it:
|
Mmh, what os are you using? Looks like we're nearly there :) I rebased What happens if you update to latest master and remove Finished dev [unoptimized + debuginfo] target(s) in 0.02s
'lib/arm64-v8a/libhello_world.so'...
Verifying alignment of /home/dvc/android/android-ndk-rs/target/debug/ndk/examples/hello_world/android-examples.apk (4)...
49 AndroidManifest.xml (OK - compressed)
961 lib/arm64-v8a/libhello_world.so (OK - compressed)
Verification succesful
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days
for: CN=Android Debug, O=Android, C=US
[Storing /home/dvc/.android/debug.keystore] |
I use nixos, if this matter.
|
It still not installable:
|
The weird thing is that we check that apksigner exists and then we fail with file not found. Is it possible that apksigner is a symlink? If that's the case it should be fixed now |
Oh, It seems I forget patch android sdk executables after upgrading :) |
3fbabd3
to
66566ab
Compare
66566ab
to
fe582a8
Compare
fe582a8
to
7cf47b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can winit's readme be amended with instructions for building the examples on android?
Due to rust-lang/cargo#4881 saddly there's no good way to do it. I considered fixing it but it would likely be years behind a feature gate if the PR even gets accepted, so I decided it's not worth it. |
@Osspial so this one builds on the glutin 0.23 work. but it doesn't look like that's going anywhere for the time being as the windows and mac os x backends are missing. Should I backport it to winit master? |
👍 that seems like the right call. |
CHANGELOG.md
if knowledge of this change could be valuable to users