Design of auto-updating software
auto-update, desktop, java
Solution
Concerns that need to be dealt with:
If the app that does the updating is itself being updated, a restart is going to need to occur, or a stub would need to be executed to move the file into place (to avoid a file-in-use error.)
Whatever service you're communicating with to retrieve files via a web request would need to know what current version of installed package you're running. It would dynamically build the file URL list and maybe even zip up a file and put it out at a single URL for the client. Otherwise, have the client walk through the URL list, pulling each file. Each URL would be associated with an operation, such as 'copy' or 'execute'.
Process each retrieved file and install it to the client.
Update needs to be atomic (ability to rollback if any part of the operation fails.) You don't want to be left in a partial state.
Problem
Simply put, how would you design an application that supports straightforward and reliable auto-updating? I'm interested in how it could be cut up and the various operations involved. Edit: This is linked to this question: Self-destructing application