[Development] Qt 5 file hierarchy
Knoll Lars
Lars.Knoll at digia.com
Mon Sep 24 16:12:59 CEST 2012
On Sep 24, 2012, at 2:51 PM, Thiago Macieira <thiago.macieira at intel.com>
wrote:
> On segunda-feira, 24 de setembro de 2012 12.38.51, Knoll Lars wrote:
>>> The Qt 4 plugins live in the Qt4 prefix. Existing practice is that it's
>>> /usr/lib$SUFFIX/qt4/{plugins,imports}. So we don't clash with those.
>>>
>>> Technically speaking, since we're changing to qt5 anyway, we could change
>>> the default to be QtQuick2. But that means code using QtDeclarative and
>>> Qt Quick 1 must install to a different directory under imports, which is
>>> more change.
>> The imports from the qtquick1 module already do that.
>
> I meant the third-party code that is currently using Qt Quick 1 in Qt 4. They
> need to change their buildsystem to install to a different location in Qt 5
> now, then change again once they port to Qt Quick 2.
>
>>> My proposal is to leave QtQuick 1 unchanged and establish a new hierarchy
>>> for Qt Quick 2. Also note that the "share" dir I proposed does not
>>> include the "qt5" name.
>>
>> That's scary… I wouldn't recommend that. People should explicitly test
>> against Qt 4 and Qt 5 not get this implicitly.
>
> That's orthogonal. They will need to test against Qt 5 anyway. Think of a
> hypothetical "Foo Components" project that is being developed right now with
> Qt 4. It installs to:
>
> $$QT_INSTALL_IMPORTS
> a.k.a /usr/lib/qt4/imports on most distros
>
> Once the port to Qt 5 is done, as a first step, they'll still be using Qt Quick
> 1. But they still need to change their buildsystem to install now to:
>
> $$QT_INSTALL_IMPORTS/QtQuick1
> a.k.a. /usr/lib/qt5/imports/QtQuick1
>
> As a second step, they will port to Qt Quick 2. Now they need to change the
> install dir *back*:
>
> $$QT_INSTALL_IMPORTS
>
> I'm proposing we invert that and avoid the entire mess we made with the
> qtdeclarative-vs-qtquick1. By the way, have we fixed that mess?
>
> Instead, they won't need to adapt the buildsystem when simply going to Qt 5.
> They will only need to change the install dir when porting from Qt Quick 1 to
> Qt Quick 2.
You will need to adapt the pro file to some extent anyway when moving to Qt 5, since a lot of the magic on how to build and package modules has changed.
The even better way would be to make this transparent when building. In principle, the build system should know whether this is a QML 1 or QML 2 plugin, and could adapt the path accordingly.
Cheers,
Lars
>
>>> True, we could add the platform-independent search paths in a later
>>> release. Also note that the search functionality is is implemented in
>>> QStandardPaths. It already has the necessary logic.
>>
>> Let's leave this out of 5.0, to simplify things.
>
> Ok.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
> Software Architect - Intel Open Source Technology Center
> Intel Sweden AB - Registration Number: 556189-6027
> Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list