Autoupdate module description
The automatic updating module is intended to automatically and manually update STB software via HTTP from the specified URL.
Attention! Starting from STB software version 0.2.18, all customizations of the Embedded portal is necessary to make using source codes of the portal. After all customizations complete, it is necessary to make the compiling the Embedded portal. After compiling and minimization, all files of the portal could be placed in the home directory for further image-making. Source code of portal (portal-dev-*.tgz is in the directory with a current release http://soft.infomir.com)
By default, the Autoupdate module works from the manufacturer URL if the variable autoupdateURL is not specified!!!
autoupdateURL=http://example.com/update_list.txt
- autoupdateURL - the name of the environment variable which specifies the address (URL) of the file location
http://example.com/ - an example of the path to the directory (on the Web server) where the file update_list.txt is located
Stages of the update process
Verification of environment variable
autoupdate_cond . Status «0» - auto-update is enabled, «1» - update with confirmation, «2» - auto-update is disabled. If the variable is «0» or «1» then checkup of available updates is launched.- Checkup of available updates. STB reads the update_list.txt file (specified in autoupdateURL) which contains a list of all available updates ordered by creation date from old to new so that the last/new version is at the end of the list.
STB compares the date of a new/last version from the update_list with the date of a current (running in STB) version which is specified by
stb.RDir(«ImageDate») function and returns environment variableImage_Date. If the current version date is newer - auto-update doesn't start.- If the last version, specified in the update_list, is newer than the current STB version then STB performs an additional checkup the date of update image that is located with URL of the last record of the update_list.
- If the update image is newer than the current version then STB launches a checkup a type of the update image:
- If the update image is of type release then the auto-update is started
- If the update image is of type beta then an additional checkup of the environment variable "Betaupdate_cond" is started: status «1» - update is permitted; status «0» - update is not permitted. By default, the status is set to «1». The value of variable "Betaupdate_cond" can be changed with Update to beta versions option of Settings.
- Autoupdate to alpha versions doesn't start.
6. Thus, If the STB software version is types of «release» or «beta», in last case with Betaupdate is permitted, and the update image is newer than current image, then the auto-update is started.
Syntax of
[ {"name":"0.2.14-r3", "url":"http://example.com/250/imageupdate214r3", "type":"release", "date":"26 Nov 2012 23:22:19 GMT+0200", "descr":"Release"}, {"name":"0.2.14-r7", "url":"http://example.com/250/imageupdate214r7", "type":"release", "date":"30 Nov 2012 14:43:29 GMT+0200", "descr":"Release"} ]
where:
- name - name of STB software version, can contain any text (20 characters);
- url - URL of STB software version;
- type - a type of STB software version (release, beta or alpha);
- date - contains a date of creation of STB software version, it must be set from the Date section of the image header, in the following format: dd Mon yyyy hh: mm: ss GMT + nnnn, for example 10 Nov 2017 20:05:35 GMT + 0200;
- descr - brief description of the version (40 characters) that displayed when version info is requested.