App installer design: click packages

The Spencers spencers1993 at
Wed May 15 12:38:53 UTC 2013


You asked for pointers, so here is my idea for the Click Package 
definition file. I think since originally Click Packages will be 
targeting the Ubuntu SDK, and thus apps will be using a lot of QML, the 
Click Package definition file should use a format similar to QML, but 
not necessarily actually QML and the Qt classes to use the file in 
C++/whatever, since it would not be used for graphics. I certainly 
would find this much simpler then XML and more powerful than a 
key/value table, like the .desktop file format. To define an 
application, one might use something like this:

import ClickPackaging 1.0

Application {
        id: app
        name: "Hello World!"
        pkg: "org.example.helloworld"

        frameworks: [
                "Ubuntu >= 1.0"

To make things simpler and have a uniform file format, you could even 
add in support for generating desktop files, DBus services, push 
notifications, etc:

// Import the DesktopLauncher service definition, which will handle 
generating the launcher
import DesktopLauncher 1.0

// Inside the Application object
DesktopLauncher {
        exec: app.exec // app.exec could be generated by the 
Application def object to point to the app's executable, where ever it 
        icon: "<icon>"

If the application definition got too big, or one had a big service 
definition, here are two ideas for how to load it from a seperate file:

Application {
        services: [ "desktoplauncher.qml", ... ] 
        // OR
        Service { file: "desktoplauncher.qml" }

When the packaging system builds the package, it would have each object 
then build its part of the package, so then the DesktopLauncher would 
generate the *.desktop information out of the object's properties.

In a more recent message, somebody mentioned being able to install 
things like push notification definitions even when the push 
notifications service is itself installed. Using my file format 
suggestion, the only requirement would be that the push notifications 
service definition (or any required service's definition) would need to 
be installed to build the push definition for the package.

Other than this, Click Packages sounds awesome for developers and I'm 
looking forward to packaging apps using it.

Michael Spencer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-devel mailing list