[Qt-interest] qmake and absolute paths pointing to Qt build directory
Josh
jknox at irobot.com
Thu Jan 21 16:48:41 CET 2010
Andreas Pakulat wrote:
> On 21.01.10 11:46:19, Alexander Kurz wrote:
>
> Well, you could check how the Qt binary packages do the relocation. I've
> recently read on the pyqt list that a small utility replaces the paths in
> the binaries. See
> http://www.riverbankcomputing.com/pipermail/pyqt/2010-January/025572.html
>
> Another solution used by the KDE/Windows team is a qt.conf file that has
> the paths adjusted as needed. You should find examples for that on the web.
>
>
Hey,
I posted that stuff about the qpatch util for . Its working great for
me. It does smell like
a hack, but I could never get things to build together nicely using
qt.conf. Something
downstream would inevitably fail.
qpatch is available in binary form in the QtCreator and SDK installers.
I just keep the
binary stashed away in my build system.
The trick is:
1. get the original qt install prefix (qmake -query QT_INSTALL_PREFIX)
2. generate a list of files in the qt directory to patch.(I do this by
grepping everything for
the original Qt install prefix)
3. run "qpatch list_of_files.txt oldInstallPrefix newInstallPrefix"
That's pretty easy to automate with bash, python, make, etc. Do this
whenever you need
to relocate a custom Qt build. The resulting install should work fine.
My "acceptance test"
for this was to use Qt Creator to build some example against my locally
built, relocated, Qt
packages.
Good luck.
Josh
More information about the Qt-interest-old
mailing list