2 title: Overview of widgets
6 # Tools for managing widgets
8 This project includes tools for managing widgets.
11 - ***wgtpkg-info***: command line tool to display
12 informations about a widget file.
14 - ***wgtpkg-install***: command line tool to
15 install a widget file.
17 - ***wgtpkg-pack***: command line tool to create
18 a widget file from a widget directory.
20 - ***wgtpkg-sign***: command line tool to add a signature
21 to a widget directory.
23 For all these commands, a tiny help is available with
24 options **-h** or **--help**.
26 There is no tool for unpacking a widget.
27 For doing such operation, you can use the command **unzip**.
29 To list the files of a widget:
35 To extract a widget in some directory:
38 unzip WIDGET -d DIRECTORY
41 *Note: that DIRECTORY will be created if needed*.
43 ## Getting data about a widget file
45 The command **wgtpkg-info** opens a widget file, reads its **config.xml**
46 file and displays its content in a human readable way.
48 ## Signing and packing widget
52 To sign a widget, you need a private key and its certificate.
54 The tool **wgtpkg-sign** creates or replace a signature file in
55 the directory of the widget BEFORE its packaging.
57 There are two types of signature files: author and distributor.
59 Example 1: add an author signature
62 wgtpkg-sign -a -k me.key.pem -c me.cert.pem DIRECTORY
65 Example 2: add a distributor signature
68 wgtpkg-sign -k authority.key.pem -c authority.cert.pem DIRECTORY
73 This operation can be done using the command **zip** but
74 we provide the tool **wgtpkg-pack** that may add checking.
79 wgtpkg-pack DIRECTORY -o file.wgt
84 ### App directory organization
86 There are few directories that are by default used in the binder. At the root
87 directory of the widget folder, here are the directories that could be used:
89 - *lib* : default directory where lies external libraries needed for
90 the binding. Binding could be stored here too or in another directory of your
92 - *htdocs* : root HTTP directory if binding has web UI.
94 ### The steps for writing a widget
96 1. make your application
97 2. create its configuration file **config.xml**
103 ## Organization of directory of applications
105 ### Directory where are stored applications
107 Applications can be installed in different places:
109 - the system itself, extension device.
111 On a phone application are typically installed on the sd card.
115 - /var/local/lib/afm/applications
117 From here this path is referenced as: "APPDIR".
119 The main path for applications is: APPDIR/PKGID/VER.
123 - APPDIR is as defined above
124 - PKGID is a directory whose name is the package identifier
125 - VER is the version of the package MAJOR.MINOR
127 This organization has the advantage to allow several versions
129 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).
131 ### Identity of installed files
133 All files are installed as user "afm" and group "afm".
134 All files have rw(x) for user and r-(x) for group and others.
136 This allows every user to read every file.
138 ### Labeling the directories of applications
140 The data of a user are in its directory and are labelled by the security-manager using the application labels.
142 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
143 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
144 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
145 [meta-intel]: https://github.com/01org/meta-intel-iot-security "A collection of layers providing security technologies"
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 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
149 [openssl]: https://www.openssl.org "OpenSSL"
150 [xmlsec]: https://www.aleksey.com/xmlsec "XMLSec"
151 [json-c]: https://github.com/json-c/json-c "JSON-c"
152 [d-bus]: http://www.freedesktop.org/wiki/Software/dbus "D-Bus"
153 [libzip]: http://www.nih.at/libzip "libzip"
154 [cmake]: https://cmake.org "CMake"
155 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
156 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
157 [tizen-security]: https://wiki.tizen.org/wiki/Security "Tizen security home page"
158 [tizen-secu-3]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview "Tizen 3 security overview"