5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform
-
Upload
eduardo-lima -
Category
Documents
-
view
522 -
download
0
description
Transcript of 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform
![Page 1: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/1.jpg)
5 tips and 4 and ½ tricks for porting GNOME applications
to Maemo platform
Eduardo Lima (Etrunko)8th GUADEC, Birmingham, UK
![Page 2: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/2.jpg)
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
![Page 3: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/3.jpg)
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
![Page 4: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/4.jpg)
Why Porting Applications?
● GNOME is mobile as well
![Page 5: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/5.jpg)
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!”
![Page 6: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/6.jpg)
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
![Page 7: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/7.jpg)
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
![Page 8: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/8.jpg)
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
![Page 9: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/9.jpg)
Feasibility Of The Port
● Check the dependencies– libbonobo/libbonoboui– libgnomeprint/libgnomeprintui– libgnome/libgnomeui– libgnomecanvas– gnomekeyring
● Processor power required● Storage required● Memory consumption
![Page 10: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/10.jpg)
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
![Page 11: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/11.jpg)
Example: Gnumeric
![Page 12: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/12.jpg)
It Works!
![Page 13: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/13.jpg)
Brief Analysis Of The Screen
![Page 14: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/14.jpg)
Great Resolution
![Page 15: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/15.jpg)
Reduced Usable Area
![Page 16: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/16.jpg)
Using The Virtual Keyboard
![Page 17: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/17.jpg)
Using The Virtual Keyboard
![Page 18: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/18.jpg)
Toolbar
![Page 19: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/19.jpg)
Toolbar
![Page 20: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/20.jpg)
Virtual Keyboard + Toolbar
![Page 21: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/21.jpg)
Virtual Keyboard + Toolbar
![Page 22: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/22.jpg)
And so on...
![Page 23: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/23.jpg)
And so on...
![Page 24: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/24.jpg)
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
![Page 25: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/25.jpg)
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
![Page 26: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/26.jpg)
How does it look like?
![Page 27: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/27.jpg)
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
![Page 28: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/28.jpg)
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!
![Page 29: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/29.jpg)
Challenges
● Dialogs usually are not developed taking small screens into account
● Reduce installation size– Documentation– Translations
● Debian packaging is boring● Acceptable performance
![Page 30: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/30.jpg)
Other ports (Abiword)
![Page 31: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/31.jpg)
Other ports (Evince)
![Page 32: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/32.jpg)
Other ports (Gconf Editor)
![Page 33: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/33.jpg)
Other ports (Rhythmbox)
![Page 34: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/34.jpg)
Other ports (Leafpad)
![Page 35: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/35.jpg)
Other ports (Xournal)
![Page 36: 5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform](https://reader035.fdocuments.us/reader035/viewer/2022062418/5554af35b4c90502618b54da/html5/thumbnails/36.jpg)