5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform
1. 5 tips and 4 and ½ tricks for
porting GNOME applications
to Maemo platform
Eduardo Lima (Etrunko)
8th
GUADEC, Birmingham, UK
2. About INdT
● Instituto Nokia de Tecnologia
● Founded by Nokia do Brasil
● R&D for mobile devices
● About 200 employees
● Partnership with universities
● Three main sites:
– Manaus
– Brasilia
– Recife
3. About INdT – Recife Site
● About 40 employees
● Focused on OSS for mobile devices
– Nokia Internet Tablets (770 and N800)
– S60 smartphones
● Some projects
– Canola
– Python for Maemo
– Tapioca
– Maemo Games
– Maemo SDK VMWare/Qemu Appliances
– Carman
– Mamona
– Gmyth
– Evas optimization
5. Other Reasons
● Bring new experiences to Maemo devices
● Replacement of built-in applications
● All advantages of FOSS
– New features implemented
– Bug fixes and improvements
– Community of users testing and reporting
bugs
● Yet another way to contribute to projects
● “Don't reinvent the wheel!”
6. Some Restrictions
● Small screen (Good resolution)
– Reduced usable area
● Processor power
– 220 MHz (770)
– 320 MHz (N800)
● RAM
– 64 MB (770)
– 128 MB (N800)
– No swap (can be activated)
● DSP
7. Some (more) Restrictions
● Limited storage (JFFS2 helps)
– 128 MB (770)
– 256 MB (N800)
● No FPU in 770
● Power consumption
● Maemo patched libraries
– Old versions
– Can't just be upgraded
● Scratchbox environment
8. First Steps
● Install scratchbox environment
● Install Maemo SDK (i386 and armel)
– Bora for N800
– Gregale for 770
● Find yourself a device (if possible)
● Pick an application
– Study the code
– Find the libraries it depends on
9. Feasibility Of The Port
● Check the dependencies
– libbonobo/libbonoboui
– libgnomeprint/libgnomeprintui
– libgnome/libgnomeui
– libgnomecanvas
– gnomekeyring
● Processor power required
● Storage required
● Memory consumption
10. Getting Rid Of GNOME Stuff
● Some things can just be replaced
– Help
– Icon lookup
● Other things must go within #ifdef blocks
– GnomeProgram
– Session management
– Synchronize accelerators
● Add configure checks for specific bits
24. Summary
● Use hildon stuff
– Program/Window
– Menu
– Toolbars
– Tap and hold
– Dialogs (Open, Save, Fonts, Colors, etc)
● Hide anything else
– Status bars
– Other widgets
● Focus on the purpose of the application
25. Hildonization
● Replace the toplevel GtkWindow by a
HildonWindow
● Get a HildonProgram instance
● Add the HildonWindow to HildonProgram
● Change GtkMenuBar to a regular
GtkMenu
● Add GtkMenu to HildonWindow
● Add GtkToolbar objects to HildonWindow
● Add configure checks for Hildon libraries
27. Other tips
● Set application name
– g_set_application_name()
● Unset HildonWindow settings properties
– gtk-button-images and gtk-menu-images
● Register the application with libosso
– osso_initialize() and osso_deinitialize()
– D-Bus service file (/usr/share/dbus-1/services)
● .desktop files go to another location
– /usr/share/applications/hildon
28. Almost finished
● Build packages for everything
– Both i386 and armel targets
● Test the packages in the device
– Scratchbox armel emulation does not work
● Publish the packages, preferably by apt
● Submit patches!
29. Challenges
● Dialogs usually are not developed taking
small screens into account
● Reduce installation size
– Documentation
– Translations
● Debian packaging is boring
● Acceptable performance