-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login

-
- News . 
0
votes
click to vote up

Victor Tuson Palau: Ubuntu Touch: Building and testing a QML extension


Published Dec 16 2013 via RSS

Hi,

I found myself trying to build a QML Ubuntu Touch app project that includes a qml c++ extension and I found that I some how stumble a bit along the way. So, here are some of my notes on how I got it done. Hope that helps.

Creating the project.

Using QtCreator, create a new project and select – QML Extension Library + Tabbed Touch.  I found that it was easier to change the QML side of things than start with an extension and then add the whole project structure.

Build and Run your project locally

In QtCreator click on projects.  In Build, I set up the build path as my project root path. In run,  the executable is “/usr/bin/qmlscene” (make sure there is no spaces trailing) and then Arguments is set to “-I  ./backend/modules”

Now if you try to run your project it should build it locally and then bring up a file picker to choose what qml file to run. After that you are on a roll.

Build on target device

Click Ctrl+f11 should install the platform developer tools in your device. However, I how found that this lately does not work.

Instead from the terminal:

first we will need to make the image in your device writeable:
adb shell touch /userdata/.writable_image  --> and reboot the phone.
then:
cd /usr/share/qtcreator/ubuntu/scripts
adb devices
./device_developertools_install <device_id>

Now you are ready to build, so back to QtCreator:

Build>Ubuntu>Build Application on Device

This should build the application with only some test problems, but the main binaries would be created. To package your app you will need to get

/home/phablet/dev_tmp/<yourapp>/backend/modules/lib<yourlib>.so

Creating a click package

create a manifest standard manifest file. Manifest.json

{
"description": "your text",
"framework": "ubuntu-sdk-13.10",
"hooks": {
"yourappname": {
"apparmor": "yourappname.json",
"desktop": "yourappname.desktop"
}
},
"maintainer": "your name<yourname@yourmail.com>",
"name": "com.ubuntu.developer.yourname.yourappname",
"title": "yourappname",
"version": "0.1",
"architecture": "armhf"
}

You will also need a yourapp.desktop file:

[Desktop Entry]
Name=yourappname
Comment=description
Exec=qmlscene -I plugin $@ yourapp.qml
Icon=icon.png
Terminal=false
Type=Application
X-Ubuntu-Touch=true

Note that Exec= has a -I plugin part to it. This is very important, will see later.

Now yourapp.json file that contains your confinement profile:

{
"policy_groups": [
"networking"
],
"policy_version": 1
}

Now time to setup a folder with all this stuff, not that the plugin folder is going to contain your lib which your are importing with -I option on the desktop file:
myproject>
-./click/
--icon.png
--manifest.json
--yourapp.json
--yourapp.desktop
--./plugin/
---./yourlib/
----lib(yourlibname).so
----qmldir

Now you are ready to build from your project root folder:
click build ./click

This should create a .click file in your project folder.

Installing in your device

adb pull your.click /home/phablet/
adb shell
su phablet
cd ~
pkcon -p install-local your.click

This should be enough, but sometimes I find that you need to restart unity:
pkill unity8 (you might need sudo)




BackRead original postSend to a friend

Add comment

Add comment
Show all posts




-
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About GTK-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2007-2014 GTK-Apps.org Team  
All rights reserved. GTK-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.