-
 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

Michael Zanetti: On manually creating click packages


Published Sep 9 2013 via RSS

After my last post, praising how easy it is to manually create click packages even if QtCreator doesn’t support that for compiled apps yet, I got requests from various people asking me to share the knowledge. So here is how I did it:

* Build your application for the arm architecture. You can either use a pbuilder environment to create a armhf.deb package and extract it again afterwards or just compile your stuff on the phone (or in an arm chroot). I won’t go into much details on this as I assume everyone writing a C++ app knows how to compile it. Compiling it directly on the phone might be the easiest way to get some binaries for now. Just copy the whole source tree to the phone and just use qmake/cmake and make as used from the desktop.

* Create a new directory and copy all the reqired binaries into that. Also copy QML files, .desktop file and application icon into that directory. In the end, everything required by your application should be in there. Don’t put any stuff in there that shouldn’t end up in the package (e.g. .cpp files, .moc files etc)

* Test running your application from within this directory. Your application should be able to start up from there, not requiring anything to be installed to /usr or similar. In case your C++ code loads QML files, it needs to find them relative to the binary’s location.

* Make sure the .desktop file’s Exec entry starts up the application from the local directory, e.g. calling it as “./myapp” instead of just “myapp”. Also make sure the icon filename is relative to the location of the .desktop file.

* now create a manifest.json. Here’s an example (from uFit) of what it should look like:

{
"description": "Ubuntu FitBit app",
"framework": "ubuntu-sdk-13.10",
"hooks": {
"ubuntu-fitbit-app": {
"apparmor": "ubuntu-fitbit-app.json",
"desktop": "ubuntu-fitbit-app.desktop"
}
},
"maintainer": "Michael Zanetti ",
"name": "com.ubuntu.developer.mzanetti.ubuntu-fitbit-app",
"title": "uFit",
"version": "0.1"
}

* Create <appname>.json file. This one is responsible to request permissions for certain capabilities at AppArmor. This step is the equivalent to the one described here: http://developer.ubuntu.com/publish/packaging-click-apps/
Here’s the example of uFit:
{
"policy_groups": [
"networking"
],
"policy_version": 1
}

Add any additionally required policy_groups as a comma separated list. Check out the above link for a list of possible values.

* We’re almost done. It’s time to create the package:
# click build <directory>

This should produce the click package ready to be uploaded in the current directory. But wait, you probably want to test it on your phone before actually uploading it, right? So here’s how you do that:

# sudo click install com.ubuntu.developer.<yourID>_<packagename>_<version>.click
# sudo click register --user=phablet com.ubuntu.developer.<yourID>_<packagename> <version>

Now you should be able to find the app by searching the Application lens and you should be able to run it from there. If it doesn’t start, get to a commandline and do this:

# tail -f /home/phablet/.cache/upstart/unity8.log

Watch the output that happens when you try launching the app. It should tell you what’s wrong with it.

Hope this helps!

UPDATE
Very useful tip from Colin in the comments:
You can install and register in one step by passing –user=phablet to click install, but it’s better to just use “pkcon install-local foo.click”.

flattr this!



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.