This page is about the Updater - the in-program mechanism(s) by which we notify users about updates to LibreOffice and offer to download new versions.
Unlike other programs like Firefox, we do not have a fully-integrated "auto-updater" that can download and install a new version of LibreOffice for a user.
- Automatically check for new versions on the update server
- (Optionally) download new versions to a specified directory
The updater works in a pretty straightforward way.
It is a single .php file that has the git-hashes of the released builds and uses simple logic to decide
- when to upgrade to the next micro version, and
- when to update to the next minor one.
The php code parses the passed-in User-Agent string to extract the language, the platform and the LibreOffice version number.
Each release of LibreOffice is stored internally in an array that maps a build-hash to a human-readable version.
Note: for some reason, the build-hashes appears to have been cut by 1 letter
A second array stores the current versions for the two active codelines: stable and latest.
(TODO: All of this data should live in a text file outside of the PHP file...) -- it's probably faster to have that Array stored inside the PHP file..
(The comments in the code are confusing...here's my understanding)
If the micro version number of the update is the same or larger than current one, then the latest version is offered, otherwise the stable version.
Hint: The "micro" version number is the 3rd degree of the version number:
MAJOR.minor.micro (e.g. 3.5.4)
Let's use some concrete examples to provide clarity. Read this table row by row, e.g.
If the user is running 3.5.2 and the latest version is 3.5.3, then the updater will suggest 3.5.3.
|If the user is running||and the latest version is||then the updater will suggest|
|3.5.2||3.6.1||stable (e.g. 3.5.7)|
|3.5.6||4.1.5||stable (e.g. 4.1.3)|
The file is maintained in git repo: https://cgit.freedesktop.org/libreoffice/website/tree/check.php?h=update
- We could integrate Sparkle (and WinSparkle), which is used by many other projects, so its UI and workflow is familiar to users. —Fitoschido (talk) 2014-09-16T11:30:51 (UTC)
How developers can test the updater: