Line 30: |
Line 30: |
| profile_path = sugar.env.get_profile_path() | | profile_path = sugar.env.get_profile_path() |
| | | |
− | == Bundle Structure == | + | == Bundle structure == |
| | | |
| The activity bundle is a directory, with a name ending in ".activity". Each activity bundle must, in a subdirectory called 'activity', contain a file named "activity.info", and following a special format. For example: | | The activity bundle is a directory, with a name ending in ".activity". Each activity bundle must, in a subdirectory called 'activity', contain a file named "activity.info", and following a special format. For example: |
Line 64: |
Line 64: |
| ;lib | | ;lib |
| | | |
− | See [[#Bundling Native Libraries]] below. | + | See [[#Bundling native libraries]] below. |
| | | |
| ;locale | | ;locale |
| | | |
− | See [[#Activity Name Localization/Translation]] below. | + | See [[#Activity name localization/translation]] below. |
| | | |
| ; icons | | ; icons |
| Contains the icons used by the activity. When using the sugar.activity python package the path is automatically added to the default [http://www.pygtk.org/docs/pygtk/class-gtkicontheme.html gtk icon theme]. | | Contains the icons used by the activity. When using the sugar.activity python package the path is automatically added to the default [http://www.pygtk.org/docs/pygtk/class-gtkicontheme.html gtk icon theme]. |
| | | |
− | == .info File Format == | + | == .info file format == |
| | | |
| .info files follow a key/value pair format, similar to the [http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec fd.o desktop entry spec], but not conforming to it. An example is shown here: | | .info files follow a key/value pair format, similar to the [http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec fd.o desktop entry spec], but not conforming to it. An example is shown here: |
Line 136: |
Line 136: |
| : URL to retrieve update information; implemented in [http://dev.laptop.org/ticket/4951 #4951]. The software update control panel will attempt to look for information about the latest version of the activity by fetching the given url with first the core OS build number, then the release number, then the release major version number appended, then finally as-is. (For example, if your update URL tag has the value 'http://host.net/bundles/FooBar' and you are currently running release 8.1.1 (core OS 708), the following URLs will be tried, in this order: http://host.net/bundles/FooBar/708, http://host.net/bundles/FooBar/8.1.1, http://host.net/bundles/FooBar/8.1, http://host.net/bundles/FooBar .) The contents of the URLs should be in the [[activity microformat]]. If no update_url is specified, http://wiki.laptop.org/go/Activities will be used. See [[Software update]] for more information. | | : URL to retrieve update information; implemented in [http://dev.laptop.org/ticket/4951 #4951]. The software update control panel will attempt to look for information about the latest version of the activity by fetching the given url with first the core OS build number, then the release number, then the release major version number appended, then finally as-is. (For example, if your update URL tag has the value 'http://host.net/bundles/FooBar' and you are currently running release 8.1.1 (core OS 708), the following URLs will be tried, in this order: http://host.net/bundles/FooBar/708, http://host.net/bundles/FooBar/8.1.1, http://host.net/bundles/FooBar/8.1, http://host.net/bundles/FooBar .) The contents of the URLs should be in the [[activity microformat]]. If no update_url is specified, http://wiki.laptop.org/go/Activities will be used. See [[Software update]] for more information. |
| | | |
− | ===Future Properties=== | + | ===Future properties=== |
| There are properties anticipated to be used by future Sugar versions. In general, Sugar will ignore unknown properties, and use defaults for missing properties. | | There are properties anticipated to be used by future Sugar versions. In general, Sugar will ignore unknown properties, and use defaults for missing properties. |
| | | |
Line 142: |
Line 142: |
| : List of tags to categorize this activity. Not yet implemented, see [http://dev.laptop.org/ticket/6634 #6634]. | | : List of tags to categorize this activity. Not yet implemented, see [http://dev.laptop.org/ticket/6634 #6634]. |
| | | |
− | == Activity Name Localization/Translation == | + | == Activity name localization/translation == |
| | | |
| Localized data lives in the locale directory. Each language stores its localized keys in a <u>separate</u> directory named for the language's ISO code. Localized keys from the 'activity.info' file are stored in the 'activity.linfo' files in that directory. For example, German-localized German (as opposed to Swiss-localized German) language translations are stored in the 'de_DE/activity.linfo' file: | | Localized data lives in the locale directory. Each language stores its localized keys in a <u>separate</u> directory named for the language's ISO code. Localized keys from the 'activity.info' file are stored in the 'activity.linfo' files in that directory. For example, German-localized German (as opposed to Swiss-localized German) language translations are stored in the 'de_DE/activity.linfo' file: |
Line 169: |
Line 169: |
| Activity bundles should be packaged as zip files with the ".xo" extension. The mime type in the journal is "application/vnd.olpc-sugar". | | Activity bundles should be packaged as zip files with the ".xo" extension. The mime type in the journal is "application/vnd.olpc-sugar". |
| | | |
− | == Bundling Native Libraries == | + | == Bundling native libraries == |
| | | |
| Sometimes you need to include a native library or two with your activity. The strategy that [[Develop]] and [[Model]] use is specifying a shell script for the executable in the .info file: | | Sometimes you need to include a native library or two with your activity. The strategy that [[Develop]] and [[Model]] use is specifying a shell script for the executable in the .info file: |
Line 214: |
Line 214: |
| which will limit the number of file descriptors, the maximum writable file size, the number of processes, and the maximum size of the activity's address space, respectively. (See <tt>[http://linux.die.net/man/2/setrlimit man 2 setrlimit]</tt> for details.) | | which will limit the number of file descriptors, the maximum writable file size, the number of processes, and the maximum size of the activity's address space, respectively. (See <tt>[http://linux.die.net/man/2/setrlimit man 2 setrlimit]</tt> for details.) |
| | | |
− | == Other Technologies Comparison == | + | == Other technologies comparison == |
| | | |
| Activity bundles are similar to OS X bundles or [[Java JAR files]]; a simple mechanism to encapsulate everything you need in a single directory that can be moved around independently. | | Activity bundles are similar to OS X bundles or [[Java JAR files]]; a simple mechanism to encapsulate everything you need in a single directory that can be moved around independently. |