[Kmymoney-devel] Two instances at once, was: Debugging plugins

Christian Dávid christian-david at web.de
Thu Sep 11 18:09:20 UTC 2014


Am Samstag, 6. September 2014, 10:01:54 schrieb Jack:
> I've just tried this again, and it's still not working quite as I
> want/expect.  Hopefully I'm just missing some step or environment
> variable.

> I don't think I ever clarified that I'm only working on Linux
> (Gentoo). […]
Good, everything is easier then ;)

> > # Run cmake and set an install prefix
> > # "make install" will copy all files there
> > cmake -DCMAKE_INSTALL_PREFIX=../install/ ../
> 
> As I said before, I use "cmake ." and have now set the install dir  to
> /home/jack/install, using the full path because when I tried
> ../../install (to keep it out of the source tree) it somehow had the
> ../../ part twice in the install path, and so put everything one level
> higher than I intended.

I think KMyMoney does not support inside source builds. On several places 
KMyMoney’s CMake-files create config files and assumes a out of source build 
(e.g. in the CMakeLists.txt of the ofx plugin, the first line of code). This 
might work now, but there will cause issues some day. Also there is a high 
chance that the .desktop files for the plugins are incorrect then and cause 
your issues.

The path duplication is a strong indicator of an error. You should recheck 
that. Anyway, your command should be
cmake -DCMAKE_INSTALL_PREFIX=/home/jack/install/ .
(the hole last line).

> > # Build and install
> > make
> > make install
> > cd ../install/
> > 
> > # Give KDE's trader the chance to find the new services (= our
> > plugins)
> > # I guess on Windows (and maybe OS X) this command is different.
> > # You need  to set an environment variable to your current folder
> > export KDEDIRS=`pwd`
> 
> or in my case /home/jack/install, right?
The command I wrote uses the current path automatically, anyway you are right. 
But do not use the quotation marks I used here, they mean run command pwd. If 
you just replaced pwd by your path and kept them, the error is found.

> > # Refresh cache of the trader
> > # after the next run of make install you do not need this again
> > kbuildsycoca4
> > 
> > # Here you can test if it worked
> > # It does not show the library path but X-KDE-PluginInfo-Version
> > contains the
> > # version. At the end is the git commit.
> > ktraderclient --servicetype "KMyMoneyPlugin"
> > 
> > # run your own build
> > bin/kmymoney
> 
> While this clearly runs the newly built version, I don't believe
> everything else is also coming from the new install directory.  For
> example, I'm currently testing the Print check plugin, and it's
> configuration dialog is still defaulting to /usr/share/apps/... instead
> of /home/jack/install/share/apps, as I would expect or desire - is
> there some other environment variable to set?  I've started reading the
> docs on techbase, but I haven't yet seen anything that tells me where
> I've gone wrong.

How do you know which path is used? Which configuration dialog? Can you send me 
the output of ktraderclient --servicetype "KMyMoneyPlugin" ?

Was KDEDIRS set correctly?

General note: this description is for KDE4 only! You have to set other 
environment variables in the frameworks branch.

> > This allows you to install multiple versions of KMyMoney at the same
> > time. You
> > just have to set and unset KDEDIRS and run kbuildsycoca4.
> 
> Am I correct that unsetting is not important, as long as I run
> ksyscoca4 with the vars set correctly before I run any particular
> version?

If you only install KMyMoney in /home/jack/install, yes. Not, just unsetting 
KDEDIRS is not enough the cache must be corrected by calling kbuildsycoca4.

Grettings
Chris


More information about the KMyMoney-devel mailing list