On quarta-feira, 2 de janeiro de 2013 13.50.16, Yves Bailly wrote:
> Le 02/01/2013 13:42, Thiago Macieira a écrit :
> > On quarta-feira, 2 de janeiro de 2013 10.53.03, Yves Bailly wrote:
> >> Does anyone knows where I could find the source code of the "official"
> >> installer, or at least some information about what it does? Because the
> >> installer does relocate the binaries, that would be a good starting point
> >> to relocate my own binaries...
> >
> > It simply edits the qmake and QtCore DLL binaries, plus maybe some files
> > in
> > mkspecs, changing a placeholder prefix to the installation dir.
>
> Editing binaries? hu, havent't done that since... a long time ;-) Changing
> some internal strings I guess? any idea which one or how they can be
> spotted?

The strings in both QtCore and qmake come from src/corelib/global/qconfig.cpp,
which have a telling prefix. You should match them when followed by the prefix
you configured.

Those strings are always 256+12 bytes in length, which should work for *most*
(not all!) paths, and also allow you to install to a path longer than your
original prefix.

The mkspecs files are text, so just do a regular text replace.

There may be some other places where the prefix is hardcoded by the toolchain
itself and those usually do not reserve space. For example, on ELF systems,
there maybe DT_RPATH / DT_RUNPATH headers (you can use chrpath to change them,
or binary-edit directly). The path may also be present on the debug symbols
and, worse, it might be compressed.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to