Hi,
first of all sorry for this long post. I would like to add to my application the feature of the 3d title: check if there is a new version of the program or of the data files (mainly database) and eventually download and install the updates. I have searched the forum for a similar question but found only a discussion if integrate the "update" feature on the main program or in a separate one; all answers were for the latter. That topic solved one of the my problem. But now I have some other questions and since I don't never coded a internet application it was great if you can drive me to the right direction.

First of all I have divided the work in steps according to the phases of the "update" progress.

1) Check if there is an active internet connection: obviously the first step. What is the simplest way? A ping to the server is sufficient? Which qt4 method should I use?

2) What is the best way for version checking? My project is hosted by sourceforge. The program should check for two packages: the main program (less updated) and the data files (more updates). The program is distributed for linux (only source code, no binary) and windows. The data files are common for the two OSs.

2a) Should I add new packages to the project? (maybe myapp-update and myapp-data-update).

2b) Which compression method should I use for packaging the updates. In linux it's not a problem, what about windows? I don't want more dependencies other than qt4. Maybe a self extracting package?

3) If there is an update the main program calls the updater; this asks the user if download the updates.

3a) Which qt4 method gives the current OS?

3b) Which method I have to use for downloading?

3c) Where I have to download the files? In a tmp folder, obviously; in linux is /tmp but in windows it can change: which qt4 method gives the current system temp folder?

4) Once download is finished the updater asks if install the new files:

4a) In linux only the data files should be installed (the binary must be compiled): so they are installed in the application folder in $HOME. Ok.

4b) In windows: thanks to QApplication::applicationDirPath() I know where the application is installed; and there extract the binary. Where I have to put the data files? In the same directory is ok, or in the user profile subfolder? Which qt4 method gives the current user directory?


Am I forgetting something else? Any help will be very appreciated.