Posted on 2006-07-23
I am tryin to build an update system for my application.
I am just wondering the best way to go about doing it.
The basic logic for my system looks something like this:
Client click update
Connect to server
Send client version number eg 1.2.10
Compare version on server with client version
if version on server is higher then
get server address of files to be downloaded
for each file to be downloaded
when finished downloading
for each file that was downloaded
rename current file as old file eg simplewriter_old.exe
rename downloaded file eg simplewriter_new.exe -> simplewriter.exe
output 'no need to update'
But at the moment I have quite a static system that is heavily dependent on the code that is on my clients machines.
Is there anyway I can build a system where the user can connect to eg some php script and this script on the server takes care of the update for the user? Is this advised?
The reason that I am thinking to do this is because as things change so much, it would be better to have code that I can edit on the server as the changes happen rather than being dependent on the code that is comiled in the exe on the users comptuer...
What are your thoughuts?