Development Team/Almanac/Activity Bundles: Difference between revisions
No edit summary |
.info file format, deprecate some parts, refer to specification in git |
||
| Line 71: | Line 71: | ||
== .info file format == | == .info file format == | ||
See [https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/__init__.py sugar3/bundle] for the | See [https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/__init__.py sugar3/bundle] for the latest bundle metadata specification. | ||
This section below deprecated, but has some useful historical information that goes beyond what the specification needs. | |||
Some additional comments on the key; | |||
A | name | ||
: A 'name' key without a bracketed language code is the "en_US" localized name of the activity. | |||
activity_version | |||
: | : An activity should not use the value in source code, as it may be changed by developers and packagers. | ||
bundle_id | |||
: The name should conform to the [http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names D-Bus spec] - in particular, hyphens are not allowed. It is recommended that [http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions Java package naming conventions] are used when choosing bundle identifiers, to ensure uniqueness. Briefly, your name should begin with the reversed domain name of an organization you belong to. | |||
bundle_id | |||
: | |||
: The reversed domain name part is supposed to be rooted in some actual DNS-rooted namespace. You don't need to own this domain; you just need to have a reasonable claim on some ''unique'' name at that domain. There are several ways to derive one: | : The reversed domain name part is supposed to be rooted in some actual DNS-rooted namespace. You don't need to own this domain; you just need to have a reasonable claim on some ''unique'' name at that domain. There are several ways to derive one: | ||
:* If your email address is ''yourname''@''somemailhost''.com, then you could use ''com.somemailhost.yourname''.''YourActivity''. | :* If your email address is ''yourname''@''somemailhost''.com, then you could use ''com.somemailhost.yourname''.''YourActivity''. | ||
| Line 112: | Line 91: | ||
: In the Python bindings, the bundle_id is also used as the activity's default service type when the activity is shared on the network. To determine this type, the distinct parts (separated by the '.' character) are reversed, any '.' is replaced by a '_' character, and the type is prefixed by a '_' character. So in this example, the default service type would be "_WebActivity_laptop_org". | : In the Python bindings, the bundle_id is also used as the activity's default service type when the activity is shared on the network. To determine this type, the distinct parts (separated by the '.' character) are reversed, any '.' is replaced by a '_' character, and the type is prefixed by a '_' character. So in this example, the default service type would be "_WebActivity_laptop_org". | ||
license | license | ||
: This field names the licenses used for the activity bundle (the binary .xo file). For multiple licenses, separate them with semicolons ";". Otherwise, the value should conform to the same guidelines as the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License:_field <code>License:</code> field] of an RPM package; consult the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines Fedora Licensing Guidelines] for more information. A 'license' field naming an entry or entries in the "Good Licenses" table at [http://fedoraproject.org/wiki/Licensing Fedora's Licensing list] is required for any activities distributed by Sugar Labs. | : This field names the licenses used for the activity bundle (the "binary" .xo file). For multiple licenses, separate them with semicolons ";". Otherwise, the value should conform to the same guidelines as the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License:_field <code>License:</code> field] of an RPM package; consult the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines Fedora Licensing Guidelines] for more information. A 'license' field naming an entry or entries in the "Good Licenses" table at [http://fedoraproject.org/wiki/Licensing Fedora's Licensing list] is required for any activities distributed by Sugar Labs. | ||
icon | icon | ||
: | : The icon is looked up in the activity bundle's 'activity' directory (the same directory the activity.info file is in). It cannot contain a path. When searching for the icon in the activity bundle's 'activity' directory, only a file with the icon name and the extension '.svg' will be looked for. | ||
exec | exec | ||
: The exec key specifies the executable which [[Sugar]] runs to start the activity instances. Environment variables given on the exec line are expanded. Executable files should be placed into the bin/ directory in the bundle. It should support the following arguments: | : The exec key specifies the executable which [[Sugar]] runs to start the activity instances. Environment variables given on the exec line are expanded. Executable files should be placed into the bin/ directory in the bundle. It should support the following arguments: | ||
| Line 128: | Line 107: | ||
Python activities should generally use the generic sugar-activity executable. Other activities need to adhere to the [[olpc:Low-level Activity API]]. | Python activities should generally use the generic sugar-activity executable. Other activities need to adhere to the [[olpc:Low-level Activity API]]. | ||
tags | |||
tags | |||
: Tags give more context in which to place the activity. This is used to allow users to find activities more easily in the journal, the home view, [http://activities.sugarlabs.org http://activities.sugarlabs.org], etc. | : Tags give more context in which to place the activity. This is used to allow users to find activities more easily in the journal, the home view, [http://activities.sugarlabs.org http://activities.sugarlabs.org], etc. | ||
single_instance | single_instance | ||
: | : Added to flag activities that use resources that cannot be shared, such as a camera. | ||
max_participants | |||
: | : Setting max_participants in activity.py is possible, but deprecated. | ||
repository | repository | ||
: The URL of the master git repository for the activity, for use by {{code|git clone}}. Since activities are not all hosted in a single repository, it is important to include a link so that users can readily find the activity. Some git hosting services allow the URL to be used by web browser as well as {{code|git clone}}. | : The URL of the master git repository for the activity, for use by {{code|git clone}}. Since activities are not all hosted in a single repository, it is important to include a link so that users can readily find the activity. Some git hosting services allow the URL to be used by web browser as well as {{code|git clone}}. | ||