Developing for Gtk/Glib
Hi everyone. It’s been a while since I blogged something. Been busy day-to-day work.
Yesterday something started to bug me, a new project like, a new toy application. After some modeling/sketching on a page I decided to start writing some demo code.
It took me a while to notice that I’m far from setting a GObject development environment fast. I’m using Eclipse IDE for C/C++ Linux Developers, and valgrind and the usual tools in my Archlinux. There’s, by the way, a package group in pacman called base-devel, I always had installed first hand.
Anyway I’ll talk about the main three issues I found in my way to set up start and star coding some mockups and early designs of my toy app.
I’m not the guy who lined up with cmake cause autotools is old, and should be improved, although I think it needs some improvements . The main issue with autotools is that it is hard to learn, the existent documentation is little and somewhat cryptic, and that makes the learning curve steep. After read some things on the web, and been this not first time I stand before the issues, I did what I think everyone should, I made my own sample-autootols project which keeps a minimal configuration of what I need to develop a Gtk application. I included tips from this post about improving and modernizing the autotools configuration, and some others about using xz compression instead of gz. The project is in github, and I’m planning to improve it with several configurations for several kinds of builds. Anyway, that for point one, I will keep my template at hand, but I think for new developers, and for the good of the platform, Gnome should make something like Ubuntu Quickly. Note: I’ve tried to use anjuta, really tried, but it doesn’t feel right or stable, and this is not for the developers to take it personal, it just my experience with it had been bad.
GObject based C class
This is so simple is really a shame it had taken me so long to pass this point. I needed some GObject based class, to handle some internals structures of my application, and then I found myself copying parts of devhelp tutorials to headers and sources files to build the class, this code is all templates, is the same over and over for every class I had and have to make. I just want some script that make me the files after I provide the name of the class I want. If I had the time to learn howto make Eclipse plugins I’ll make the Eclipse Template for those files header and source file for a GObject based class. I tried vala before and I know it does, one possible solution is for vala to print the translation into some pretty formatted code. If I can’t find any solution soon, I’ll make some awk script that output the files with the required boilerplate needed.
Again I think that, in order to promote the platform, is necessary to publish things like this, The new look of developer.gnome.org and the samples in there helps to that purpose, but still feel more work in that direction is missing.
 Autotools needs to handle parallel configure, since parallel make is handled by the -j flag.