[Qgis-developer] QGIS Preview Release 2

William Kyngesburye woklist at kyngchaos.com
Sun Sep 17 12:44:23 EDT 2006


On Sep 16, 2006, at 11:21 PM, Tom Elwertowski wrote:

> William Kyngesburye wrote:
>> - What about the Qt plugins?  How does the whole mess know where  
>> to find them?  I noticed you put imageformats folder (and just  
>> that) directly alongside bin/lib/share, while I dropped the whole  
>> Qt plugins folder in the QGIS app, to mirror how it is in the Qt  
>> installation.  Are any of the other Qt plugins needed (accessible,  
>> designer, sqldrivers)?
>
> The default search looks first in plugins/ within the install dir,  
> then directly in the executable path and finally in  
> $QT_PLUGIN_PATH. (http://doc.trolltech.com/4.1/ 
> qcoreapplication.html#libraryPaths)
>
It's not clear from that doc how it handles the plugins subfolders  
(accessible, designer, imageformats, sqldrivers).  Are those  
predefined subfolders?  So those plugins subfolders should be  
directly in the lib search path folder, like you have it, instead of  
inside 'plugins'?  I should fix my QGIS package then.

> A crash was occurring if the bundle contained Qt and then loaded  
> plugins from a different version in the install dir. Since only one  
> Qt plugin was needed, I replaced the full list with just the second  
> item in main.cpp:374. A better solution would be to replace  
> plugins/ in the install dir with plugins/ in the executable path  
> rather than drop it.
>
> However, I just noticed (http://doc.trolltech.com/4.1/qt-conf.html)  
> that the built-in paths can be altered by creating Contents/ 
> Resources/qt.conf
>
> To redirect all Qt directories, the contents should be
>
> [Paths]
> Prefix = MacOS
>
> but this doesn't work. Instead, each directory needs to be specified:
>
> [Paths]
> Plugins = MacOS/plugins
>
> An empty qt.conf also works if Qt is in Contents.
>
> Should I fix the plugin path in main.cpp or remove it and use  
> qt.conf instead?
>
Hm, how about this on that qt.conf doc page:

"On Mac OS X, the Prefix is relative to the Contents in the  
application bundle. For example, application.app/Contents/plugins/ is  
the default location for loading Qt plugins."

So, in main.cpp, *don't* clear the lib search path, because it's  
already defaulting to the app bundle, and in a meaningful location  
(but where neither of us put them ^_^).

-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.





More information about the Qgis-developer mailing list