[KDE/Mac] Thoughts on standard directories in Qt5 - QStandardPaths
jpwhiting at kde.org
Wed Dec 10 17:18:47 UTC 2014
Marko, Rene, Ian,
I am probably coming at this from the wrong perspective (linux side) but I
see the QSP issue as follows. On linux we have paths for standard stuff
(cache, data, etc.) with defaults for each ~/.local/share/ /usr/share
/usr/local/share/ for example for GenericDataLocation for example, but
QStandardPaths also checks an environment variable so these defaults can be
overridden (XDG_DATA_DIR for this example). On mac osx and windows this is
not the case, there are defaults, but no environment variables to override
the defaults. This causes a problem because the software developed for
linux expects data, configs, etc. to be in these locations, but on mac osx
(maybe just when using macports, but also when installing stuff into custom
prefixes like /opt/local or /kde or anything non standard) the default
locations aren't where the date, configs etc. are installed.
For kde software based on qt5 and kf5 this needs to be fixed, and I see two
possible solutions, one of which seems like a better idea to me, but I'm
not an experienced mac developer, so I would like to ask your opinion.
1. We patch Qt5 itself as Marko has done to look in the linux environment
variable locations in addition to the standard mac paths. This seems ok to
me, but feels like a workaround/hack because these environment variables
are meant for XDG compliant desktop environments, not really intended for
other environments (as David Faure pointed out I believe).
2. We patch Qt5 itself similar to how Marko has done, but in a way that it
will likely get upstreamed into Qt itself. For this I suggest some native
mac osx way of doing overrides. Maybe a new environment variable
(MAC_DATA_DIR?) or if environment variables aren't common (as it sounds
from reading other e-mails on this list) set overrides in some info.plist
or some mac way to set overrides or settings and patch Qt5 to read that to
find overrides. In this way the tests can set some info.plist or whatever
and run with their custom overrides for these paths and can find the files
where they expect. Then some master kde or macports info.plist can set the
overrides it needs such as making it look for data in /usr/local/share or
/opt/local/share or whatnot. This has the advantage that it makes QSP act
similarly to linux and also that it can likely get upstreamed into qt5
P.S. I know nothing about info.plist, but have heard the term here and
there, if there's something better/different or if my understanding of how
those work is wrong don't hesitate to tell me.
On Wed, Dec 10, 2014 at 9:58 AM, Marko Käning <mk-lists at email.de> wrote:
> Hi René,
> On 10 Dec 2014, at 10:46 , René J.V. Bertin <rjvbertin at gmail.com> wrote:
> > Ideally we wouldn't have to set these variables in a "production" build…
> yes, we don’t want that. But we’d have them in place if we needed them for
> some reason.
> > Are they queried in more than 1 location throughout the code?
> Only in said QSP source.
> > I'm guessing you're not sleeping in the same room? ;)
> Next door. But I think I still heard some hard disk rattle… ;)
> kde-mac at kde.org
> List Information: https://mail.kde.org/mailman/listinfo/kde-mac
> KDE/Mac Information: http://community.kde.org/Mac
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kde-mac