[Qt-interest] How to relocate an custom build and install of Qt?
Thiago Macieira
thiago.macieira at trolltech.com
Thu Jul 2 19:41:05 CEST 2009
Dave Peterson wrote:
>Hello,
>
>I'm trying to build an installer on Windows and OS X for an app that is
>based on Qt, and currently includes alot of the Qt distribution itself
>such as demos, examples, plugins, etc. As part of that effort, I need
>my libs and plugins to be relocatable -- i.e. work from where ever the
>user told my app to install. I can't seem to get various parts of Qt to
>work in these random install locations, in particular I get missing
>plugins and occasionally DLLs too. I also can't get PyQt to build
>against these relocated installs. I believe these problems are related
>to the "builtin" properties shown by qmake when one does a 'qmake
> -query'.
>
>Does anyone know where these values are stored and how I can change
>them?
They are stored in QtCore (QtCore4.dll, libQtCore.dylib, etc.) and all the
bootstrapped tools (qmake, moc, uic, rcc), though for practical purposes
you only need to change QtCore and qmake.
You need to open the binaries with an hex editor and modify them (or just
use QFile). The path is preceded by qt_prfxpath. There are a couple of
other paths you need to change too -- see
src/corelib/kernel/qlibraryinfo.cpp for more information.
That's exactly what the Windows installer does. The Mac installer doesn't
relocate, since it doesn't give you an option on where to install.
But, in order to support that, we build Qt in a path that is very long, so
that we can support replacing the path during installation. You'll have to
do the same.
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090702/3679d5e5/attachment.bin
More information about the Qt-interest-old
mailing list