Extended instruction founded on previous answer.
Keep in mind: this instruction describes Qt/Qml developing on PC for Ubuntu Touch without ssh connection with device and require cross-compile tool like linaro.
PART 1: making environment
- Get Ubuntu SDK
- Get toolchain: Linaro or wia sudo apt-get install gcc-arm-linux-gnueabihf install toolchain and it's dependencies.
- Get this two libs libhybris and platform-api plus Qt5 libs for armhf (can be obtained from device) or just download tarball with all libs (from tarball your need libs and headers, put them at /usr/arm-gnueabihf/lib and /usr/arm-gnueabihf/include).
- Get modified qmake config - unrar it in mkspecs (for example, mine at /usr/share/qt5/mkspecs/). Inside unrared directory - qmake.conf. If something missed on compiling - it's need to alter path variable in that file.
- For Qt Creator make new compiling profile: in Compiling and deployment settings, on tab Compiler - add new compiler (arm-linux-gnueabihf-gcc), on tab Tools - add new profile and specify Device type - General linux-device, Compiler - ones, that you are added Profile Qt - generic (I'm using not recompiled Qt!!!), Qt mkspec - linux-arm-gnueabihf-gcc. It's all you need for compiling. For debugging - it's need to be specify other params. And beside it, that's better recompile Qt from sources. But I'm lazy so)
PART 2: deploying app
- Wia adb push /data/ubuntu/<some_path> push app and resources. OS can find them at /<some_path>. Note, there are no /data/ubuntu part. That part is needed only by adb.
- Next, need to make <app_name>.desktop file:
- adb root
- adb shell
- ubuntu_chroot shell - switch to bash on device
- cd /usr/share/applications - go in folder with *.desktop files
- Copy any of them and edit (with vi) for your app purpose (name, icon, path, e.t.c.)
- Next step, same as previous (you already in bash at device):
edit file (with vi) /usr/share/qml-phone-shell/Applications/applications.js, add part for your app in file, same as other apps have in that file. It must be same as in <app_name>.desktop file
- Reboot shell (by killing qml-phone-shell process) or reboot phone (reboot -p)
- Now you can launch your app from Apps page!
Test example and original materials:
EN instruction and RU instruction with links for downloads toolchain and essential libs.