— with JHbuild
If you don’t want to mess up your operating system and it’s dependencies while trying to build the work-in-progress version of GNOME, JHbuild is the right tool for you. It is used to safely download, build, install and run the latest GNOME development code alongside your existing GNOME installation. JHbuild is a command-line program which automates downloading, building and running the latest source code. It builds software into a separate install prefix without interfering with the rest of your system.
With JHbuild you can easily run collections of source packages, called ‘modules’. JHbuild uses ‘module set’ files to describe modules available to build. The ‘module set’ files include dependency information, so JHbuild can properly build modules in the right order. It can build modules from a variety of sources and using a variety of build systems.
- Download JHbuild, recommended with git from a new directory where all source code will be installed, for example, ~/checkout/gnome:
$ git clone git://git.gnome.org/jhbuild
- Build and install JHbuild:
$ make install
- Add ~/.local/bin to the PATH:
JHBuild can be configured via configuration file jhbuildrc present in ~/.config folder. Couple of hints:
- checkoutroot – directory to unpack the source trees
- prefix – directory to install modules, for example, /opt/gnome
- moduleset – the name(s) of the module set(s) to use
- modules – define individual modules or groups of modules which you want to install:
modules = ['gnome-weather', 'gnome-documents']
ignore_suggests = Truewhich will ignore installing many unwanted dependencies, making the building process faster.
GNOME’s development code often requires additional software. To check that necessary tools are installed run:
$ jhbuild sanitycheck. JHbuild can help you with installing some of the required software with the command:
$ jhbuild sysdeps --install. Even with these installed packages, you may find more things will need to be installed depending on you distro.
- After set up is complete, JHbuild can be used to build modules defined in the .config file:
$ jhbuild build
- To build a set of modules and their dependencies you should pass the module names as arguments:
$ jhbuild build gnome-documents
- If To resume the build at a particular module use –start-at option:
$ jhbuild build --start-at=pango
- To build one or more modules, ignoring their dependencies use the buildone command:
$ jhbuild buildone gnome-documents
Adding the option -n will prevent downloading updates – this will avoid conflicts with local changes you have made.
- To download or update all the software sources without building use the update command:
$ jhbuild update
- To run a particular command with the same environment used by JHBuild, use the run command:
$ jhbuild run program
- To start a shell with the same environment used by JHBuild, use the shell command:
$ jhbuild shell
If you are stuck with the menu prompted to choose the option to continue, you should choose to start the shell and install the required dependencies using
jhbuild and exit the shell with
exit command. After that continue building your module. More informations on the link.
Enjoy your new, awesome working environment! 🙂