-
-
Notifications
You must be signed in to change notification settings - Fork 1
Support for languages other than C? #2
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
Comments
The main issue with non-c/c++ languages is that pixiewood expects applications to be built "single-pass" (i.e. a singe ninja invocation can build the application from nothing but the android ndk toolchain). According to @ebassi is is currently impossible to do so with support for gobject-introspection, which the other languages need (esp. the python/javascript/lua ones). I'd love to see support for additional languages (I've already tried looking if I could build some gnome core/circle apps for demo purposes, but all of the "simple" ones aren't written in C :(), so if you manage to get something working let me know (or tell me if you are facing any issues I could potentially resolve). |
Is there any Gnome app written in C ported to Android (other than gtk demo) ? Also, could you name any "other than C" project? |
There's the libadwaita demo that is reasonable to build (it either needs patching to remove the appstream dep or appstream needs patching to make its meson build work in a cross environment)
I was thinking it'd nice if I could maybe build gnome-calculator given that it doesn't have to interface with the OS, but its written in Vala and I'd need introspection for a single pass build for that. |
I added gnome-calculator in a different Android repository termux/termux-packages@9d89db4. So, it's not impossible, I guess 🙂 I'll explore this new idea. |
Termux doesn't need to single-pass build the whole software stack. You just depend on g-ir-scanner, which was already built previously. |
I have an app written in Python I'd like to eventually port. Python just recently also got tier 3 Android support. Unfortunately I don't really know any Perl, so not sure how well I can really hack around here... |
Neither do I. Instead, I build the project in the container and modified it in Android Studio. I am wondering if https://gitlab.gnome.org/GNOME/jhbuild could be used for building the native binaries. |
Yes, right now its definitively impossible. We'll at least need
While I did try to keep the pixiewood code understandable, you don't have to hack around in it. Pixiewood is mostly acting as a wrapper for running meson/ninja parallely and responsible for generating the android application skeleton (AndroidManifest.xml, build.gradle, app icons, etc.), there is still functionality missing (e.g. mapping appstream manifest permissions to android manifest permissions) that'll have to be implemented, but for integrating python I don't think you'll have to modify pixiewood at all.
For development, your kinda supposed to use android-studio anyways. Thats why |
FYI: For rust my idea with treating cargo as a "dumb compiler" and letting meson do the final linking seems to work. A proof of concept is located here: https://github.com/sp1ritCS/gtkrs4droid/ |
I've managed to produce introspection data and build pygobject. The required changes are far from ready getting upstreamed yet and involves a lot of manual shuffling of files to their correct location; but its possible. If anyone is feeling experimental, here is a copy of the studio project tree. As this is python, you can modify its behavior without recompiling by modifying the files in |
Is it also somehow possible to package GNOME/GTK apps which are not written in C, let say for example Rust?
The text was updated successfully, but these errors were encountered: