qof/qsf/gnucash backend clarification (was: installation paths, option definition)

Neil Williams linux at codehelp.co.uk
Sat Sep 3 18:00:28 EDT 2005

On Saturday 03 September 2005 10:00 pm, Christian Stimming wrote:
> > Gnucash GUI calls the gnc file backend and adds the QSF backend. Much as
> > it has always done. CashUtil does the same.
> Okay so far. I'd just like to ask you for some name clarification here:
> What you call "gnucash backend" used to be called "gnucash XML file
> module", right?


GnuCash File Backend v2, v1 and binary. src/backend/file with 
src/business/business-core/file included. In effect, it is the "gnucash file 
backend" *as it is at runtime* once the business module is loaded. I'm 
transferring the linkage to build time instead of runtime - then putting all 
that code in a library that can be loaded as one (at runtime) using a 
different load method!

> Then please give it a name that makes this clear,

libgnc-backend-file.la - it's actually more accurate than it looks because it 
includes ALL the file backend code (i.e. not just XML) from the current 
GnuCash tree AND it includes ALL the handlers for that backend - binary and 

> because  
> the gnucash code from src/engine (called "gnucash engine") is also totally
> GUI-independent but from what I understand is not part of what you call
> "gnucash backend".

True. src/engine confuses things because that directory holds at least TWO 
distinct kinds of files: QOF files and object files. Both sets of files are 
GUI-independent but serve quite different functions. Object files also exist 
elsewhere - namely in business-core. These are also GUI-independent.

So I talk of libcashobjects.la and libgnc-backend-file.la.

If you get a chance to download CashUtil the distinctions might be clearer.

cashutil/src/objects contains objects from /src/engine and business-core
cashutil/src/backend contains files from backend/file and business-core/file.

> When gnucash uses libqof as object framework then there 
> is still a lot of non-GUI modules in the remaining gnucash application.

When libcashobjects.la and libgnc-backend-file.la are in their own package the 
amount of non-GUI code is much reduced. AFAICT, it may be just import/export, 
and Budgets.

More will inevitably follow as logic currently implemented in the GUI must 
eventually be abstracted into a form that can be shared with CashUtil. e.g. 
when creating an account and the dialog insists on a parent etc.

> You 
> should therefore be quite careful about what you call what.

I'll try to add the file backend listings to the rest of the tables here:

All files listed in the cashutil/src/objects table (on the right) are part of 

Their equivalent files from backend/file and business-core/file plus the 
Sixtp, binary handlers and associated files - these form 

As time goes on and more ancillary logic is removed from the GUI and into the 
package shared with CashUtil, I'll endeavour to keep the listing updated.

> Which package's headers have to be available when 
> compiling the other package? That is the interesting part for the compile
> time dependency.

The other package - consisting of libcashobjects.la and libgnc-backend-file.la 
depends on libqof1, libglib-2.0, libxml2.

Then I build the cashutil program on top of those and soon the GnuCash GUI 

CashUtil depends on the 'package' containing libcashobjects.la and 
libgnc-backend-file.la - that brings in libqof1, libxml2 and libglib-2.0. It 
also uses readline, popt and gettext.

PilotQOF will only depend on libqof1, readline, popt and gettext.

GnuCash GUI will depend on the package created from libcashobjects.la and 
libgnc-backend-file.la as well as libqof1.

> From what I gathered: The gnucash-file-backend-of-libqof 

The file backend is not for QOF, it's for CashUtil. QOF is remaining strictly 
non-financial. It really doesn't know the difference between an Account and a 
watermelon to revisit an older thread!

> depends on libqof headers; the gnucash-application-with-gui-and-other-stuff
> depends on libqof headers. Is this correct?

Yes, albeit incomplete.

OK, at compile time:

libgnc-backend-file.la requires libqof1 (for the foreach etc.), glib and 
libxml2. It also depends on libcashobjects.la (which is why the two must go 
into a package together).

libcashobjects.la (the objects from engine and business-core) depends on 
libqof1 and glib.

libqof1 itself only depends on libxml2 (>= 2.5.10) and libglib-2.0 and 
includes QSF.


Neil Williams

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050903/b684b018/attachment.bin

More information about the gnucash-devel mailing list