Skip to content
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

android: Added android_usecase kwargs to executable #13767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sp1ritCS
Copy link
Contributor

@sp1ritCS sp1ritCS commented Oct 8, 2024

This is the idea I've came up with in regards to #13758

It doesn't do anything regarding application glue right now, as I'm unsure if and how to implement it, but I thought about it some more and belive having it would simplify things quite a bit.


By setting android_usecase to application, the executable gets actually built as a shared library instead of an executable. This makes it possible to use an application within an android application process.

https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7555/

@sp1ritCS sp1ritCS force-pushed the android_usecase branch 2 times, most recently from 9863f97 to 306eeec Compare October 9, 2024 10:31
By setting android_usecase to `application`, the executable gets
actually built as a shared library instead of an executable. This makes
it possible to use an application within an android application process.

mesonbuild#13758
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7555/
@jpakkane
Copy link
Member

Could you not already do this with the build_target function?

@sp1ritCS
Copy link
Contributor Author

Perhaps. However my goal is to have a builder tool that you can just point at a meson project to create an apk from.

While you still have to modify your meson sources and to add the android_usecase, it seems less invasive than doing having users switch their excecutables to build_target(target_type: host_machine.os() == android ? 'shared_module' : 'executable', ...), especially given that they will have to add the android glue dependency too (declaring a link_whole dependency with it and adding it does seem to work within meson, not sure why cmake didn't like it)

What about adding a excecutable function to the gnome module that has the same prototype as a normal executable but that creates a library linked against the glue dependency if host_machine == 'android'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants