[Interest] Qt5, XCB and X11

Andreas Pakulat apaku at gmx.de
Sun Jul 13 00:25:06 CEST 2014


Hi Till,

On Sat, Jul 12, 2014 at 3:03 PM, Till Oliver Knoll <
till.oliver.knoll at gmail.com> wrote:

> Am 11.07.2014 um 20:52 schrieb Andreas Pakulat <apaku at gmx.de>:
>
> ...
>
>
> Its true that it makes it harder, but it also means having to carry around
> more duplicated code. Recently had to add Qt5 libs for a dozen example apps
> we ship and that was not quite that easy to get up and running (without
> also shipping a dozen copies of Qt5 which frankly is a bit too much).
>
>
> Yes, that's the downside of BYOL ("Bring Your Own Libraries") ;) And as I
> wrote earlier, kind of defeats the idea of "shared libraries" (in the best
> case the "application" consists of several binaries which share some libs
> among each orher).
>
> But with spinning hard disks the size of terrabytes and SSDs the size
> of.... Hey! Wait a minute! ;)
>

On Windows we actually do create copies under certain circuumstances (no
hardlink support on the install disk/windows version).


> So what was your final solution then if you did not deploy the Qt libs
> with each example application? Did you place the binaries into one single
> App Bundle (together with one Qt framework) which would start an " example
> launcher" when clicked?
>

On Linux and MacOSX we set RPATH to a relative path based on the
executable's location. On Linux this is rather simple, on MacOSX we patch
Qt and the executables using install_name_tool to set that up properly -
including the platform plugin iirc. To be precise, the executable gets an
rpath value added like @executable_path/../../../../qtforexamples/ where
the qtforexamples folder contains the Qt frameworks. The install paths for
the qt frameworks inside the executable are changed to be
@rpath/Qt<libname>.framework/Versions/5/Qt<libname> for each lib that it
links to. The same is done to the libraries inside the frameworks so they
can each find their dependencies based on the rpath set in the executable.
Oh and of course also the platform plugin.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140713/bad7bdcc/attachment.html>


More information about the Interest mailing list