[Development] Qt 5 file hierarchy

Romain Pokrzywka romain.pokrzywka at kdab.com
Fri Sep 21 19:36:43 CEST 2012


On Friday, September 21, 2012 06:01:28 PM Thiago Macieira wrote:
> The Qt 5 file hierarchy upon installation should be:
> 
> bin/		- executables run by the user
> 		- unversioned applications, like assistant, linguist, qdbus,
> 		  qdbusviewer
> 		- versioned applications, like qmake[35], qdoc5, qmlviewer5,
> 		 maybe moc5, uic5, rcc5
> doc/		- gone to share/qt5/doc
> examples/ - gone to share/qt5/examples
> include/	- versioned include dirs:
> 	QtCore5 or QtCore-5 or QtCore.5 or Qt5Core/
> 	[...]
> 	Qt/ 	- gone, forever, no replacement
> imports/	- horribly flawed design, see below
> lib/		- arch-specific files (also lib<qual> or lib/<arch>/)
> 	./		 - versioned libraries (.a, .so, .la, .prl)
> 	pkgconfig/ - versioned .pc files
> 	qt5/ 		 - arch-specific support files:
> 		bin/ or libexec/
> 		 - executables not run by the user, like syncqt, lrelease, lupdate
> 		imports/
> 		 - QtDeclarative imports
> 		qml2/
> 		 - QML2 (including QtQuick2) arch-specific imports
> 		mkspecs/ ?
> share/	- arch-independent files
> 	qml2/	 - QML2 (including QtQuick2) arch-independent imports
> 	qt5/
> 		doc/
> 		examples/
> 		mkspecs/	?
> 
> Note on imports: the design is flawed. It was flawed in Qt 4 and it's worse
> now on Qt 5. For Qt 4, the flaw was that it did not differentiate QML
> imports that were arch-independent from the ones that required plugins.
> With Qt 5, it becomes worse because Qt Quick 1 and 2 share the same
> directory.
> 
> Instead, I recommend we immediately change QML2 to the system that Perl
> uses: put the arch-specific files inside the lib hierarchy, for which
> distributions have already solved the multiarch problem, but put
> arch-independent files in the share hierarchy.
> 
> In addition, the loader should be clever to merge similar names from the two
> different paths. That is, imagine a .qml file in share/qml2 that requires a
> plugin: if the loader is a 32-bit application, it would search for the
> plugin in lib/qt5/qml2, but if it's a 64-bit application it would search in
> lib64/qt5/qml2.
> 
> Additionally, if we're still using QML2 by the Qt 6 release, the plugins
> could be made available in lib/qt6/qml2.
> 
> As for mkspecs, I believe they should be in share, since they are
> technically- speaking arch-independent.

+1, especially the mkspecs part.

Cheers,
Romain
-- 
Romain Pokrzywka | romain at kdab.com | Senior Qt Software Engineer & Trainer
303 Twin Dolphin Dr., Redwood City, CA-94065
KDAB (USA) LLC, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions




More information about the Development mailing list