[UNSOLVED] How to Move a Qt5 Compile?
-
Hi
I have a Qt5 compiled with MinGW on my home PC. How do I move it to another machine? (My laptop and university computers)
Tried copying, though when introducing the qmake.exe to Qt Creator on target machine, it says Qt version is not properly installed. Please run make install.Update: I already override qt.conf.
-
Have you compiled with "-prefix $PWD/qtbase" or "-developer-build" flags passed to configure script?
-
You can try use some utility for patching some Qt binaries (qmake.exe, qdoc.exe, qtcode.dll and maybe something else) and text files (if needed), e.g. :
"QtPatcher":http://stackoverflow.com/questions/2905868/change-qt-install-path-after-building
"Qt Path Corrector":https://gitorious.org/qt-path-corrector
Or take sources from official "Qt Installer Framework":http://qt.gitorious.org/qt-labs/installer-framework/trees/master/src/libs/installer
-
[quote author="sierdzio" date="1357984459"]Have you compiled with "-prefix $PWD/qtbase" or "-developer-build" flags passed to configure script?[/quote]
No. I just do a "-prefix=/path/to/another/partition" with no -developer-build. I realized that headers are not present in include directory. Do I need a reconfigure+recompile? It takes about 20 hours on my PC :(
[quote author="kuzulis" date="1357986300"]@soroush,
You can try use some utility for patching Qt binary and text files, e.g. :
"QtPatcher":http://stackoverflow.com/questions/2905868/change-qt-install-path-after-building
"Qt Path Corrector":https://gitorious.org/qt-path-corrector
Or take sources from official "Qt Installer Framework":http://qt.gitorious.org/qt-labs/installer-framework/trees/master/src/libs/installer
[/quote]
I have no idea what Intstaller Framework is. Let me try and post resluts.
Thanks
-
Try use "Qt Path Corrector" - it is simple console application (I'm is author) to patching binaries.
I successfully use it to patch binaries on Windows for Qt5-betaX.
-
-
Ok, I tried QtPatcher. It speaks French [?]. I can't see what the error message is about:
!http://s3.picofile.com/file/7617658488/error_patcher.png(error)!
[quote author="kuzulis" date="1357988093"]Try use "Qt Path Corrector" - it is simple console application (I'm is author) to patching binaries.
I successfully use it to patch binaries on Windows for Qt5-betaX.[/quote]
I have no success yet:
@
C:\Program Files\EBO-Qt SDK>E:\qtpathcorrector.exe patch -n "C:\Program Files\EB
O-Qt SDK" -f C"\Program Files\EBO-Qt SDK\bin"Initialized scanning operation...
Starting performing operation for file:
'C\Program Files\EBO-Qt SDK\bin"'
Error: Unable to open.
@ -
You missed file name for patching, instead of:
bq. -f C"\Program Files\EBO-Qt SDK\bin"
need:
bq. -f C"\Program Files\EBO-Qt SDK\bin\qmake.exe"
Also, you missed ':' symbol :)
PS: First, you must make sure that target file for patching have signatures. For this need run with "scan" command.
-
@
Initialized scanning operation...
Starting performing operation for file:
'C:\Program Files\EBO-Qt SDK\bin\qmake.exe'Found the 11 signatures matching of current paths:
qt_binspath=E:/qt_5.0.0-x64/bin
qt_datapath=E:/qt_5.0.0-x64
qt_docspath=E:/qt_5.0.0-x64/doc
qt_hdrspath=E:/qt_5.0.0-x64/include
qt_impspath=E:/qt_5.0.0-x64/imports
qt_libspath=E:/qt_5.0.0-x64/lib
qt_plugpath=E:/qt_5.0.0-x64/plugins
qt_prfxpath=E:/qt_5.0.0-x64
qt_trnspath=E:/qt_5.0.0-x64/translations
qt_tstspath=E:/qt_5.0.0-x64/tests
qt_xmplpath=E:/qt_5.0.0-x64/examplesInitialized patching operation...
New patching signatures is:
qt_binspath=C:\Program Files\EBO-Qt SDK\bin
qt_datapath=C:\Program Files\EBO-Qt SDK
qt_docspath=C:\Program Files\EBO-Qt SDK\doc
qt_hdrspath=C:\Program Files\EBO-Qt SDK\include
qt_impspath=C:\Program Files\EBO-Qt SDK\imports
qt_libspath=C:\Program Files\EBO-Qt SDK\lib
qt_plugpath=C:\Program Files\EBO-Qt SDK\plugins
qt_prfxpath=C:\Program Files\EBO-Qt SDK
qt_trnspath=C:\Program Files\EBO-Qt SDK\translations
qt_tstspath=C:\Program Files\EBO-Qt SDK\tests
qt_xmplpath=C:\Program Files\EBO-Qt SDK\examples
@Though qmake still can't make Makefiles:
@
Could not find qmake configuration file win32-g++.
Error processing project file: C:\Users\Soroush\Workspace\test\test.pro
16:14:30: The process "C:\Program Files\EBO-Qt SDK\bin\qmake.exe" exited with code 3.
Error while building/deploying project test (kit: Desktop)
When executing step 'qmake'
@ -
Any idea?
Well, I'm trying a new compile with “-developer-build” flag set on. Unfortunately seems not possible to turn off examples in developer mode :/ It will take a lot of time to finish...
-
OK this is an overall summary of the error:
Configure Qt 5.0.0 on PC with no -developer-build flag, and with a -prefix flag set to some other location (say A).
Compile Qt (mingw32-make)
Wait about 20 hrs !
Install what compiled: mingw32-make install
Wait again! This time 2 hrs
Compress contents of folder A to a 7z archive and move it to another machine
Extract the archive, make a qt.conf in A/bin with this contents:
@
[Paths]
Prefix=..
@Check output of "qmake -query". All good
Try to run qmake on some directory having a newly created Qt project:
@
Project ERROR: Unknown module(s) in QT: widgets gui core
@Notes:
There are some absolute paths in .prl files. Do I need to correct them? They're pointing to somewhere in source code (qtbase/src) which is not present in installation directory. For example "QMAKE_PRL_BUILD_DIR = E:/x64/qt-5.0.0-mingw-webkit-x64/qtdeclarative/src/qml/"
I really can't see WHY paths are hard-coded into binaries. It looks like a very bad idea to me. Why it's not just like "simply reading everything from a config file"?
-
Do not run "make install" when you use a prefix in your build! Configure is warning against it after it finishes.
-
[quote author="sierdzio" date="1358024506"]Do not run "make install" when you use a prefix in your build! Configure is warning against it after it finishes.[/quote]
Now I'm more confused! I remember that configure just says something like: "All ready, now run mingw32-make"
Should I move ALL SOURCE CODE OF QT + TEMPORARY OBJECTS ? About 5 GB s of data?
-
Hm, maybe that is because I'm always doing a local prefix (just as -developer-build does, it prefixes to $PWD), so it's only my case that does not require installing. I am not absolutely sure and I don't want to force you to spend another 20 hours for compilation (is getting a machine with 4 cores out of the question, by the way? It shortens the compilation down to about 30 minutes).
From configure's help:
[quote]-prefix <dir> ...... This will install everything relative to <dir>[/quote]Once configure step finishes, this is the code that displays the final message:
@
echo Qt is now configured for building. Just run '$MAKE'.
if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
echo Once everything is built, Qt is installed.
echo You should not run '$MAKE install'.
else
echo Once everything is built, you must run '$MAKE install'.
echo Qt will be installed into $QT_INSTALL_PREFIX
fi
@Well, you have to decide what to do. As I've said, I don't want to force you down a wrong path.
-
Qt needs a better build system. With all my respect to developer team, I should say that I think they made a mess about deployment/configuration and build system. There should be some clean configure/build system just like Kernel's one :{
I spent two days struggling for such a simple task! This is not desired at all. This SHOULD be changed in future releases I believe :|
-
There has been a lot of talk about this on development mailing list recently. I'm not sure anything as such will change, as the bottom line is: don't move installations about, and if you do, qt.conf should be enough. Clearly, it is not. And documentation also seems to be lacking.
This is not, however, a problem that affects users of applications developed with Qt. It's only hard for us developers, especially when one is not experienced in these matters. So there is not much pressure in that direction. Developers are expected to install precompiled packs, or compile locally on every platform, without moving stuff about.
-
Ahh... The 20 hrs is not a problem for me. Though I have more restrictions, I have 4 GB free space on my only Windows partition of laptop. Considering all the Ruby+Perl+Source+Compiled Objects. certainly can't compile Qt5 on laptop. It's too bad...
I talked some people around about the issue. They all have similar problems with moving Qt. General idea is not to move Qt at all. Some others prefer to follow some conventions like "Qt should always live at C:/Qt_x.y.z/" , "MinGW should always be at C:/mingw/" to make it possible to move Qt away
Somebody should start a new playground to port configuration and build stuff to something new.
Marking thread as UNSOLVED anyway...
-
Just use the mingw build from here : http://qt-project.org/forums/viewthread/23002/
It works out of the box, plus you don't need visual studio, no perl, no python, which will be good since you are on tight space constrains. It seems it is not perfect, but perfectly usable, you can still compile the projects on another machine with another Qt build and compiler before you distribute.
-
[quote author="utcenter" date="1358049568"]Just use the mingw build from here : http://qt-project.org/forums/viewthread/23002/
It works out of the box, plus you don't need visual studio, no perl, no python, which will be good since you are on tight space constrains. It seems it is not perfect, but perfectly usable, you can still compile the projects on another machine with another Qt build and compiler before you distribute.[/quote]
Thanks for the link, though I need my own compile. Because it has DBus and it's optimized. It's already compiled with MinGW-builds package.