Building Evince for development.

December 4, 2015    Evince OpenSourceDevelopment

Evince is default, open source document viewer on linux.

You can find source code for evince here. If you want to contribute to gnome apps, I would recommend you to first visit Gnome Newcomers guide. It has a very good step by step introduction of how to contribute.

Building gnome application is easy but for new comers or beginners in open source development world is a bit hard to catch on. I recently started taking interest and thought that I should give this a try. I too failed initially and asked for help on their mailing list. I must tell that people behind evince are very helpful and understanding. They let you openly ask queries if you have any and are ready to guide you at any point.

I am writing this post to help those who want to contribute to gnome. This post is about building evince but I guess it will be the same for any gnome app.

So the steps involved (for debian based distributions) are as follows.

Install required packages.

sudo apt-get install apt-file docbook-xsl build-essential     git-core gettext    
sudo apt-get install apt-file
sudo apt-file update

Install Jhbuild

Jhbuild is software widely used for developing gnome apps. Jhbuild acts as environment in which you can run applications without causing any trouble to your host system. You should learn more about Jhbuild here.You should at least clear your concepts about jhbuild from the given link. If you have already installed and/or messed up with jhbuild you can goto that link or you can continue here itself.

Download and install latest Jhbuild:

mkdir ~/jhbuild
cd ~/jhbuild
git clone git://git.gnome.org/jhbuild
cd ~/jhbuild/jhbuild
/autogen.sh --simple-install
make
make install     Set up link to execute from command line.

mkdir ~/bin
ln -sf ~/.local/bin/jhbuild ~/bin/jhbuild ### Install system dependencies: you can configure Jhbuild config while manually and can store it in ~/.config/jhbuildrc.If you didn't, it will use default configuration file. I tried to configure but some problems showed up. So let's stick to the default file. It might download and install some unwanted files but it will ensure that you don't get any errors. After this build all system dependencies.

jhbuild sysdeps --install
jhbuild build adwaita-icon-theme dconf glib-networking gvfs This is required only once. ### Building for the first time:

 jhbuild build evince

If you get any errors visit here

Changing and building again:

jhbuild buildone evince ### Run evince:

jhbuild run evince I also asked some help about project structure on mailing list. They explained some things to me, which are as follows:    Which directories stands for what:    
  • shell: user interface
  • backend: supported formats (pdf, ps, dvi, comicz, …)
  • libdocument: abstractions of a document
  • libview: how a document/page is shown, navigated, etc. (libview provides widgets)

I hope this will get you started. Wish you good luck. :+1:
Thats all folks.


blog comments powered by Disqus