Instructions for Building and Running the Development Code for Documents
This is a simple guide for setting up a hacking environment for the Documents application. Please feel free to add notes if you find an inaccuracy or run into a problem. This is meant to be a beginners' guide. You may not need to use all of the information, but I prefer to spell things out so you can refer to it if you get stuck at any point.
- Launch the terminal
Create a directory for JHBuild and install it:
$ mkdir checkout
$ cd checkout
$ git clone git://git.gnome.org/jhbuild
$ cd jhbuild
$ ./autogen.sh && make && make install
Check that the install was successful:
$ cd /home/yourName/.local/bin/
you should see: install-check jhbuild
Add ~/.local/bin to the PATH:
to permanently add it to the path variable:
$ echo PATH=$PATH:~/.local/bin >> ~/.bashrc
Customize your .jhbuildrc (I'm using nano to open the file, you can use whatever editor you like):
$ mkdir ~/.config
$ cp ~/checkout/jhbuild/examples/sample.jhbuildrc ~/.config/jhbuildrc
$ nano ~/.config/jhbuildrc
uncomment #moduleset = 'gnome-apps-3.4'
edit it to read: moduleset = 'gnome-apps-3.8'
If you are using Ubuntu, then edit your jhbuildrc to look like this:
moduleset = 'http://git.gnome.org/browse/jhbuild/plain/modulesets/gnome-apps-3.8.modules'
checkoutroot = os.path.expanduser('~/devel/gnome/')
prefix = os.path.expanduser('~/devel/jhbuild/install')
# repos['git.gnome.org'] = 'ssh://email@example.com/git/'
repos['git.freedesktop.org'] = 'git://anongit.freedesktop.org/git/'
module_autogenargs['gnome-shell'] = '--enable-jhbuild-wrapper-script'
module_autogenargs['gnome-settings-daemon'] = '--disable-ibus'
module_autogenargs['gnome-control-center'] = '--disable-ibus'
# to speed up builds of GNOME, try '--disable-static --disable-gtk-doc'
Make the directories writable:
$ cd checkout
$ mkdir gnome
$ cd gnome
$ sudo chmod -R 777
Check your JHBuild:
$ jhbuild sanitycheck
$ jhbuild sysdeps --install
follow the directions here to install additional packages
$ jhbuild bootstrap
including Webkit (takes a few hours longer, milage varies):
$ jhbuild build gnome-documents
to build without Webkit:
$ jhbuild build --skip=webkit gnome-documents
In my experience, most errors are caused by missing development packages. if you run into an error, look at the terminal output. after "checking for" you may find that you are missing a required package. You can check for the package using yum info packageName. if you have the package installed check to see if you need the development package by running yum info packageName-devel. Install the required packages.
The miners are installed in /opt/gnome/share/dbus-1/services by JHBuild. Copy them to /usr/share/dbus-1/services:
Run your JHBuild version of Documents:
$ jhbuild run gnome-documents
If you run into issues, try the following:
If you have this error:
JS ERROR: !!! Exception was: TypeError: selectAll is null
JS ERROR: !!! message = '"selectAll is null"'
JS ERROR: !!! fileName = '"/opt/gnome/share/gnome-documents/js/view.js"'
JS ERROR: !!! lineNumber = '220'
JS ERROR: !!! stack = '"()@/opt/gnome/share/gnome-documents/js/view.js:220
then run your miners via the terminal:
$ cd checkout/gnome/gnome-documents/src
$ jhbuild shell
$ GDATA_MINER_PERSIST=1 /opt/gnome/libexec/gd-tracker-gdata-miner
$ ZPJ_MINER_PERSIST=1 /opt/gnome/libexec/gd-tracker-zpj-miner
If you can successfully run Documents but no documents are appearing, assuming you have documents in your local directories or have added the correct accounts (e.g. Google) to Online Accounts and set the toggle switch for Documents to "On":
$ tracker-control --start
If the theming looks strange (e.g. there are no icons in the application), then you need to build gnome-themes-standard:
$ jhbuild build gnome-themes-standard
Suggested Topics for Documentation
Search, selection mode and the various actions you can do inside it and the various controls you have available while previewing - both the actions available from the gear menu and the document navigation features we recently implemented in master (just keep in mind we have more work lined up for 3.8 on this part, so what you see in master might not be final yet).