Difference between revisions of "Platform Team/Guide/Sweets Usage"

From Sugar Labs
Jump to navigation Jump to search
Line 1: Line 1:
This is a trying to replace jhbuild for core development process. It is inspired by evidence and simplicity of activity development workflow.
+
This guide describes how to use [[Platform_Team/Doers_environment|Doers environment]] for developing core modules.
  
 
== Requirements ==
 
== Requirements ==
  
* [[Platform_Team/Guide/sweets_command#Install|Install]] {{Code|sweets}} command.
+
* Install PackageKit and PackageKit authentication agent from native packages. On Debian based systems, these packages are {{Code|packagekit}} and {{Code|packagekit-gnome}} (for Gnome Desktop Environment).
* [[Platform_Team/Guide/sweets_command#Native_package_repositories|Attach]] ''Platform'' and ''Distribution'' Bazaar repositories for one of [https://bazaar.sugarlabs.org/project/repositories?project=Platform supported] GNU/Linux distributions (otherwise follow [[#Not_supported_distributions|instructions]]).
+
* PackageKit authentication agent should be launched to let {{Code|sweets}} command install dependencies. Usually it is being started after being logged in to DE session (it isn't for Sugar session).
* Download Sugar from Bazaar to install all sugar dependencies and sugar itself (to use by default):
+
* Download and launch [http://download.sugarlabs.org/packages/0sugar/sweets.sh self-extracted installer].
sweets download sugar/emulator
+
* Installer will add {{Code|~/.local/bin}} directory to the {{Code|PATH}}. So, relogin from X session to take into account new {{Code|PATH}}.
  
== Usage ==
+
== Clone the sources ==
  
Clone any glucose projects to {{Code|~/sweets}} or {{Code|~/Activities}} directory. While running sugar, these cloned projects will be used instead of installed packages.
+
To checkout sugar project sources:
  
To run sugar emulator:
+
  sweets --deep clone sugar
  sweets sugar/emulator
 
  
To run sugar session, instead of {{Code|sugar}} command, use:
+
Where {{Code|--deep}} says {{Code|sweets}} process all dependencies.
sweets sugar
 
  
While launching, {{Code|sweets}} will check if cloned projects were built and run building otherwise. To rerun  building, being within particular cloned repository, use:
+
Each project will be placed to to default {{Code|~/sweets}} directory. These are regular sources clones with one exception, each project contains [[Platform Team/Recipe Specification|sweets.recipe]] spec file.
sweets build -f
+
Projects might be closed in regular way, {{Code|sweets clone}} is just convenient method since some of projects are gitorious clones.
  
To rebuild with reconfiguring:
+
== Launch sugar ==
sweets build -ff
 
  
You can change python code in cloned projects without a need to run build command (the same .py files are used to run sugar, see [[Platform_Team/Recipe_Specification|implement]] option in {{Code|sweets.recipe}} file for particular project), of course sugar itself should be restarted to take into account new .py code.
+
To launch sugar session:
  
== Current limitations ==
+
sweets sugar
  
Most of current restrictions are conditioned by not using 0install and will be fixed while 0.92 sucrose release cycle. They are:
+
or to run from Xephyr:
  
* ''sugar'' project should be cloned in any case,
+
sweets sugar:emulator
* glucose needs to be patched. It is not in master, so use bazaar branches[3] that are synced with the trunk:
 
** http://git.sugarlabs.org/projects/sugar-base/repos/bazaar
 
** http://git.sugarlabs.org/projects/sugar/repos/bazaar
 
** http://git.sugarlabs.org/projects/sugar-toolkit/repos/bazaar
 
** http://git.sugarlabs.org/projects/sugar-presence-service/repos/bazaar
 
** http://git.sugarlabs.org/projects/sugar-artwork/repos/bazaar
 
* dependency solving is inefficient and temporary, it will be replaced by invoking 0install in further implementation,
 
* build time dependencies need to be installed manually
 
  
=== Fedora devel packages ===
+
During the first launch, sources will be build. To rebuild them at any time:
sudo yum install autoconf automake libtool make intltool pygtk2-devel gtk2-devel GConf2-devel gnome-common icon-slicer icon-naming-utils xorg-x11-apps libSM-devel alsa-lib-devel
 
  
=== Debian/Ubuntu devel packages ===
+
  sweets -ff make ''sweet''
  sudo apt-get install build-essential intltool python-gtk2-dev libgtk2.0-dev libgconf2-dev icon-slicer icon-naming-utils x11-apps  libsm-dev libasound2-dev libtool gnome-common
 
  
=== Not supported distributions ===
+
== Current limitations ==
 
 
In addition to all core projects, clone Sugar specific dependencies to build them with {{Code|sweets}}:
 
 
 
* http://git.sugarlabs.org/projects/pyxpcom
 
* http://git.sugarlabs.org/projects/hulahop/repos/bazaar
 
  
See [[Platform_Team/Recipe_Specification|requires]] options in {{Code|sweets.recipe}} files for each cloned project to know what packages (except cloned projects) should be installed from native packages.
+
* glucose needs to be patched, thus these are gitorious forks.
 +
* packages cannot be build from sources without cloning
 +
* for now, {{Code|sweets}} knowns only about glucose dependencies to install them from native packages in Debian, Ubuntu, Fedora, Mandriva, openSUSE and Gentoo.

Revision as of 21:44, 5 January 2011

This guide describes how to use Doers environment for developing core modules.

Requirements

  • Install PackageKit and PackageKit authentication agent from native packages. On Debian based systems, these packages are packagekit and packagekit-gnome (for Gnome Desktop Environment).
  • PackageKit authentication agent should be launched to let sweets command install dependencies. Usually it is being started after being logged in to DE session (it isn't for Sugar session).
  • Download and launch self-extracted installer.
  • Installer will add ~/.local/bin directory to the PATH. So, relogin from X session to take into account new PATH.

Clone the sources

To checkout sugar project sources:

sweets --deep clone sugar

Where --deep says sweets process all dependencies.

Each project will be placed to to default ~/sweets directory. These are regular sources clones with one exception, each project contains sweets.recipe spec file. Projects might be closed in regular way, sweets clone is just convenient method since some of projects are gitorious clones.

Launch sugar

To launch sugar session:

sweets sugar

or to run from Xephyr:

sweets sugar:emulator

During the first launch, sources will be build. To rebuild them at any time:

sweets -ff make sweet

Current limitations

  • glucose needs to be patched, thus these are gitorious forks.
  • packages cannot be build from sources without cloning
  • for now, sweets knowns only about glucose dependencies to install them from native packages in Debian, Ubuntu, Fedora, Mandriva, openSUSE and Gentoo.