QT_PLUGIN_PATH (Re: Install kimgio plugins in the Qt image format plugins dir)

David Faure faure at kde.org
Fri Oct 26 17:07:04 BST 2007


On Friday 26 October 2007, Thiago Macieira wrote:
> Em Friday 26 October 2007 17:45:30 David Faure escreveu:
> > On Thursday 16 August 2007, Leo Savernik wrote:
> > > Am Donnerstag, 16. August 2007 schrieb David Faure:
> > > > > I was wondering if it's not a good idea to install the kimgio plugins
> > > > > in the Qt image format plugins dir.
> > > > >
> > > > > This way Qt only programs can have the benefit of the extra image
> > > > > format plugins too.
> > > >
> > > > You can't install into Qt itself - could be root-owned and readonly.
> > > > Just set QT_PLUGIN_PATH to <kdeprefix>/lib/kde4/plugins.
> > >
> > > Couldn't this be done automatically on KDE session startup?
> >
> > Yes I think this would be a good idea.
> > What about the attached patch?
> >
> > Tested here, works -- at least the env var appears in the /proc/pid/environ
> > of the kde4 apps. Inside konsole it's not set since the shell gets its own
> > environment, but that's not something we can do anything about I guess,
> > shell people will still need to configure their shell.
> 
> Attached patch makes QCA not install to Qt's path either.

That's another topic - one that I have discussed with the QCA guys in private email.
They also want QCA to work on its own, so my startkde patch doesn't fully fix the problem
for them.

Brad Hards said the plan was (partly paraphrased) :

"
A configurable pluginDirectory, and as fallback:
testing if QTDIR/lib is writable to install there if possible, and elsewhere if not -- 
with a stderr message shown by cmake about the need for QT_PLUGIN_PATH,
or writing permissions.

So the logic is something like:
// No point in telling about writability if the whole of kdesupport needs it
if ( ( kdesupportInstallPrefix is writable ) && (pluginDirectory is not writable) ) {
        cmakeWarn( "You'll need to have root/admin rights to install QCA plugins\n" );
        cmakeWarn( "If this isn't suitable, consider setting the QCA_PLUGIN_DIR\n" );
        cmakeWarn( "cmake variable a directory you can right to\n");
}

if (pluginDirectory != QTDIR/plugins) {
        cmakeWarn( "Please ensure you set the QT_PLUGIN_PATH to \n");
        cmakeWarn( "include %1 so QCA can find its providers\n").arg(pluginDirectory);
}
"

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list