This is my second post on GNOME and today, I am going to show you how to install GNOME-Calculator from source so that you can start contributing to its development.
It would be better if you have the latest GNOME installed on your operating system. If you do not have GNOME installed, no worries , we would breeze through its installation too.
So lets get started!
Installing GNOME 3
Before we continue, let me tell you that there is a GNOME package in the default Ubuntu Repository for GNOME.However this GNOME package is outdated and you may want to skip installing the default package from repository.
Installing GNOME via commands is very easy. Open the command terminal and copy paste the following commands.
$ sudo add-apt-repository ppa:gnome3-team/gnome3
$ sudo apt-get update
$ sudo apt-get install gnome-shell
$ sudo apt-get install gnome-common valac-0.18
$ yum -y groupinstall "GNOME Desktop"
$ sudo yum install gnome-common valac-0.18
Since the GNOME-Calculator source code is in Vala, we would have to install Vala 0.18 Vala PPA using the following command:
$ sudo add-apt-repository ppa:vala-team/ppa
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo yum install vala
$ sudo yum update
$ sudo yum install fedora-upgrade
$ sudo fedora-upgrade
This will install GNOME and the dependencies required for GNOME-Calculator.
Now to download the source code from git, you need to have a basic knowledge of GIT Version Control. If you have no idea what GIT is ,no problem, you can read all about it here .
Copy paste the following command in the terminal to clone the GNOME-Calculator repository into your git repository.
$ git clone https://git.gnome.org/browse/gnome-calculator
Now that you have the source code into your git repository, enter into the source folder
$ cd gnome-calculator
As you can see, it has a folder called src which will contain the Vala source code of Gnome-Calculator where you need to make the required changes for fixing bugs or introducing a new feature.
Now copy paste the following commands into the terminal to build the GNOME-Calculator from the source code.
$ sudo make install
You may encounter some errors due to unmet dependencies during any of the steps. Make sure you have the following packages installed.
If you still encounter errors due to unmet dependencies, then do check properly all the unmet dependencies along with the Version required and install them accordingly either by downloading their source code or using the following commands.
$ sudo apt-get install
$ sudo yum install
Although I strongly recommend downloading the source code of required packages of latest version and installing from source.
Once you have successfully completed running the ‘sudo make install’ command, you are good to go!
Give the following command in the terminal.
If the Calculator appears, Great Job! You have successfully built GNOME-Calculator from source. Now you can get started with hacking its source code!
Pretty exciting huh?😉 Make sure that after making the required changes in the source code , you run the make and sudo make install commands again to recompile it and see the effect of the changes you made.
That’s all it for today! If you have any queries, please feel free to comment below.