Over the past few weeks, I’ve had several customers ask how they can more easily manage and deploy a collection of JMP scripts, particularly in the case where an internal development team may periodically release new versions of some or all of the scripts. If you find yourself asking the same question, an auto-updating add-in depot may be the way to go.
A JMP add-in creates a single, menu-accessible application by packaging one or more JMP Scripting Language (JSL) scripts, along with any other necessary files, such as JMP data tables, text files and journals — pretty much anything is fair game for an add-in. Once a user has downloaded an add-in (identified by the .jmpaddin suffix), opening the add-in in JMP will deploy it.
An add-in depot is simply the location where each of these .jmpaddin files are stored, awaiting download. Usually, this is a server folder where the add-in users have read access. By adding a metadata table to the depot and using a few extra lines of code, you can create add-ins that are self-updating.
In a nutshell, here’s how it works: Once a user installs a self-updating add-in, each time it is run, it will check the metadata table to see whether a newer version has been published. If not, the add-in will run uneventfully. However, if there is a newer version of the add-in, the user will be informed of this and asked whether he or she would like to install the updated version. Accepting this offer will result in the newer add-in being installed over the existing add-in. That’s it! There is nothing else the user needs to do.
From the perspective of the depot administrator, nothing could be simpler: When ready to publish a new add-in or a revision to an existing one, he or she only has to place the new add-in into the depot, remove the old one (if applicable) and update the publish date in the metadata file.
Visit the JMP File Exchange to download my simple tutorial (including sample files — you don’t need to write any code) on how you can make a self-updating add-in depot (downloading requires use of a free SAS profile).