This is the final part of the explanation of “Home Screens Background Settings” application. In this part, I’ll explain the trick (a dirty trick indeed) of how to make it working on current N9’s PR1.1 and N950’s PR1.2

The initial release of this application (v0.0.1) saw that it works perfectly in my N950 but screwed the feed screen and offset of launcher icon in N9. The problem arises because the CSS file for Meegotouchhome are different in PR1.1 and PR1.2. The injection of PR1.2’s css file into PR1.1 will cause problems with the events screen as well as launcher screen.

Therefore, I need to come up with a solution that makes this application works on PR1.1 as well as PR1.2 without required user to download different deb package for different PR. So, here’s the trick.

The kernel version in PR1.1 is whereas it is in PR1.2. Therefore, by writing a post-installation script for debian package, the script will look for the kernel version, identify it’s PR1.1 or PR1.2 and inject the related version of CSS files. Hence making it work for both PR1.1 and PR1.2. Here’s the script:

kernelver=$(uname -r)

case "$kernelver" in
 **) cp -fv /opt/homescreenbg/data/css/PR1.1/libmeegotouchhome-default.css /usr/share/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css && cp -fv /opt/homescreenbg/data/css/PR1.1/meegotouchhome.css /usr/share/themes/base/meegotouch/meegotouchhome/style/meegotouchhome.css && echo "PR1.1 detected!";;
 **) cp -fv /opt/homescreenbg/data/css/PR1.2/libmeegotouchhome-default.css /usr/share/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css && cp -fv /opt/homescreenbg/data/css/PR1.2/meegotouchhome.css /usr/share/themes/base/meegotouch/meegotouchhome/style/meegotouchhome.css && echo "PR1.2 detected!";;
 *) cp -fv /opt/homescreenbg/data/css/PR1.1/libmeegotouchhome-default.css /usr/share/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css && cp -fv /opt/homescreenbg/data/css/PR1.1/meegotouchhome.css /usr/share/themes/base/meegotouch/meegotouchhome/style/meegotouchhome.css && echo "Assuming it is PR1.1!";;

That’s it. Hope this 4 parts of home background settings explanation will help you understand how this application works and probably will help you a little bit in solving problems if you are developing application. Thanks 🙂