First steps

Getting Sweetener

Sweetener is available on Git. To get all the packages in a stable version and have an example, write in a console:

$ git clone git://git.sugarlabs.org/sweetener/sweetener.git
$ cd sweetener
$ git submodule init
$ git submodule update
$ make activity
$ python setup.py dev
$ make install

Now you have a hello world application in the Applications->Accesories menu and its corresponding activity on Sugar.

Creating an activity

  • Start a git repository.

  • Copy to your new activity directory the following files from sweetener:

    • Makefile
    • activity.py
    • canvas.py
    • info.py
    • options.py
    • setup.py

    Optional, only if you want to get your activity working on desktops:

    • application.py
    • hello-world (Rename it to your activity name)
  • Make the following directories inside your activity:

    • activity/
    • sugar/
    • desktop/ (Only for desktops)
  • Clone the Sweetener submodules

    $ git submodule add git://git.sugarlabs.org/sweetener/makescripts
    $ git submodule add git://git.sugarlabs.org/sweetener/sugar sugar/sweetener
    
    # This is only for other Linux desktops.
    $ git submodule add git://git.sugarlabs.org/sweetener/desktop desktop/sweetener
  • Fill info.py

    See Filling information about the activity

  • Create a sugarized icon on activity/activity-(lower-name).svg where lower-name must be the same as the variable on info.py

  • Generate the activity.info file trough the command make and install the activity.:

    $ make activity
    $ python setup.py dev
  • If you want the activity running on desktops:

    $ make install

Filling information about the activity

You need to open the file info.py and fill the variables with the custom information about your activity.

Look for the following fields:

  • Activity Service Name

  • IO Mode

    Document or Config. Important at desktops.

  • Generic Name

    Only for desktops. See examples at the file comments.

  • Activity Name

  • lower-name

  • Copyright note (Obligatory for desktops, recommended)

  • Version

  • Summary

  • Authors

  • If any, Web site and documentation URL (Only for desktops)

  • Categories (Only for desktops)

  • Filter

    Important on desktops with IO mode set for documents, also needed to create your own mimetype.

  • License name

Table Of Contents

Previous topic

Welcome to Sweetener’s documentation!

Next topic

Sweetener API

This Page