Changes

Jump to navigation Jump to search
3,031 bytes added ,  23:41, 6 March 2018
Line 1: Line 1:  +
{{Graduate|Walterbender will move this to http://developer.sugarlabs.org in 2016}}
 +
 
<noinclude><div class="noprint">{{TeamHeader|Activity Team}}</div></noinclude>
 
<noinclude><div class="noprint">{{TeamHeader|Activity Team}}</div></noinclude>
   Line 9: Line 11:  
=== Ask your 'newbie' question on-line ===
 
=== Ask your 'newbie' question on-line ===
   −
Join [http://en.wikipedia.org/wiki/IRC IRC] channel [irc://irc.freenode.net/sugar-newbies #sugar-newbies] (e.g. via [http://webchat.freenode.net/?randomnick=1&prompt=1&channels=sugar-newbies web client]) and ask your question about activity, or sugar core, development process. Also browse chat [http://meeting.sugarlabs.org/sugar-newbies logs].
+
Join [http://en.wikipedia.org/wiki/IRC IRC] channel [irc://irc.freenode.net/sugar #sugar] (e.g. via [http://webchat.freenode.net/?randomnick=1&prompt=1&channels=sugar web client]) and ask your question about activity, or sugar core, development process. Also browse chat [http://meeting.sugarlabs.org/sugar logs].
    
=== Creating a new activity ===
 
=== Creating a new activity ===
   −
See [[Activity Team/Resources|Activity Team Resources]].
+
See [[Activity Team/Creating a New Activity|Creating a New Activity]] and [[Activity Team/Resources|Activity Team Resources]].
   −
=== Problems logging in to Gitorious? ===
+
=== Automated Testing ===
   −
Gitorious users are sometimes having their IP addresses incorrectly blacklisted by OSU-OSL, the organization that hosts git.sugarlabs.org.  If your SSH key is rejected with the error "Access denied or bad repository path", please open a ticket by emailing support@ouosl.org.
+
See [[Automated Activity Testing]]
   −
This has happened to a number of activity authors and we are working on getting it resolved.
+
===Port to GTK3===
 +
 
 +
We have hints on [[Features/GTK3/Porting|porting from GTK2 to GTK3]].
    
===Move an activity===
 
===Move an activity===
   −
We need help moving activities over to Sugar Labs from OLPC's servers.  This is a great way to get started helping out the Activity Team.  See [[Activity Team/How_to_migrate_from_OLPC]] for instructions, and [[Activity Team/Activity Status]] for the list of activities that need to be moved.
+
We need help moving activities over to Sugar Labs from GitHub servers.  This is a great way to get started helping out the Activity Team.  See [[Activity Team/How to migrate from Gitorious]] for instructions, and [[Activity Team/Activity Status]] for the list of activities that need to be moved.
    
While moving activities, it would be great to check that the .pot files are up to date and the MANIFEST is correct.  This will really help out the distro packagers.
 
While moving activities, it would be great to check that the .pot files are up to date and the MANIFEST is correct.  This will really help out the distro packagers.
 +
 +
== Set up Sugar Labs services ==
 +
* '''Upload a xo bundle''' to [http://activities.sugarlabs.org/ activities.sugarlabs.org].  Be sure to include a couple of screenshots of your activity in action.
 +
* If your activity is part of Fructose, '''upload a .tar.bz2''' to [http://download.sugarlabs.org/ download.sugarlabs.org].  Request a shell account from the [[Infrastructure Team]] if you don't have one already.
 +
* '''Update the OLPC wiki page''' for the Activity, noting the migration. Use the [http://wiki.laptop.org/go/Template:Migrated_to_sl.o Migrated to sl.o] template.
 +
* '''Change sugar-jhbuild''' to point to the new repository if this activity was included in sugar-jhbuild (enter a ticket in http://dev.sugarlabs.org if you have no access).
 +
* Ask an [[Activity Team/Contacts|Activity Team Coordinator]] to create a '''Trac component''' for your activity.
    
===Cross-platform compatibility===
 
===Cross-platform compatibility===
Line 32: Line 43:     
The [[Activity Team/Compatibility Tips|Compatibility Tips]] page is a place to accumulate tips.
 
The [[Activity Team/Compatibility Tips|Compatibility Tips]] page is a place to accumulate tips.
 +
 +
===Migrating from GTK2 to GTK3===
 +
 +
The Sugar platform is migrating from GTK2 to GTK3 to stay relevant with upstream changes and benefit from their efforts. Sugar 0.96 (available in OLPC 12.1 development builds) includes support for a transition period, where both GTK2 and GTK3 activities can coexists, but new Sugar features will only be added to the GTK3 toolkit (e.g., improvements in touchscreen support). Have a read through the [[Features/GTK3/Porting|migration notes]], and the [http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html GTK3 Python tutorials] to get a feel for how things need to be changed. New activities should be developed with GTK3, unless you need to support an existing deployment today using an older build.
    
===Modify Activities===
 
===Modify Activities===
Line 37: Line 52:  
A guide has been  written describing how to make simple modifications to popular Sugar  activities.  Examples include adding sounds to TamTam, blocks to  TurtleArt, buttons to Calculate, etc.
 
A guide has been  written describing how to make simple modifications to popular Sugar  activities.  Examples include adding sounds to TamTam, blocks to  TurtleArt, buttons to Calculate, etc.
   −
*[[Activity_Team/Modifying_an_Activity]]
+
* [[Activity Team/Modifying an Activity]]
 +
 
 +
===Remote control your XO===
 +
 
 +
[[Activity Team/Remote control your XO|Remote control your XO]] from your development machine can be handy while developing an activity.
 +
 
 +
===Internationalization===
 +
 
 +
We use '''[http://docs.python.org/library/gettext.html gettext]''' to internationalize activities. The basic steps are:
 +
 
 +
In your Python code:
 +
from gettext import gettext as _
 +
 
 +
Hence forth, encapsulate strings that you want translated in _():
 +
_('string to be translated')
 +
 
 +
Run <code>setup.py</code> to generate a POT file for your project. This file will contain a reference to all of the encapsulated strings.
 +
 
 +
From here, you need to:
 +
# <code>git add</code>, <code>commit</code>, and <code>push</code> the POT file to git
 +
# request that your project be added to the pootle server (by filing a task to the localization component on bugs.sugarlabs.org)
 +
# add pootle as a committer to your project on gitorious
 +
 
 +
Once translations are committed to your project:
 +
# do a <code>git pull</code> to get a local copy of the .po files
 +
# run <code>setup.py fix_manifest</code> to create the .mo files used at run time
 +
Details can be found on the [[Translation Team/i18n Best Practices]] page.
    
===General overview of git===
 
===General overview of git===
   −
Read the brief overview below but then '''start''' with our [[Activity Team/Git Tutorial|git tutorial]].
+
Read the brief overview below but then '''start''' with our  
 +
* [[Activity Team/Git Tutorial|git tutorial]].
    
====glossary====
 
====glossary====
Line 52: Line 94:  
;gitorious: software for hosting git repositories, including a web interface for administration
 
;gitorious: software for hosting git repositories, including a web interface for administration
 
;git.sugarlabs.org: server hosted by Sugar Labs running gitorious
 
;git.sugarlabs.org: server hosted by Sugar Labs running gitorious
 +
;GitHub: a web-based hosting service Git repository.  Sugar Labs is migrating projects to this service.
    
====Setup====
 
====Setup====
(once per machine you're working on)
+
(Once per machine you're working on)
  git clone git://git.sugarlabs.org/whatever/mainline.git whatever
+
  git clone git://github.com/whatever/mainline.git whatever
    
====Regular usage====
 
====Regular usage====
Line 78: Line 121:  
So if you ever mess up and don't know how to fix it yourself, please
 
So if you ever mess up and don't know how to fix it yourself, please
 
stop (at least for me that's usually the hardest part ;) ), try to
 
stop (at least for me that's usually the hardest part ;) ), try to
recollect the exact sequence of actions (e.g. from shell history) and ask
+
recollect the exact sequence of actions (e.g., from shell history) and ask
 
for help.
 
for help.
   Line 87: Line 130:  
----
 
----
   −
====Additional background on git====
+
{{:Activity Team/Git}}
 +
 
 +
== Maintainers ==
   −
* [[Activity Team/Git FAQ|Sugar Labs git FAQ]]
+
{{:Activity Team/Maintainers}}
* [http://book.git-scm.com/ Git Community Book]
  −
* John Wiegley has written an overview of git: [http://ftp.newartisans.com/pub/git.from.bottom.up.pdf Git from the bottom up].
  −
* Charles Duran from Harvard has written a lovely overview of git at [http://www.eecs.harvard.edu/~cduan/technical/git/ Understanding Git Conceptually].
  −
* GNOME maintains a [http://www.gnome.org/~federico/misc/git-cheat-sheet.txt list of references to git for mortals].
  −
* [http://progit.org/book/ Pro Git] by Scott Chacon
  −
* [http://www.gitcasts.com/ Gitcasts]
  −
* Anish Mangal explains the [http://lists.sugarlabs.org/archive/sugar-devel/2010-October/027633.html git workflow] on the Sugar development mailing list
      
== Testers ==
 
== Testers ==
   −
Please see the  [[Features/Soas_V4/ASLOxo_Activity_Test_Table|Activity Test-table page]] for tester information.
+
Please see the  [[Testing/Activity Test Table]] for tester information.
    
== Background information ==
 
== Background information ==
Line 130: Line 168:     
== Misc. ==
 
== Misc. ==
 +
 +
===Mime types and file suffixes===
 +
 +
You can associate your activity with mime types by including a mime_types entry in the activity/activity.info file; e.g.,
 +
 +
mime_types = text/plain;text/x-python;text/x-logo;text/x-svg;application/xml;text/html;text/xml;image/svg+xml
 +
 +
You can associate your activity with a file suffix by including a mimetypes.xml file in your activity subdirectory:
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
 +
    <mime-type type="application/x-turtle-art">
 +
      <comment xml:lang="en">Turtle Art</comment>
 +
      <glob pattern="*.ta"/>
 +
    </mime-type>
 +
</mime-info>
 +
 +
'''Note:''' You cannot just copy your activity into the ~/Activities directory. You have to install it as a .xo bundle or using 'setup.py install' (note that the latter is tricky as the command might get your paths messed up).  This installation step will create a file --> ~/.local/share/mime/packages/<your-bundle_id>.xml
 +
 +
If your activity does not register any mimetype, then it won't matter.
 +
 +
If your activity was already properly installed (with sugar-install-bundle), then copying new source into Activities will not be affected by this problem unless the new source registers a new mimetype that the old source did not.
    
=== Activity Team users on activities.sugarlabs.org ===
 
=== Activity Team users on activities.sugarlabs.org ===
Line 141: Line 201:  
There is a handy utility that is a standard part of Sugar Activity bundles, setup.py. You should use it to create and update POT files, generate a MANIFEST file and update locale files, and create .xo and .tar files for distribution.
 
There is a handy utility that is a standard part of Sugar Activity bundles, setup.py. You should use it to create and update POT files, generate a MANIFEST file and update locale files, and create .xo and .tar files for distribution.
   −
  ./setup.py genpot
+
  ./setup.py genpot       # generates or updates the POT file used by gettext for internationalization
 
  ./setup.py build
 
  ./setup.py build
  ./setup.py fix_manifest
+
  ./setup.py fix_manifest # updates the MANIFEST file and generates or updates the locale files used for internationalization
  ./setup.py dist_xo
+
  ./setup.py dist_xo       # creates an .xo bundle from your project
  ./setup.py dist_source
+
  ./setup.py dist_source   # creates a .tar.gz file from your project
    
===Packaging activities discussion===  
 
===Packaging activities discussion===  
Line 160: Line 220:  
=== A typical update cycle ===
 
=== A typical update cycle ===
   −
Anyone can contribute a patch to a Sugar Activity. The typical work cycle involves an interaction with the activity (project) maintainer as follows:
+
Moved to https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md#modifying-activities
# make a clone (anyone)
  −
# make your changes (anyone)
  −
# mail your patch to sugar_devel (anyone)
  −
# make changes as per suggestions by the project maintainer and developer community (anyone)
  −
# push your changes (anyone)
  −
# request a merge (anyone)
  −
# write release notes (anyone)
  −
# tag the new version in git (project maintainer)
  −
# create the .xo and .tar files (project maintainer)
  −
# upload .tar to download.sugarlabs.org (project maintainer)
  −
# upload .xo to activities.sugarlabs.org (project maintainer)
  −
# update wiki documentation (anyone)
      
=== OLPC XO game buttons ===
 
=== OLPC XO game buttons ===
Line 224: Line 272:     
* don't forget to update addons as well!!
 
* don't forget to update addons as well!!
 +
activities.sugarlabs.org
    
* and to copy the tar file to download.sugarlabs.org
 
* and to copy the tar file to download.sugarlabs.org

Navigation menu