Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/starting.rst
blob: 8b564a24c7c3a43fab7b5d1a2d1eba63a0465d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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 :ref:`info-filling`
* 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


.. _info-filling:

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