Activity bundles

From OLPC
Revision as of 20:04, 31 August 2006 by DanWilliams (talk | contribs) (Activity Bundles: reorganize section names)
Jump to: navigation, search

Introduction

Every activity in the Sugar environment is packaged into a self-contained "bundle". The bundle contains all the resources and executable code (other than system-provided base libraries) which the activity needs to execute. Any resources or executable code that is not provided by the base system must be packaged within the bundle.

Rationale

Activities are meant to be shared between children. If a child doesn't have the activity, it is automatically transfered to the child when he or she joins the shared activity. Packaging activities in self-contained bundles allows easy sharing, installation, removal, and backup.

Bundle Structure

The activity bundle is a directory, with a name ending in ".activity". Each activity bundle must, in its root directory, contain a file with the same name as the activity bundle, but ending in ".info" rather than ".activity", and following a special format. For example:

Drawing.activity/
    Drawing.info
    drawing-activity.svg
    images/
    sounds/
    bin/

(the images, sounds, and bin subdirectories are not required, but are shown as examples of how an activity may wish to organize its resources)