Qt application auto-updater?
Hi - I'm wondering if there's a recommended strategy for adding an auto-updater to a Qt app. This would be something that would check online for an updated version, download the update and install it.
Would this be a separate app sitting next to the main Qt app that acts on it? Is there a good way to keep it all in one codebase/application?
Thanks for any suggestions/recommendations!
Re: Qt application auto-updater?
The recommended solution is a second application that will check and apply the updates. You don't want your main app to apply the updates because maybe you update the main executable (which is running) or a library your app is using.
If you use a second app, start it from the main app, check for updates, if any download them, close the main app, apply the updates( overwriting any necessary files) and if you want, start the application back.
Regards
Re: Qt application auto-updater?
permissions could cause problems.
only under windows when the user is administrator you can overwrite the executable.
i have no idea how for example firefox solves this. (probably run the updater as root/Administrator?)
niko
Re: Qt application auto-updater?
Firefox only makes an update if it has write permissions to the binary.
Re: Qt application auto-updater?
Quote:
Originally Posted by
wysota
Firefox only makes an update if it has write permissions to the binary.
That's not entirely true. It downloads the update and asks to install it, and ultimately the update installation will fail due to a lack of permissions. Experienced with Firefox 2.0.0.2 at university.
Re: Qt application auto-updater?
I have "update" options disabled if I don't have permissions to the destination directory. Maybe it only affects the possibility to change settings and not the actual update.
Re: Qt application auto-updater?
If you originally install your app as admin, then you'll have to make the update as admin.
If you install it as a regular user, then set write permissions for the current user for your files. Then it is possible for the same user to update the app.
On Vista you can elevate you app's rights to a more privileged user ( by asking the current user a user name and pwd ). You'll just have to add a few extra entries in the app manifest and some lines of code.
Regards
Re: Qt application auto-updater?
Hi,
I am working on application which will try to do some install or updates on Windows 2008 server (SBS - small business server).
Since ever the Microsoft introduced UAC (user account control) security, a user created with Administrator rights (other than Administrator default account) windows treats the user as Standard user and it gives the user Administrator rights only when Admin applications are run and allowed access.
Because of the above security, I have to elevate the user permissions to Administrator manually and then call any executable (.exe ) in my application.
Since I am using QProcess to run any applications (.exe) I went through the QProcess documentation, but I never found any function or option to elevate QProcess to Administrator permissions.
Please let me know if anyone know or have an idea how to elevate QProcess permissions.
Thanks,
Raghava
Re: Qt application auto-updater?
I've never attempted to auto update the application. The program checks for a newer version if allowed by it's configuration, and then will poup a dialog box saying "A new version (Vx.x) is available. You are currently running version Vy.y. Would you like to download it?". If the user clicks "Yes" then it directs them to the website. Its then upto the user to backup there files, gain any necessary rights, and run the updater. Saves lots of potential problems.
Re: Qt application auto-updater?
i am doing the exactly what squidge is saying. My separate app checks and downloads the SIS file (new updated version of the app) and asks the user to install it but how do i execute this SIS file automatically on the handset (Nokia E52).
I have tried
Code:
qStartIntall->start("C:\\Data\\DownloadedApp.SIS");
but i get error "QProcess::FailedToStart"
Please help.