Skip to content

Building QtQuickVcp

Michael Haberler edited this page Mar 15, 2014 · 2 revisions

Goal: rebuild Alex’s QtQuickVcp on Linux

Caveat: this requires a full build of linuxcnc as it stands in http://git.mah.priv.at/gitweb?p=emc2-dev.git;a=shortlog;h=refs/heads/rebase-ubc3 , meaning all prerequisite packages need to be installed first!

So the sequence is: - install all linuxcnc prerequisites - build linuxcnc - build nzmqt

Installing Qt5 on Linux

First, download the Qt 5.2.1 online installer from http://download.qt-project.org/official_releases/online_installers

you will need ca 1GB on the /tmp partition during download; I move all qt+android stuff to a separate partition (/qt in my case)

mah@wheezy:/qt/tmp$ wget http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x86-1.5.0-2-online.run

Aha, a binary, so make executable and start:

  mah@wheezy:/qt/tmp$ file qt-opensource-linux-x86-1.5.0-2-online.run
qt-opensource-linux-x86-1.5.0-2-online.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=d80f042dc74ddfdd7aff2824a84a7b3822778715, not stripped
mah@wheezy:/qt/tmp$ ls -l
-rw-r--r-- 1 mah mah  23748345 Feb 17 13:44 qt-opensource-linux-x86-1.5.0-2-online.run
mah@wheezy:/qt/tmp$ chmod +x qt-opensource-linux-x86-1.5.0-2-online.run
mah@wheezy:/qt/tmp$ ./qt-opensource-linux-x86-1.5.0-2-online.run

I just changed the install destination to /qt/Qt, left the rest as default. The online installer takes maybe 15mins. /qt/Qt is about 2.1GB post install.

The qtcreator lives in /qt/Qt/Tools/QtCreator/bin , so add this to your PATH in .bashrc .

PATH=$PATH:/qt/Qt/Tools/QtCreator/bin

=

(guided by Alex; goal is to rebuild his app https://github.com/strahlex/QtQuickVcp

Installing the Android development environment

this is what I got:

mah@wheezy:/qt/tmp$ ls -l
-rw-r--r-- 1 mah mah 496876498 Mar 14 14:59 adt-bundle-linux-x86-20131030.zip
-rw-r--r-- 1 mah mah 405218267 Mar 14 14:09 android-ndk-r9d-linux-x86.tar.bz2
-rw-r--r-- 1 mah mah   4320310 Mar 14 13:56 apache-ant-1.9.3-bin.tar.bz2
-rw-r--r-- 1 mah mah 293457920 Mar 14 14:08 jdk-7u51-linux-i586

extract them all, I have them like so:

mah@wheezy:/qt$ ls -l
drwxr-x---  4 mah  mah   4096 Oct 30 14:22 adt-bundle-linux-x86-20131030
drwxr-xr-x 10 mah  mah   4096 Mar  1 01:40 android-ndk-r9d
drwxr-xr-x  6 mah  mah   4096 Dec 23 15:52 apache-ant-1.9.3
drwxr-xr-x  8 mah  mah   4096 Dec 19 04:25 jdk1.7.0_51
drwx------  2 root root 16384 Mar 14 13:36 lost+found
drwxr-xr-x  5 mah  mah   4096 Mar 14 14:51 Qt
drwxr-xr-x  2 mah  mah   4096 Mar 14 18:36 tmp

Now install the proper Android SDK version for your tablet/phone, everything above 4.0 should work

My Nexus is Android 4.2.2 so

mah@wheezy:/qt/adt-bundle-linux-x86-20131030/sdk/tools$ ./android

Clone this wiki locally