Setup a development environment

Sugar is made of several modules and depends on many other libraries.

There are several ways to set up a Sugar environment for doing Sugar development, choose one at a time only;

Sugar Live Build

Sugar Live Build is a complete bootable image containing Sugar, the toolkits, and the demonstration activities;

See downloads for the ISO9660 image file.

Once installed, Sugar Live Build can be used to make changes to Sugar, the toolkits, the demonstration activities, or to write new activities.

See sugar-live-build on GitHub for configuration files to make your own Sugar Live Build using the Debian Live Build software.

Packaged Sugar

For development of activities without making changes to Sugar desktop.

For Fedora users, see Using Sugar on Fedora. Once Sugar is installed, development of activities can begin.

For Debian users, see also Using Sugar on Debian, or see how to install sucrose below.

For Ubuntu users, see also Using Sugar on Ubuntu, or see how to install sucrose below.

Install Debian Stretch or Buster, or Ubuntu 17.10 Artful.

Install the sucrose package;

sudo apt install sucrose

Log out, then log in with the Sugar desktop selected.

Or, install xrdp and rdesktop then log in to Sugar in a window;

sudo apt install xrdp rdesktop
sudo adduser guest
echo sugar | sudo tee -a /home/guest/.xsession
rdesktop -g 1200x900 -u guest -p guest 127.0.0.1

Once you have a local Sugar desktop, or a remote Sugar desktop, development of activities can begin.

Native Sugar

For experts.

Clone each of the module repositories;

for module in sugar{-datastore,-artwork,-toolkit,-toolkit-gtk3,}; do
    git clone https://github.com/sugarlabs/$module.git
done

Install the build dependencies. There are many, and their package names vary by distribution. A good list is in the Debian or Fedora packaging files.

On Debian or Ubuntu;

for module in sugar{-datastore,-artwork,-toolkit,-toolkit-gtk3,}; do
    apt build-dep $module
done

On Fedora, use dnf builddep, like this; (If you are using GNOME's desktop environment, make sure you are using GNOME Xorg before moving forward!)

for module in sugar{-datastore,-artwork,-toolkit,-toolkit-gtk3,}; do
    dnf builddep $module
done

Autogen, configure, make, and install each module;

for module in sugar{-datastore,-artwork,-toolkit,-toolkit-gtk3,}; do
    cd $module
    ./autogen.sh
    ./configure
    make
    sudo make install
    cd ..
done

Clone the Browse and Terminal activities;

mkdir -p ~/Activities
cd ~/Activities
git clone https://github.com/sugarlabs/browse-activity.git Browse.activity
git clone https://github.com/sugarlabs/terminal-activity.git Terminal.activity

Log out and log in again with the Sugar desktop selected, or use the remote desktop feature described earlier on this page.

After making changes in a Sugar module, repeat the sudo make install step, and log in again.