maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Updating a Qt Desktop widget on N900 (https://talk.maemo.org/showthread.php?t=66706)

kaissen 2010-12-07 15:45

Updating a Qt Desktop widget on N900
 
Hi all,
my first post on the forum, I hope I put it in the right place.

I have developed a Qt homescreen widget for Maemo, made a debian package and installed it on my N900. Now I've made some modifications to it and created a new debian package with higher version number.

App manager successfully updates my app, but instead of replacing the old desktop widget with the newer one, it just adds a second widget to the desktop. So I have both the old and the new version running simultaneously.

My question is: what should I do to make the upgrade work correctly (= remove old widget if it was running and replace it with the newer one)? I suspect I will have to do add debian preinst/postinst scripts but I'm not sure what I should put inside them.

Regards, Kaisa

CepiPerez 2010-12-07 18:16

Re: Updating a Qt Desktop widget on N900
 
You can add a preinst script that kills the widget binary.
I don't know if this is the correct way, but it should work

kaissen 2010-12-08 12:09

Re: Updating a Qt Desktop widget on N900
 
Thanks, it worked. Didn't think it would be so easy. I just made a preinst script like this:

#!/bin/sh
killall myAppName
exit 0


All times are GMT. The time now is 21:18.

vBulletin® Version 3.8.8