Adding autoupdate to application
Very often we will want our clients to be able to update automatically, especially if clients are run on large number of computers and / or in different locations.
To make our application automatically update itself, we need to use a simple but efficient pattern for automatic updates. The approach is exactly the same as described in Chapter 3, Tcl Standalone Binaries.
All that is needed is to perform the following steps:
- Check if an updated version of the binary is available; if not, then download it
- Write the binary as a temporary file with the specified filename
- Run the temporary binary
- As the temporary binary, overwrite the actual binary and exit
- As the temporary binary, run the actual binary, which is now updated ...
Get Tcl 8.5 Network Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.