Build-Qt-5-for-Tizen-Emulator: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=[[Tizen|Qt for Tizen]]: Build=


Authors: [http://qt.io/member/6526 Jaroslaw Staniek] ''[qt.io]'' (staniek at kde.org), [http://qt.io/mebmer/125046 Tomasz Olszak] ''[qt.io]'' . Feedback welcome!
==Introduction==
This <span class="caps">HOWTO</span> explains full process of installation and configuration Qt <span class="caps">SDK</span> for Tizen, needed for developing software with Qt for Tizen smartphone (developer device [https://wiki.tizen.org/wiki/Reference_Device-PQ RD-PQ] ''[wiki.tizen.org]'' and emulator), Tizen [http://www.intel.com/content/www/us/en/nuc/overview.html <span class="caps">NUC</span>] ''[intel.com]'' which is reference device for Tizen Common profile and Tizen <span class="caps">IVI</span> devices. This process applies to Qt for Tizen Alpha 7 and has been tested with Ubuntu 14.04 64bit. Other versions have not been tested (feedback is welcome). Version of Tizen <span class="caps">SDK</span> is 2.2.1. Version of Qt
While the process has been highly automatized, it consists of several steps.
==Tizen Common profile (base of <span class="caps">IVI</span> profle)==
Following steps describe creating Tizen Common cross compilation tools. But you can also use the same steps for <span class="caps">IVI</span> (just change profile parameter passed to prepare_developer_tools script)
# Install [[Build-Qt-for-Tizen/#e5129e03d708d7fbbe5e3e22b30f2d9a|tizen development tools]] ''[qt.io]''
# Download and install Qt 5.4.0, see instructions in [[Build-Qt-for-Tizen#e17f66a5cb160b4eb49231b706a325e1|Qt installation]] ''[qt.io]''
# Download appropriate cross compilers:
## Arm and i586 cross compilers are available from Tizen Mobile <span class="caps">SDK</span> (see [[Build-Qt-for-Tizen/#03671ee18b8489596b11f5b70d6ff721|Install Tizen <span class="caps">SDK</span>]] ''[qt.io]'')
## For x86_64 architecture you can use system compiler
# Create developer tools
## for arm wayland<br />
## for x86 wayland<br />
## for x86_64 wayland<br />
# Configure Qt Creator remote access to [http://www.intel.com/content/www/us/en/nuc/overview.html Intel <span class="caps">NUC</span>] ''[intel.com]''
==Tizen Mobile profile==
# Install [[Build-Qt-for-Tizen/#e5129e03d708d7fbbe5e3e22b30f2d9a|development tools]] ''[qt.io]''
# Download and install Qt 5.4.0, see instructions in [[Build-Qt-for-Tizen/#e17f66a5cb160b4eb49231b706a325e1|Qt installation]] ''[qt.io]''
# Download [[Build-Qt-for-Tizen/#03671ee18b8489596b11f5b70d6ff721|Tizen Mobile <span class="caps">SDK</span>]] ''[qt.io]''
# Create developer tools
## For arm mobile device ( [https://wiki.tizen.org/wiki/Reference_Device-PQ RD-PQ] ''[wiki.tizen.org]'')<br />
## for x86 mobile emulator (see -e switch)<br />
# Build [[Build-Qt-for-Tizen/#00b2d759558c279641a474b3190dc4c3|Qt Creator plugin]] ''[qt.io]''
# [[Build-Qt-for-Tizen/#dfa8292bf407276a9cc00706b52b7a8e|Configure Qt Creator]] ''[qt.io]''
# Please follow the steps described at [[Creating-Hello-World-Application|Creating Hello World Application]] to validate configuration
==Qt installation==
Download official Qt installer suitable for your architecture. 5.4.0 version is placed in following remote directory:<br />http://download.qt.io/official_releases/qt/5.4/5.4.0<br /> Make the binary executable (chmod u+x qt-opensource-linux-[x86|x64]-5.4.0.run), and install it in location writable by current user (write access is needed for tizen Qt Creator plugin)
==Tizen Development Tools installation==
===Bash installation===
Be sure that you have bash as your shell. By default Ubuntu has dash. To change the shell to bash invoke:<br />
===Gbs installation===
Use command line for most of steps explained here. Install development tools (such as gbs) as specified at https://source.tizen.org/documentation/developer-guide/installing-development-tools ''[source.tizen.org]''. Please note version of the distribution should be correctly specified when adding repository, so for Ubuntu 13.04:
In /etc/apt/sources.list.d/tizen.list add the folowing line to add repository (please note space before “/”):
All most recent Ubuntu and debian) versions are supported. See http://download.tizen.org/tools/latest-release
Then:<br />
and:
this will show:<br />
Answer “y” here.
This can show:
Answer “y” here again.
===tizenbuildtools installation===
Clone the tizenbuildtools git repository:
==Tizen <span class="caps">SDK</span> installation==
Even while Qt developers prefer using Qt Creator (or their beloved text editor plus command line) over Tizen <span class="caps">SDK</span>’s Eclipse-based Integrated development environment, at least two tools are still needed:
* '''Tizen emulator''' for running Qt applications in emulated environment on the PC workstation without a need to use Tizen device(s)
* '''Compilation tools''' for building software (Qt and applications) for both emulator and actual Tizen device(s).
These tools are bundled and distributed in a single Tizen <span class="caps">SDK</span> so it should be installed first. To do so, perform following steps:
* Take look at [https://developer.tizen.org/downloads/sdk/installing-sdk/prerequisites-tizen-sdk prerequisites] ''[developer.tizen.org]''. Install required software for your OS.
* Download [https://developer.tizen.org/downloads/tizen-sdk#sdk-images <span class="caps">SDK</span> Image] ''[developer.tizen.org]'' for Ubuntu® 64bits: tizen-sdk-image-2.2.x-ubuntu64.zip, about 1.4GB. It’s useful for a kind of “offline installation”, which is recommended.
* Download [https://developer.tizen.org/downloads/tizen-sdk#installmanager Install Manager] ''[developer.tizen.org]'' for Ubuntu® 64bits: tizen-sdk-ubuntu64-v2.2.x.bin, about 4MB.
* Use the Install Manager as explained [https://developer.tizen.org/downloads/sdk/installing-tizen-sdk#sdk here] ''[developer.tizen.org]'' to install previously downloaded “<span class="caps">SDK</span> Image”.
About 5 GB of free disk space is needed for these steps.
'''Result:''' You should be able to:
* run the installed Tizen <span class="caps">IDE</span> by clicking “Applications &gt; Tizen <span class="caps">SDK</span> &gt; Tizen <span class="caps">IDE</span>” in the system menu
* run the installed Emulator Manager by clicking “Applications &gt; Tizen <span class="caps">SDK</span> &gt; Emulator Manager” in the system menu and then, create Tizen virtual machine that would be used in the development process
If you want to develop for mobile profile (Tizen Mobile device or emulator) you need to '''add author certificate'''. The certificate generator tool is a cross-platform command line tool used to generate developer private keys and certificates from their intermediate CA certificates. The private keys and certificates are used for signing and verifying Tizen applications. To create and register certificate in the Tizen <span class="caps">IDE</span> as explained [https://developer.tizen.org/help/index.jsp?topic=/org.tizen.gettingstarted/html/dev_env/setting_author_certificate.htm here] ''[developer.tizen.org]''.
==Build Tizen plugin for Qt Creator==
After installing [[Build-Qt-for-Tizen/edit/#e17f66a5cb160b4eb49231b706a325e1|Qt <span class="caps">SDK</span>]] ''[qt.io]'' (by default to $HOME/Qt5.4.0 directory), follow the <span class="caps">README</span> file placed in tizenbuildtools/README. After that start Qt Creator. The Tizen plugin should be available.
==Configure Qt Creator==
===Tizen Common and <span class="caps">IVI</span>===
Follow this steps to build,. deploy, debug and run Qt applications on Tizen Common or Tizen <span class="caps">IVI</span> (or other Tizen profiles where ssh server is available on device)
=====Prepare device=====
By default “app” user (used for development) doesn’t have a password, so if you want to connect using ssh you need to set password:<br /> and (if you want to log in without password) copy you public key:<br /> Also you need to install Qt libraries on device:<br />
=====Connect device to Qt Creator=====
# Go to Tools-Options
# In Build&amp;Run section
## Add corresponding Qt version (like in mobile profile)
## Add New Kit
### Set previously added Qt Version
### As compiler set cross compilers from Tizen <span class="caps">SDK</span> or host compiler in case if device and host architectures are the same
### The same with debugger
### As device type set Generic Linux Device
### Click manage button in device section to add Generic Linux Device, next click add, choose Generic Linux Device. In dialog box set name of a device (like Tizen <span class="caps">NUC</span>), device’s IP, user name to log in using ssh and password or key authentication.<br />[[Image:uc|Qt Creator Generic Device configuration]]
### After adding the device Qt Creator will test if connection work.
# Create new test project:
## File-&gt;New File or Project-&gt;Qt Quick Application
## Choose name and directory, then Next, check The kit you created before and click Finish.
## Edit *.pro file and add <br /> before <br />
## It should be possible to build and run application on device from Qt Creator. If you have debugger set you should also be able to debug applications.
===Tizen Mobile===
All configuration steps listed below should be performed and in specified order.
* Tizen configuration:
** Run Emulator Manager by clicking “Applications &gt; Tizen <span class="caps">SDK</span> &gt; Emulator Manager” in the system menu and then use it to run the Emulator virtual machine you have created before. '''Note: Always run Emulator before running Qt Creator, not the other way around.'''
** Run the installed Qt Creator
** Click Tools -&gt; Options, and in the dialog select “Tizen” item
** Near “Tizen <span class="caps">SDK</span> Path” click Browse button
** Select Tizen <span class="caps">SDK</span>’s instalation directory (default is $HOME/tizen-sdk), click OK; this will automatically fill several entries: <span class="caps">SDK</span> data directory, sdb executable, native-packaging executable
** Near “Author certificate” click Browse button
** Select author certificate, by default a file in $HOME/tizen-sdk-data/keystore/author/
** Fill the “Author certificate password” field with password you have provided in the step “Configure Development Tools” before
* Tizen emulator-related configuration:
** In the Options dialog, select “Devices” item
** In the Device combo box select “tizen (default for Tizen Device)
** Change Name to Tizen Emulator to indicate the device
** In the Options dialog, select “Build &amp; Run” item
** Click “Qt Versions” tab
** Click “Add” button
** Select qmake for working for tizen emulator builds. The path should be $HOME/dev/src/tizenbuildtools/emulator/qt5CrossCompileToolsBUILD_ARCHEmulator/bin/qmake. Please change $HOME/dev/src to your top level source code directory if you have picked different one in the beginning.
** Click “Apply” button on the bottom of the dialog to accept addition of the new Qt version.
** Click “Kits” tab
** Click “Add” button to add a new kit. It will be used for building and deploying apps to Tizen emulator.
** By default the new kit has name “Unnamed”, change it in the “Name” text box to “Tizen Emulator”
** In “Device type” combo box select “Tizen Device”
** In “Compiler” combo box select “Tizen <span class="caps">GCC</span> (x86)”
** In “Qt Version” combo box select “Qt 5.4.0 (Tizen emulator)”
** Click “Apply” button on the bottom of the dialog to accept addition of the new kit.
===Categories:===
* [[:Category:Developing Qt|Developing_Qt]]
** [[:Category:Developing Qt::Ports|Ports]]
* [[:Category:Developing Qt::Ports::Tizen|Tizen]]

Revision as of 09:58, 24 February 2015