Wednesday, February 20, 2013

Building OLPC activities within Sugar-build

Whew, been tough to find time lately to spend in the evening on OLPC dev stuff. But had a bit of energy tonight and spent some time on some build stuff.

Tonight I experimented some more with the OLPC Sugar-build setup (as described here: I also finished reading the lengthy-and-very-detailed "Create your own sugar activites" manual. I skimmed some of the code, but in general made it through most of the stuff that will be relevant to the Activity development I am aiming for.

I could tell there were some Activities pre-installed in this sugar-build script (eg terminal, browse, chat, and a few other basics), but I wanted to know how to install new activities from their source code on Sugar's gitorious/github page (

This now allows me to do a few necessary things:
1) Check out and edit existing activities (or create my own new one) from Sugar's Github source control (necessary for contributing to OLPC software)

2) Write and modify code

3) Build and test the activities inside of the sugar environment on my desktop

It was a little tough to figure this out so I thought I'd document it here in case anyone else is trying to do this.

First of all, find the git:// address for the OLPC activity you want access to. (on here From there, go to your sugar-build directory and edit the following file:

This config file instructs the sugar-build script which activities to download from the appropriate git:// address, and what to call the directory that you're dropping the git repo into.

Then "pull" from the git repo to get the code:
make pull

make build
make run

And... voila! We run the sugar emulator again and here's the Hello World activity, along with the Camera and some other stuff I added too.

I just tried to edit the files and rebuild them, but it looks like the build system doesn't understand that I've modified the files and they need to be re-built and copied over to the install area. I'm probably doing something wrong. But it's time for bed :) More soon.

No comments: