[Vala] Vala on Android
Hi Folks!! Genie is already runing on Android using SDL 2.0. See an educational app in android playstore named Katamotz Hitzak . How to compile a genie/vala + SDL 2.0 game-application? http://manualgenie.blogspot.com.es/ https://github.com/avalanche-games/avalanche/wiki/_pages thanks... i love Genie. Maintain it please ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android - Cairo
Very good results. But why the Android device is needed to be rooted? And is it possible to use OpenGLES in Vala there? Tal From: tarn...@tarnyko.net To: vala-list@gnome.org Date: Mon, 1 Apr 2013 06:10:40 +0200 Subject: Re: [Vala] Vala to Android - Cairo Hi people, Last message from myself on this thread, just to let you know that I made a tutorial for using Cairo on Android - from Vala : http://www.tarnyko.net/en/?q=node/26 So we can now draw shapes, text, images... and all sort of nice things on Android's screen from Vala code. More interesting stuff in this style will come later, working on this. Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android - Cairo
Hi Tal, thanks for your interest, Tal Hadad writes: Very good results. But why the Android device is needed to be rooted? Well, during my tutorial, I speed up things by directly copying the native binary deep in the phone's internal filesystem ; I think you are not allowed to do that with an unrooted phone. A solution -not requiring root- would be to regenerate and reinstall the whole APK each time you recompile stuff. But the tutorial would have been a hell longer (explanations on SDK, APK, a.s.o.) so I decided to concentrate on core Vala things. And is it possible to use OpenGLES in Vala there? Potentially, yes. By using the SDL Android port, which has support for ES 1.1 and 2.0 (see http://bugzilla.libsdl.org/show_bug.cgi?id=1291). Vala has already a SDL VAPI, we just need to recompile libs and write some glue code, like I did here for Cairo. I'm just too busy to do this right now. Tal From: tarn...@tarnyko.net To: vala-list@gnome.org Date: Mon, 1 Apr 2013 06:10:40 +0200 Subject: Re: [Vala] Vala to Android - Cairo Hi people, Last message from myself on this thread, just to let you know that I made a tutorial for using Cairo on Android - from Vala : http://www.tarnyko.net/en/?q=node/26 So we can now draw shapes, text, images... and all sort of nice things on Android's screen from Vala code. More interesting stuff in this style will come later, working on this. Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android - Cairo
Hi people, Last message from myself on this thread, just to let you know that I made a tutorial for using Cairo on Android - from Vala : http://www.tarnyko.net/en/?q=node/26 So we can now draw shapes, text, images... and all sort of nice things on Android's screen from Vala code. More interesting stuff in this style will come later, working on this. Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android - Cairo
OK, I'm posting it mostly for the record, please note it is a long mail. Feel free to ask questions. Here we go. I found some pre-compiled versions of Cairo for Android on the Internet ; none of them was complete (with dependencies) nor usable with agcc/valac. So, after struggling a bit... Cairo 1.10.2 for Android : http://www.tarnyko.net/repo/cairo-1.10.2-android-(TARNYKO).tar.bz2 Here is a stand-alone Vala sample : http://www.tarnyko.net/repo/cairo.vala to be compiled with : valac --cc=agcc --pkg cairo -o cairo cairo.vala --Xcc=-lpixman-1 --Xcc=-lpng15 It blits a image.png file with some overlay text. Should run fine on an Android phone. Next step is to display this stuff to Android's screen, and here we have a problem ; by design, the OS doesn't allow native code to draw to screen. Any data should be passed between a native library (*.so) and a running Java app. So I will use AndroidBitmapInfo from JNI as a vector. I've prepared a demo project : http://www.tarnyko.net/repo/cairo-android-vala.tar.bz2 contains : android.vapi : Android VAPI (dummy) cairo-android.vala : Vala source cairo-android.glue.c : C Android Glue should be compiled with : valac --cc=agcc -X -shared --pkg cairo --pkg android --vapidir . cairo-android.vala cairo-android.glue.c -o libcairo-android.so --Xcc=-lpixman-1 --Xcc=-lpng15 --Xcc=-ljnigraphics and drops a libcairo-android.so file which you can call from Java : static { System.loadLibrary(cairo-android); } drawPNG(bmp); Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android
Very good! someone had to break his mind until this would success, and you and many others volunteered... The main problem was GObject and GLib, I think it would interest people in other GNOME mailing list. I recently also tried myself to find ways to use Vala in Android, and you prove it works! This also should be a great start for GTK in android, QT is ahead in this race. Tal From: tarn...@tarnyko.net To: vala-list@gnome.org Date: Wed, 20 Mar 2013 00:05:47 +0100 Subject: Re: [Vala] Vala to Android Nice, thank you very much ! Regards, Tarnyko Luca Bruno writes: Thanks for your contribution. I've reported it here fyi: http://valajournal.blogspot.it/2013/03/vala-on-android.html Best regards, -- www.debian.org - The Universal Operating System ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android
That is super cool, Tarnyko. - Nick - Original Message - From: tarn...@tarnyko.net To: vala-list@gnome.org Sent: Tuesday, March 19, 2013 3:46:40 AM Subject: [Vala] Vala to Android Hi folks, No it's not a question :-). It's very rare for me to message the list when not for a question/answer, but I managed to compile a Vala source directly to Android binary yesterday. And I think it might be of some interest to some people here. For the record, I've written a tutorial here : http://www.tarnyko.net/en/?q=node/25 It's still very limited (only access to core Vala + GLib/Gobject methods) but it could easily be extended by porting libraries having Vala bindings ; although I know it's not easy stuff. For the graphical part, GTK+ doesn't work yet but I know Cairo has been ported (http://code.google.com/p/cairo4android/) -and Cairo definitely has Vala bindings. Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android
Thanks Nicholas ! I'm sending a mail (answering Tal) for further discussion ^^. Regards, Tarnyko Nicholas Melnick writes: That is super cool, Tarnyko. - Nick - Original Message - From: tarn...@tarnyko.net To: vala-list@gnome.org Sent: Tuesday, March 19, 2013 3:46:40 AM Subject: [Vala] Vala to Android Hi folks, No it's not a question :-). It's very rare for me to message the list when not for a question/answer, but I managed to compile a Vala source directly to Android binary yesterday. And I think it might be of some interest to some people here. For the record, I've written a tutorial here : http://www.tarnyko.net/en/?q=node/25 It's still very limited (only access to core Vala + GLib/Gobject methods) but it could easily be extended by porting libraries having Vala bindings ; although I know it's not easy stuff. For the graphical part, GTK+ doesn't work yet but I know Cairo has been ported (http://code.google.com/p/cairo4android/) -and Cairo definitely has Vala bindings. Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android
Thanks Tal, To be totally honest, I heavily relied on this clever guy's mail : https://mail.gnome.org/archives/gtk-devel-list/2011-March/msg00096.html However, his work was not fully explained, some errors here, some patches switches missing there... so I worked hard until I got these d*mn binaries :-). And then, you had the Vala part of course, but I begin to be experienced there (see former posts about cross-compilation on my blog). Now, to go further on this subject : - Android's windowing system is called SurfaceFlinger. It's far different from X11/Wayland, and exposes fast no pure C apis ; however you can draw on it using JNI. Porting GTK+ to it would be a HUGE work, involving many and more experienced hackers than I am ;-), so we better find a sponsor for that. QT has already done that (google for Necessitas). GTK+ is mostly pushed by RedHat, who has shown no interest in mobile devices yet ; Canonical is pushing in this direction though, but don't they already have a home-made API for their Ubuntu Tablet stuff ? (need some facts here). - If we cannot find a sponsor, we can still write a Vala wrapper for simpler libraries like this one (S4L) : http://credentiality2.blogspot.gr/2010/08/giving-native-android-c-apps-acces s-to.html So it would end to be an Android-specific Vala binding ; but it's not so bad, you'd need to rewrite your GUI even on QT either, as the screen is lot smaller and due to mobile-specific ergonomics. I'm playing with Cairo right now. It's not so hard, good for pure bitmap operations ; not bad for a start :-) ! PS Tal : the mail about GLib was already posted on gtk-list years ago, so I better not forward this until I have new stuff. Regards, Tarnyko Tal Hadad writes: Very good! someone had to break his mind until this would success, and you and many others volunteered... The main problem was GObject and GLib, I think it would interest people in other GNOME mailing list. I recently also tried myself to find ways to use Vala in Android, and you prove it works! This also should be a great start for GTK in android, QT is ahead in this race. Tal From: tarn...@tarnyko.net To: vala-list@gnome.org Date: Wed, 20 Mar 2013 00:05:47 +0100 Subject: Re: [Vala] Vala to Android Nice, thank you very much ! Regards, Tarnyko Luca Bruno writes: Thanks for your contribution. I've reported it here fyi: http://valajournal.blogspot.it/2013/03/vala-on-android.html Best regards, -- www.debian.org - The Universal Operating System ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
[Vala] Vala to Android
Hi folks, No it's not a question :-). It's very rare for me to message the list when not for a question/answer, but I managed to compile a Vala source directly to Android binary yesterday. And I think it might be of some interest to some people here. For the record, I've written a tutorial here : http://www.tarnyko.net/en/?q=node/25 It's still very limited (only access to core Vala + GLib/Gobject methods) but it could easily be extended by porting libraries having Vala bindings ; although I know it's not easy stuff. For the graphical part, GTK+ doesn't work yet but I know Cairo has been ported (http://code.google.com/p/cairo4android/) -and Cairo definitely has Vala bindings. Regards, Tarnyko ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android
On Tue, Mar 19, 2013 at 9:46 AM, tarn...@tarnyko.net wrote: Hi folks, No it's not a question :-). It's very rare for me to message the list when not for a question/answer, but I managed to compile a Vala source directly to Android binary yesterday. And I think it might be of some interest to some people here. For the record, I've written a tutorial here : http://www.tarnyko.net/en/?q=**node/25http://www.tarnyko.net/en/?q=node/25 It's still very limited (only access to core Vala + GLib/Gobject methods) but it could easily be extended by porting libraries having Vala bindings ; although I know it's not easy stuff. For the graphical part, GTK+ doesn't work yet but I know Cairo has been ported (http://code.google.com/p/**cairo4android/http://code.google.com/p/cairo4android/) -and Cairo definitely has Vala bindings. Thanks for your contribution. I've reported it here fyi: http://valajournal.blogspot.it/2013/03/vala-on-android.html Best regards, -- www.debian.org - The Universal Operating System ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Android
Nice, thank you very much ! Regards, Tarnyko Luca Bruno writes: Thanks for your contribution. I've reported it here fyi: http://valajournal.blogspot.it/2013/03/vala-on-android.html Best regards, -- www.debian.org - The Universal Operating System ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list