script for win32

Christian Stimming stimming at
Sat Aug 26 14:56:27 EDT 2006

Am Samstag, 26. August 2006 15:16 schrieb Derek Atkins:
> But yeah.  I decided to do this because the top-level makefile in
> GnuCash tries to "LN_S" the gsf and goffice libraries and that failed
> miserably for me because there are no symlinks on windows.  I suppose
> I could have re-routed the build system so the LN_S was in the "other"
> direction and just linked the config file, but I figured that getting
> external GSF and GOFFICE was a better long-term decision.

Concerning GSF and GOFFICE, yes.

Concerning LN_S, this one bites us hard everywhere throughout gnucash. In a 
lot of places, we do

  $(LN_S) . gnucash

which, if symlinks are unavailable, results in 

  cp . gnucash

which either fails (due to the directory and no -R) or tries to copy 
everything recursively into itself...

I'm inclined to propose really changing all these LN_S into a manual copying 
of those files that are actually used. For the goffice-config.h headers that 
would be

  make goffice-config.h
  mkdir goffice
  cp goffice-config.h goffice

and for all those scheme modules this would be

  mkdir gnucash
  cp $(gncmod_DATA) gnucash

or similar...  I've written about this on the wiki page in the "symlinks" 

There's one intermediate solution before we start to change all of 
gnucash: The script could visit all those directories and execute 
the necessary steps by hand:

  mkdir g-wrapped; mkdir gnucash;
  make `grep noinst_.*_DATA | cut -d: -f2`  # generate g-wrappers
  cp gw-*.scm g-wrapped
  cp *.scm gnucash             # need to select the correct files here

> > * Edit goffice/goffice.def and remove the three symbols that are
> > mentioned in the error message, which are
> >  go_doc_mark_not_modified
> >  go_plugin_init
> >  go_plugin_shutdown
> >
> > (I guess the gnumeric people simply forgot to update goffice.def here.)
> I don't remember seeing any error message here.

The error message only comes if you build a dynamic library.

> > I've uploaded a binary gsf tarball to
> > and I hope to upload a binary
> > goffice as well soon.
> Once these are done we should DEFINITELY change the script to just pull
> down the binaries.

The binary goffice is available there as well, except it only has a 
libgoffice-0.3.pc whereas gnucash expects a libgoffice-1.pc.

> > As for gnucash: One post-compile pre-install step that *has* to be
> > performed as well is similar to g-wrap: In each gw-foo.scm that has
> > a command (dynamic-link "libgw-foo"), the library name needs to be
> > changed into "libgw-foo-0". Maybe you could already come up with
> > some scripting magic that does this for all files...
> I think this is a change that should be made in g-wrap itself.  When
> g-wrap generates the file is should output the correct name.

Yes, that would be even better -- but OTOH I'm not totally sure whether g-wrap 
actually knows the SO_MAJOR version number, which is the one in use here. For 
now, gnucash always uses a zero, but as a general solution... anyway, we only 
need a solution for ourselves, so that's probably not a problem here.


More information about the gnucash-devel mailing list