Building-Qt5-for-BlackBerry: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Reject nomination for deletion. Redirection is to prevent link rot by external sources linking to the old Wiki.)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=Building Qt5 for BlackBerry=
#REDIRECT [[Building Qt 5 for BlackBerry]]
 
This page provides instructions on how to build Qt5 for BlackBerry 10 and the Playbook OS. Please note that the work is currently focused on Qt5 for BlackBerry 10. Qt5 might not build or not run well on the PlayBook OS, whereas Qt v5.1.1 is known to build and work with some potential issues when executing an application on Playbook.
 
==Setting up the environment==
 
See [[Setup-for-BlackBerry10-development|Setup for BlackBerry10 development]] for the introduction and further instructions.
 
==Getting the source==
 
We do an in-source build of the Qt5 repositories that are needed and install them into dedicated build directory. <code>$HOME/development/qnx/qt5<code> is used in the examples below. Please also note that we clone and build git submodules separately. This procedure is different to the builds for desktop platforms and allows to include only those submodules which are relevant without managing a master repository. Please adjust the paths to suit your setup as needed.</code></code>
 
First create a directory to hold the source code:
 
The following repositories are used in regular builds for BlackBerry 10 in [http://qtlab.blackberry.com BlackBerry’s public CI] ''[qtlab.blackberry.com]'' as of Qt 5.2 :
 
# qtbase
# qtdeclarative
# qtmultimedia
# qtgraphicaleffects
# qtconnectivity
# qtxmlpatterns
# qtsensors
# qtquickcontrols
 
This matches all essential modules, plus several add-on modules. QtWebKit is currently not a part of the regular builds. Still, it is possible to build it, see [[Building-QtWebKit-for-Blackberry|Building QtWebKit for Blackberry]]
 
Other repositories known to build:
 
# qtjsbackend (not relevant anymore for Qt 5.2 and later)
# qt3d (optional, provides 3D scenes using <span class="caps">QML</span>)
# qtscript (optional, only needed when using the qtquick1 submodule)
# qtlocation
 
Then clone:<br />
 
==Using the master repository==
 
The presented approach handles repositories from related Qt5 modules separately. If you prefer, you can also adapt the standard procedure based on a build from the master repository. You just need to make sure that your master repository has been initialized for those repositories which are actually supported on BlackBerry 10. The following can be used to initialize the master repository for the Qt modules out lined above:
 
==Building==
 
The process of building Qt5 for BlackBerry devices is very similar to building it for any other platform so it is worth having a quick read through the [[Building Qt 5 from Git|generic instructions for building Qt5]] before proceeding.
 
Be sure that you have configured your environment to use the BlackBerry 10 <span class="caps">NDK</span> as described in [[BlackBerry]]. This especially concerns setting the right values in $PATH to pickup tools and the cross-compile tool-chain provided in the <span class="caps">NDK</span>.
 
====Note====
 
When building Qt5 with the latest public <span class="caps">NDK</span> some features might be disabled (Input Method Framework, <span class="caps">LGMON</span>, <span class="caps">NFC</span> Share). This is due to missing header files which have not been published yet.
 
===The “configure” step===
 
First we need to configure Qt.
 
====Linux/OS X====
 
When compiling for the PlayBook, use the following command:
 
And afterwards we simply build it by calling <code>make<code> and <code>make install<code>:</code></code></code></code>
 
where &lt;N&gt; is the number of parallel make jobs to run. Usually, this is set to &lt;No. of <span class="caps">CPU</span> cores + 1&gt;.
 
===Windows===
 
For the PlayBook:
 
And afterwards we simply build it by calling mingw32-make and mingw32-make install.
 
If you want to work with the <span class="caps">HTTPS</span> protocol, add '''-openssl''' option. ''need to check if the same is required on Linux''
 
===Mac OS X===
 
===The actual “build” step===
 
After above steps have been completed you should have QtBase installed in the prefix directory (i.e. in $HOME/development/qnx/qt5 or in C:\dev\qt5install, depending on your operating system).
 
In order to complete build, we go through all modules and build them as “regular” Qt projects, but use use the <code>qmake<code> '''from our new Qt5 installation''' (i.e. from the prefix directory). A few modules have dependencies to each other. Make sure you build modules in the order as listed above.</code></code>
 
===Extend the path===
 
On Linux or OS X
 
On Windows&gt;
 
===Build and install additional git submodules===
 
On Linux or OS X:
 
On Windows:
 
==How to use this build==
 
You next reading should be [[Custom Qt on BlackBerry devices|Using custom Qt builds on BlackBerry 10 devices]]. It will explain how configure Qt Creator with the new build and how to use it in application development.
 
If you are interested about the similar steps related to Qt4, you should read [[Building-Qt4-for-Blackberry|Building Qt4 for Blackberry]]. Optionally you can also build QtWebKit, see [[Building-QtWebKit-for-Blackberry|Building QtWebKit for Blackberry]]. Please keep in mind that this is not supported by BlackBerry.
 
===Categories:===
 
* [[:Category:BlackBerry|BlackBerry]]
* [[:Category:Developing with Qt|Developing_with_Qt]]
** [[:Category:Developing with Qt::Qt-5|Qt 5]]
* [[:Category:HowTo|HowTo]]

Latest revision as of 12:29, 25 August 2015