Qt5 (How to install an addon/ module like Qt Location for instance)
-
Hello dear all!
I installed QtSDk 5.0.1 under Ubuntu this evening and the maintanance tool provides "Remove all components" only.
I would like to add the add-on/ module Qt Location to my Qt5 installation.
Tried to build/ install it from source (cloned from git://gitorious.org/qt/qtlocation.git). qtlocation seems to depend on qt-quick3d.
How do I have to proceed to build and install all (incl. docs, imports etc.) into the tree under $QTDIR?Tried:
git clone git://gitorious.org/qt/qtlocation.git
cd qtlocation
sudowhich qmake
sudo make sub-src-qmake_all
sudo make installBut I had no success.
Hope to find some help here!
Best regards from Hamburg
joomie -
Note that the latest Qt 3D and Qt Location may not build against Qt 5.0.x. You may need to use Qt 5.1.x
Clone and build Qt 3D
git clone git://gitorious.org/qt/qt3d.git
cd qt3d
qmake # from qt5
make
make docs
sudo make installClone and build Qt Location
git clone git://gitorious.org/qt/qtlocation.git
cd qtlocation
qmake # from qt5
make
make docs
sudo make install -
Wow, what a quick reply!
I'm going to re-try the build of the latest Qt5 sources tomorrow.
Is it possible to implement/ consider any of the accepted additional modules
during the build process of qt itself?Like:
git clone git://gitorious.org/qt/qt5.git
(cd qt5/.../ here?)
git clone git://gitorious.org/qt/qt3d.git
git clone git://gitorious.org/qt/qtlocation.gitAnd then
cd qt5
./configure (...) # consider additional modules here??
make -j X
make install -
Yes that is possible. Add the clones as you did above then you need to add those modules to the qt.pro file.
-
Hi amccarthy
bq. you need to add those modules to the qt.pro file.
How do I do that?
I tried it by adding
@
addModule(qt3d, qtbase)
addModule(qt-quick3d, qtbase, qt3d, qtdeclarative)
addModule(qtlocation, qtbase, qt3d, qt-quick3d, qtdeclarative)
@to qt.pro
I ran
@
qtbase/bin/qmake -recursive;
make -j 5 all;
@
then.Another question:
I added
@
[submodule "qt3d"]
path = qt3d
url = git://gitorious.org/qt/qt3d.git
[submodule "qt-quick3d"]
path = qt-quick3d
url = git://gitorious.org/qt-quick3d/qt-quick3d.git
[submodule "qtlocation"]
path = qtlocation
url = git://gitorious.org/qt/qtlocation.git
@to the file .gitmodules and ran
@
perl init-repository
@But it had no effect!?
I needed to clone the additional modules manually like described above. Any ideas?
Best regards
joomie -
init-repository wont reinitialise the repo. IIRC it checks if qtbase has been cloned and aborts. Unless you pass the -f flag. I suggest
@init-repository --no-update -f@
which will clone new submodules and not touch existing submodules. Or just clone manually.
The qt-quick3d module is not required. It was the old name for qt3d.
Your addModule syntax is wrong. The dependency arguments are a space separated list. You want something like:
@addModule(qtlocation, qtbase, qtdeclarative qt3d)@
-
Hi!
Thanks for your advice!
Going to try that these days.
I think there is a cookbook for the whole procedure of
building and installing Qt (incl. an example use of add-on module(s), build/ install docs, build/ install qtcreator) needed.I have not enough knowledge, to write something like that.
But a description for a setup of a complete (e.g. example, on implementing an add-on) and up-to-date Qt development environment would help other too.
The description under "Building Qt 5 from Git":http://qt-project.org/wiki/Building_Qt_5_from_Git is not really complete but could be a good starting point, as different platforms are considered.
My bash snippets to perform all steps are a result of try/ error/ re-try success.
-
What commit id was used to compile QtLocation and which exact Qt vesion was used ? I don't get it compiled with Qt 5.1.1 ???
-
Hi!
I successfully compiled Qt 5.0.1 (including QtLocation) on 64-bit Ubuntu Linux machine
and wrote a small recipe of all steps.
Contact via skype, if you want to get this small documentation:
Skype-Username: j.raichouniRegards
joomie -
Hi Joomie,
thanks for the reply, i'm interested in your procedure. Could you send me the file please, Skype-user : valckewim
I could already compile QtLocation for Qt 5.2.0 beta, but there are still issues with this Qt so i wanna try Qt 5.0.1 together with your instructions.
Best regards,
Wim.