How the automatic module updater works

Jungle Ide integrates an automatic module updater tool. This tool allow module developers to provide an automatic update availability notification system for Jungle Ide users.

This system will inform your module users when there is a new version of the module available, and will allow them to automatically update to latest version with easy.

This system works in the following way:

Any “updatable” module will integrate a module signature file (lbms) that has information about current module update and information about where in the Internet to check for the availability of additional updates.

So, when Jungle Ide finds that an installed  module update has a lmbs signature, it can then look in the Internet to see if current version is the latest available one and, if it is not, it can provide an automated download mechanism that automatically updates the module to the latest version.

GearTo do so, a Lemon Bytes Module Signature file (lbms) has the following information:

  • Name: The name of the module in the current update. As instance: FontMachine
  • Version: The version number of current update.
  • Update URL: The location where this speciffic update version can be found in the Internet. The system will be able to use this information to locate this version in the Internet and download it again if required. (repair module).
  • Short description: This information describes briefly the changes introduced in this update of the module.
  • More info URL: This is an Internet location where more general information regarding the module and the current update can be found. This will usually be the official module website on the net.
  • Remote signature URL: This is  where the module signature of latest module version can be found on internet. This URL has to be the same for all updates of the same module. Jungle Ide will use this URL as a “function” that returns latest available version. This way, Jungle Ide will be able to compare the local version information, with the one in the Remote Signature URL to determine wether an update operation should be performed or not.

In other words, Jungle Ide will be able to download the lmbs available on the remote signature URL and compare it with the current local lmbs file and determine if versions are not the same. It is very important that all the module signtarues for every update of the same module share the same RemoteSignatureURL value. That grants access to latest available version of the module. Otherwise the module update process could not work properly.

So all in all, in pseudo code:

RemoteSignature = DownloadSignature (LocalSignature.RemoteSignatureURL)
If LocalSignature.Version = RemoteSignature.Version Then
  No Updates Available
ElseIf LocalSignature.Version <> RemoteSignature.Version Then
   NewUpdate = DownloadUpdate (RemoteSignature.UpdateURL)
   PerformUpdate (LocalOutdatedModule, NewUpdate)

Now, if you want to add this functionality to your own module, you can have a detailed step-by-step guide here.