On 2018.05.10 08:26, Thomas Capricelli wrote:
On 09/05/2018 15:44, Christian Dávid wrote:
> there is a high chance that KMyMoney is not loading the plugin you compiled but one that was shipped with your distribution. This also explains why the debugger is not working (it should work without any problems). I had the same problem and my (bad) solution was to uninstall the version of KMyMoney of my distribution.

Speaking of it, I've been told (on IRC i think) that there's a kind of documentation somewhere about running kmm from the build dir without installing. It probably involves messing with LD_PATH and such so that the builddir plugins are found/used instead of the system/distribution ones.. .

But i could not find it, does anyone have any more information about this ??

Hello Thomas,

It's not just running it from the build dir - it's running any copy other than the system installed version. It also involves far more than LD_LIBRARY_PATH. The issue is that while the main executable can be called directly, and LD_LIBRARY_PATH can be used for the main .so files, there are many other necessary files, such as icons and plugins, that KDE finds based partly on environment variables (including several KDE..., XDG_..., QT_..., and other directory paths) and also on cached values, which need to be reset by running kbuildsyscoca5.

Below is one of the scripts I use to do this, but right now, I suspect it may need further changes to completely avoid using installed files instead of newly compiled versions.

--------------
#!/bin/bash
if  [ "x$1" == "xkeep" ]
then
    file=''
elif  [ "x$1" == "x-n" ]
then
    file='-n'
else
    cp /home/jack/home/finance/KMM.kmy /home/jack/home/finance/test.kmy
    file=/home/jack/home/finance/test.kmy
    echo copied KMM.kmy to test.kmy
fi
export KDE_FULL_SESSION=false
prepend() { [ -d "$2" ] && eval $1=\"$2\$\{$1:+':'\$$1\}\" && export $1 ; }
export KDEDIRS=/home/jack/KDE/KMM/installmaster
echo KDEDIRS=$KDEDIRS
prepend LD_LIBRARY_PATH ${KDEDIRS}/lib
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
prepend XDG_DATA_DIRS $KDEDIRS/share
echo XDG_DATA_DIRS=$XDG_DATA_DIRS
echo XDG_DATA_HOME=/home/jack/KDE/KMM/installmaster/share
export XDG_CONFIG_HOME=$KDEDIRS/.config
echo XDG_CONFIG_HOME $KDEDIRS/.config
prepend XDG_CONFIG_DIRS $KDEDIRS/etc/xdg
echo XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS
export KDESYCOCA=/home/jack/KDE/KMM/installmaster/var/cache/ksycoca
export KDEHOME=/home/jack/KDE/KMM/installmaster/.kde
export KDEVARTMP=/home/jack/KDE/KMM/installmaster/var/tmp
prepend QT_PLUGIN_PATH $KDEDIRS/lib64/plugins
kbuildsycoca5
echo
env | egrep "KDE|XDG" | sort
echo
echo /home/jack/KDE/KMM/installmaster/bin/kmymoney $file
echo "****"
/home/jack/KDE/KMM/installmaster/bin/kmymoney $file


Jack

Reply via email to