Testing docs in development version

Geert Janssens janssens-geert at telenet.be
Sat Jan 12 06:44:48 EST 2013


On 12-01-13 03:53, Yawar Amin wrote:
> On 2013-01-11 20:25, Yawar Amin wrote:
>> Hi Geert,
>>
>> In http://svn.gnucash.org/trac/changeset/22378 you said that there would
>> be a way to test the help documentation on Linux when building and
>> testing from source--can you point me to how to do that? I.e. how to
>> solve the problem of Yelp not finding gnucash-help and gnucash-guide
>> when I've them built from source.
>>
>> If anybody else knows how to do this, please feel free to chip in.
> I should have also mentioned that I'm trying to test the docs with both
> GnuCash and the docs built from source, GnuCash installed under my home
> directory, and the docs not installed at all.
>
> I'm guessing I'll need to install the docs somewhere at least, and then
> do something to tell Yelp (or scrollkeeper?) where that is.
>
> But I don't have a solid idea, so any help appreciated.
>
> Yawar
>
>
The easiest way I have found is to set environment variable XDG_DATA_DIRS.

For this to work, you will have to install the gnucash docs somewhere, 
just like you have installed a custom built gnucash in your home 
directory. You can install the docs in the same directory as gnucash, 
but I wouldn't do that as it would make it more difficult to start from 
scratch for only one of the two components.

As an example setup, suppose we want to install gnucash and gnucash-docs 
in separate subdirectories in our homedirectory, like so:
/home/geert/gnucash
/home/geert/gnucash-docs

The procedure to get the proper files installed there is exactly the 
same for gnucash and gnucash docs.
In the source tree of gnucash, you run
./autogen.sh (only the first time)
./configure --prefix /home/geert/gnucash (add other configure options to 
your taste)
make
make install

In the gnucash-docs source tree you run:
./autogen.sh (only the first time)
./configure --prefix /home/geert/gnucash-docs (add other configure 
options to your taste)
make
make install

Now to be able to load the locally installed docs from within gnucash, 
you can run
XDG_DATA_DIRS="/home/geert/gnucash-docs/share/:/usr/local/share/:/usr/share/" 
/home/geert/gnucash/bin/gnucash

This is one single command and should all be on one line. The mail 
client will probably split it up on multiple lines though, so reassemble 
it in your console.

Similarly, you can open the development docs straight in yelp like this:
XDG_DATA_DIRS="/home/geert/gnucash-docs/share/:/usr/local/share/:/usr/share/" 
yelp "ghelp:gnucash-help"
XDG_DATA_DIRS="/home/geert/gnucash-docs/share/:/usr/local/share/:/usr/share/" 
yelp "ghelp:gnucash-guide"

Some final sidenotes:
- XDG_DATA_DIRS is usually not set by default. In that case it defaults 
to "/usr/local/share/:/usr/share/". If you set it explicitly, these two 
paths have to be added as well or gnucash won't run.
- If XDG_DATA_DIRS is set on your system, you should replace the above 
calls with 
XDG_DATA_DIRS="/home/geert/gnucash-docs/share/:$XDG_DATA_DIRS" <command 
to run> to get a similar result.
- I kept the build instructions limited on purpose above. Personally I 
never build straight in the source directory like in the example but 
rather in a separate build directory. If you are interested in this and 
don't know how to do this, just ask.
- Feel free to add this information (or a cleaned up version) somewhere 
on the wiki ;) It only occurred to me after writing the mail and I don't 
have much time currently to make a nice page of it.

Can you work from this ?

Geert


More information about the gnucash-devel mailing list