I will be focusing on packaging for OBS seeing as a QWidget-based application isn't worth pushing through OVI.
I had to switch my applications packaging over from my py2deb fork to the distutils-based sdist_maemo. A big reason is sdist_maemo already has Harmattan support. I also figured it was a good idea to switch to distutils as it is more "proper" python packaging and because it is pluggable for various target packaging systems. That last part will allow me to continue to support Maemo 4.1/5 and in the future support regular MeeGo.
So first I've moved all of my files to a proper distutils based layout
I then wrote my setup.py file with an sdist_maemo command configured for each of my target deb-based distributions. A nice thing to know is that for Maemo 5 the python module will be optified for you.
An annoying thing is each platform has different packaging requirements. Some examples include:
- Different ".desktop" file locations
- Different ways of launching the app from within a desktop file.
- Everything seems different with the app launcher icon
- Different icon sizes for the Maemo-Icon-26 field
- Different .deb sections
- Different dependency names
- Aegis file support (not needed for current apps so skipped over)
To minimize my need for using code-gen my setup.py file creates multiple instances of sdist_maemo, one for each platform.
The app icon caused me some problems. I had assumed it would operate like previous versions of Maemo and desktop Linux, that if you just said "ejpi" or "gonvert" it would look for the appropriate icon size in "/usr/share/icons/hicolor". I'm glad I found that document explaining otherwise. As an alternative some of the apps in the OVI Store just hard code an absolute path. When you do make a mistake on this, Harmattan seems to have two different default icons. The red square came up for me when "ejpi" didn't map to an icon. The green curved icon came up when I had an absolute path that pointed at nothing.
My makefile creates the needed icons, code-gens my desktop files, code-gens my setup.py files, and then runs "setup.*.py sdist_*".
Odds and Ends
I do not believe PyQt is available for Harmattan, so I had to finish adding support for PySide in my applications. I've made it easy to use both bindings by centralizing all knowledge of the differences between the two.
I've tried to make the switch a couple of times already but each time I came across new bugs that the old bugs prevented me from seeing. Luckily the PySide people are quick at resolving these issues and by 1.0.5 my applications ran smoothly.
I went ahead and made the simple switch to XDG and Harmattan-style icons though I'm not yet seeking OVI compliance. I decided to redo the icons. They weren't all that great, no where near the icon guidelines, and I wanted SVGs so I could use the Harmattan Icon Generator. Not being an expert at graphics tools, the icon generator definitely saved me a good amount of work. The main drawback is that basing the icons background gradient on the base icon's content seems to produce results without enough contrast. I ended up using the "mean" setting to force gray backgrounds.
Now that we have all that wrapped up, time to upload onto the OBS. The Getting Started Guide has been updated and now is pretty good. I setup a harmattan-specific subproject due to my code-gen specializing the source-packages per distribution. Once everything was uploaded to my project, I logged in as root, added my sources, and away I went.
So for the fruit of my work:
- ejpi and gonvert source including support for Maemo 4.1, Maemo 5, and Harmattan
- my Harmattan OBS project
- my Harmattan repository
- Icon Generator with Color suggestions
- Finding icons