I’ve been selected in GSoC to work on GNU Dr. Geo. It is an interactive geometry software where you can create geometric figures and entities for visualization purpose.
My project is to upgrade Dr. Geo’s libraries to the latest stable versions to make it compatible with current distros so as to achieve a facile installation.
My milestones before the mid-term were:
- Upgrade Guile library
- Upgrade Glade library
- Upgrade Gtk+ library
Upgrade Guile library
The Guile library is used for the scripting purpose in Dr. Geo to create your figures. Earlier the software was using Guile 1.6 version which has been long deprecated. My job was to upgrade the software to make it consistent with Guile 2.0.x versions.
I changed a lot of code at the back end for that. I submitted 6 commits that includes 353 lines added and 341 lines removed.
Technical: I shifted from the old Guile’s GH Interface to the newer SCM Interface. This meant changing the gh_interface syntaxes to the scm_interface ones.
Upgrade Glade library
The Glade is used for the Interface designing. Dr. Geo was using glade that was compatible with older versions of Gtk2 library. And it has been deprecated as well.
I submitted 14 commits for this that consists of 18392 lines added and 21521 lines removed.
Technical: I had to change from libglade format, that is longer supported, to the GtkBuilder format (the current format that Gtk+ library supports). This involved changing the entire structure of glade files.
And I had to split up the glade files into multiple top-level glade files, because GtkBuilder format doesn’t allow duplicate IDs unlike the former format.
Upgrade Gtk+ library
Dr. Geo is using Gtk2 where as the newer version Gtk+3 has been available for some time now. The support for Gtk2 is decreasing day by day and will soon be deprecated.
So in this milestone, I had to change the code to use Gtk3 library.
But alas, it had brought some serious issues to front that makes it a laborious task to shift to the newer version.
The drawings were drawn using GDK_drawables which are not supported in Gtk3. Therefore, it requires dropping gdk API to use Cairo instead. Gtk3 relies completely on Cairo for drawing purpose.
And to use cairo I had to re-write most of the structure, the ‘Kernel’ part of Dr. Geo.
After discussing with my mentor, we decided that I should re-write the structure with a modular approach.
Modular Approach
There will be two main components of the software.
- Kernel
- UI
Kernel will store the data and will manage addition or deletion of the geometric objects. All the processing and calculations will be performed in this part.
UI will manage windows and widgets for the software. The user input will be passed to kernel after it has been taken from the UI. It will also show/display the objects on the screen.
The following are the things that I’ll be using:
I have already started with the UI part and will be committing the changes soon.