Sugar on MacOS X

From OLPC
Revision as of 18:28, 22 June 2007 by 203.113.15.234 (talk)
Jump to navigation Jump to search
Emblem-warning.png The currency of this article or section may be limited by out-of-date information.
There may be relevant discussion on its talk page

It may be more straightforward to run Sugar in the QEMU emulator as described on this page: OS images for emulation.

For the timebeing, this is NOT going to be a one-click install process. At the very least you will need to install Python and PyGTK separately. And then there is GECKO. And finally, the Sugar environment that is built on all of it.

However, if you can build a pure Python application that uses a simple GUI, i.e. easy to translate into PyGTK, and does not have heavy dependencies, then it will be easy to port into Sugar. Get your proof of concept up and running, fix the major issues and then ask for help to port it to Sugar.

Akauppi: Forward notice: I plan to create a Fink package for Sugar, after which all of this will be a mere sudo fink install sugar. Some dependencies need to be pushed up-to-date first, working on that. If interested, contact me at: akauppi@gmail.com.

Justin: Using macports, I was able to install gtk2 and py-gtk2; however, I was not successful in installing glade. Overall, it was fairly easy to get Sugar running through the QEMU emulator on an Intel-based Mac with OS X 10.4.

Step one: Get Python

First thing is to get Python running on your machine. Python comes preinstalled in OS X, but the universal version available at pythonmac.org is recommended by the Mac Python community for the moment. The Python page has other possibilities.

Step two: Get GTK

This is the Mac version of the GTK GUI toolkit used by the OLPC. It is also the GUI toolkit used by the Open source art program named GIMP. You may want to download GIMP as well to test that the GTK is functioning and it will also assist you in dealing with JPEGs, GIFs, PNGs and other image content.

The site for the Mac OS X version of GTK is here http://sourceforge.net/projects/gtk-osx/ but I have no experience with this.

Perhaps you may be able to skip this step if you install GIMP for Mac OS X however OS X allows hiding of libraries inside an application folder so I don't know if this will install a usable GTK .

The above references are ridiculously out-of-date and misleading. GTK 2.x was recently ported to Mac OS X, and the port is part of the standard GTK sources. Not quite all there yet, though. The GIMP toolkit for Mac OS X is still 1.2, so it won't work with Sugar, so don't bother with the MacGIMP site, either. All-in-all, I'd suggest working on a Linux box until GTK 3.0 comes out.

what's ridiculous is suggesting a binary installation of gtk on mac osx when darwin ports is much simpler and handels the building for you. the porting Imendio is doing doesn't seem quite ready for production considering that there's no link to any zips of source or anything, just the url to the svn repository

Step three: Get PyGTK

This is a Python module that allows you to interface to the GTK toolkit from Python rather than C . You can find this here http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.8/ however I have no experience installing this on OSX.

Step four: Get GECKO

This still needs to be sorted out. In the meantime, unless your application relies on displaying HTML, you can get to work on developing the bulk of your application.

==Tutorials