3 title: Overview of widgets
5 https://git.automotivelinux.org/src/app-framework-main/plain/docs/2.1-widgets.md?h=master
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/app-framework-main-developer-guides-api-services-book.yml -->
10 # Tools for managing widgets
12 This project includes tools for managing widgets.
15 - ***wgtpkg-info***: command line tool to display
16 informations about a widget file.
18 - ***wgtpkg-install***: command line tool to
19 install a widget file.
21 - ***wgtpkg-pack***: command line tool to create
22 a widget file from a widget directory.
24 - ***wgtpkg-sign***: command line tool to add a signature
25 to a widget directory.
27 For all these commands, a tiny help is available with
28 options **-h** or **--help**.
30 There is no tool for unpacking a widget.
31 For doing such operation, you can use the command **unzip**.
33 To list the files of a widget:
39 To extract a widget in some directory:
42 unzip WIDGET -d DIRECTORY
45 *Note: that DIRECTORY will be created if needed*.
47 ## Getting data about a widget file
49 The command **wgtpkg-info** opens a widget file, reads its **config.xml**
50 file and displays its content in a human readable way.
52 ## Signing and packing widget
56 To sign a widget, you need a private key and its certificate.
58 The tool **wgtpkg-sign** creates or replace a signature file in
59 the directory of the widget BEFORE its packaging.
61 There are two types of signature files: author and distributor.
63 Example 1: add an author signature
66 wgtpkg-sign -a -k me.key.pem -c me.cert.pem DIRECTORY
69 Example 2: add a distributor signature
72 wgtpkg-sign -k authority.key.pem -c authority.cert.pem DIRECTORY
77 This operation can be done using the command **zip** but
78 we provide the tool **wgtpkg-pack** that may add checking.
83 wgtpkg-pack DIRECTORY -o file.wgt
88 ### App directory organization
90 There are few directories that are by default used in the binder. At the root
91 directory of the widget folder, here are the directories that could be used:
93 - *lib* : default directory where lies external libraries needed for
94 the binding. Binding could be stored here too or in another directory of your
96 - *htdocs* : root HTTP directory if binding has web UI.
98 ### The steps for writing a widget
100 1. make your application
101 1. create its configuration file **config.xml**
107 ## Organization of directory of applications
109 ### directory where are stored applications
111 Applications can be installed in different places:
113 - the system itself, extension device.
115 On a phone application are typically installed on the sd card.
119 - /var/local/lib/afm/applications
121 From here this path is referenced as: "APPDIR".
123 The main path for applications is: APPDIR/PKGID/VER.
127 - APPDIR is as defined above
128 - PKGID is a directory whose name is the package identifier
129 - VER is the version of the package MAJOR.MINOR
131 This organization has the advantage to allow several versions
133 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).
135 ### Identity of installed files
137 All files are installed as user "afm" and group "afm".
138 All files have rw(x) for user and r-(x) for group and others.
140 This allows every user to read every file.
142 ### labeling the directories of applications
144 The data of a user are in its directory and are labelled by the security-manager using the application labels.
146 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
147 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
148 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
149 [meta-intel]: https://github.com/01org/meta-intel-iot-security "A collection of layers providing security technologies"
150 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
151 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
152 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
153 [openssl]: https://www.openssl.org "OpenSSL"
154 [xmlsec]: https://www.aleksey.com/xmlsec "XMLSec"
155 [json-c]: https://github.com/json-c/json-c "JSON-c"
156 [d-bus]: http://www.freedesktop.org/wiki/Software/dbus "D-Bus"
157 [libzip]: http://www.nih.at/libzip "libzip"
158 [cmake]: https://cmake.org "CMake"
159 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
160 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
161 [tizen-security]: https://wiki.tizen.org/wiki/Security "Tizen security home page"
162 [tizen-secu-3]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview "Tizen 3 security overview"