Informing users about updates
Sometimes we'll make very important updates to the package that fix bugs or offer considerable feature enhancements. To make sure that all clients have the new package, we need to let them know they should update their package. There are two ways to do this.
##You can hope they'll be good
In the rti_egrma.pkg file, there is a line d Distribution-date: 25Aug2012
.
This is the current version-date of the package. If the client's package has a prior distribution date, then by typing adoupdate
they can see that they have an old package. They can update with rtiupdate. However, most users are pretty bad about regularly checking for updates.
##Or you can help them be good! There's better way! Whenever a file needs to access the rti server, it executes the program getegrmalocations. This file contains a hook that locally runs a file on the server every time getegrmalocations runs. Put simply, whenever a client connects to the rti server, they execute the code located at assets/on_access_rti_server.do. Here it is:
This will update anyone under version 2. Otherwise the code is completely inert.
This allows us to update the package for them. getegrmalocations
saves a macro containing egrma_version. The following code compares the client version to the current version, and updates the package if needed.