El dimecres, 21 de novembre de 2018, a les 17:36:47 CET, Никита Сиргиенко va escriure: > For example, we have KDE Aplication program with knsrc files for > KNS3::DownloadDialog (from KHotNewStuff - KDE Framework). > Acording to documentation ( > https://api.kde.org/frameworks/knewstuff/html/classKNS3_1_1DownloadDialog.html, > "Detailed Description") KNewStuff searchs knsrc files only in /etc/xdg > directory. > It works good for packages from repository, because in this case, if we > install knsrc files using KDE_INSTALL_CONFDIR, in package the files will be > in /etc/xdg. > But, if we build and install the program from source, we have some > problems: we could don't change CMAKE_INSTALL_PREFIX (/usr/local/ by > default) or change it to /opt, for example. And in this cases > KDE_INSTALL_CONFDIR will be different from /etc/xdg. > And DownloadDialog can't found our knsrc files. > So, anyone know good solution for this problem, except obvious passing > cmake the confdir variable to code as preprocessor variable and using > dialog constructor with path to configuration file?
Install to whatever prefix you want and just define XDG_CONFIG_DIRS to it. Or just source the prefix.sh file created on your build dir that already sets that environment variable correctly. Cheers, Albert > > Best Regards, > Nikita >