Client Applications

Nuxeo Drive Update Site

Updated: March 27, 2019 Page Information Edit on GitHub

We wrote our own auto-update framework knowing:

  • The code freeze is done with PyInstaller;
  • The macOS installer uses OS-specific commands to generate a .dmg;
  • The Windows installer uses the Inno Setup Compiler that outputs a single .exe.

Currently, only macOS and Windows are supported. There is no built-in support for auto-updater on GNU/Linux.

Server

Using a secured server with HTTPS access only is strongly recommended.

The server side tree is quite simple:

drive-updates/
    alpha/
        nuxeo-drive-2.0.0.13.dmg
        nuxeo-drive-2.0.0.13.exe
    beta/
        nuxeo-drive-3.1.1.dmg
        nuxeo-drive-3.1.1.exe
    release/
        nuxeo-drive-3.1.0.dmg
        nuxeo-drive-3.1.0.exe
    nuxeo-drive.dmg
    nuxeo-drive.exe
    versions.yml

Folders

  • alpha: early development versions. It can be promoted to beta, in that case files are just moved from this folder to the beta one.
  • beta: all betas that are not releases. If one beta is going to be officially released, files are just moved from this folder to the release one.
  • release: all official releases.

Files

  • nuxeo-drive.dmg: symbolic link to the latest official release for macOS;
  • nuxeo-drive.exe: symbolic link to the latest official release for Windows;
  • versions.yml: list of available versions and their characteristics (the format used is YAML).

Example of version.yml content:

2.0.0:
    min: '5.6'
    max: 7.10-HF18
    type: alpha
    checksum:
        also: SHA1
        dmg: ...
        exe: ...

3.1.0:
    min: '7.10'
    type: release
    checksum:
        algo: SHA512
        dmg: ...
        exe: ...

3.1.1:
    min: '7.10'
    type: beta
    checksum:
        algo: MD5
        dmg: ...
        exe: ...

4.0.0:
    min: '7.10'
    type: beta
    checksum:
        algo: MD5
        dmg: ...
        exe: ...

Each entry describes a version with:

  • type: the release type, either an alpha, a beta or a release. Mandatory.
  • checksum: list of checksums for related files. Mandatory.
    • algo: the algorithm used, it must be one of the hashlib module (will use SHA256 by default).
    • dmg: the checksum of the file .dmg. Mandatory if you provide a macOS installer.
    • exe: the checksum of the file .exe. Mandatory if you provide a Windows installer.
  • min: the minimum Nuxeo version required for this release to work with. Mandatory.
  • max: the maximum Nuxeo version required for this release to work with. If not defined, Drive will consider the current Nuxeo version as acceptable to work with.

min and max can take a hotfix (HF) version, helpful to isolate some versions. Defined versions are inclusive.

Notes:

  • A version not listed can physically exist on the server but the reverse is not true: if a version is listed, files must exist on the server.
  • Versions set are not effective. They are listed for information only as there is no way to retrieve the exact server version at the time.

Client

When setting the update-site-url or beta-update-site-url parameter, it must point to https://example.org/drive-updates/, also:

  • You do not specify /beta or /release at the end of the URL, Drive will compute the final URL depending on set options;
  • Of course, if you are using a specific domain name where the tree is at the root, use only https://example.org/;
  • The trailing slash is not mandatory.

Process:

  1. Fetch the file versions.yml from the defined URL in update-site-url (or beta-update-site-url);
  2. Find the latest version sorted by type and the current Nuxeo version;
  3. If the "Auto-update" option is not checked, stop there;
  4. Download the version specific to the current OS (.dmg for macOS, .exe for Windows, ... ) into a temporary folder;
  5. Verify the checksum of the downloaded file.

Then, actions taken are OS-specific.

macOS

  1. Mount the nuxeo-drive-x.y.z.dmg file;
  2. Backup the current .app in /Applications;
  3. Copy the new .app to /Applications;
  4. Unmount the .dmg;
  5. Delete the .dmg;
  6. Restart Drive.

Windows

The only action to do is to install the new version by calling nuxeo-drive-x.y.z.exe /VERYSILENT /START=auto from the temporary folder. The installer will automagically:

  1. Stop Drive;
  2. Install the new version, it will upgrade the old one without personal data loss;
  3. Start Drive.


a month ago manonlumeau NXDRIVE-1581: Update Nuxeo Drive documentation
a month ago manonlumeau Final review
2 months ago manonlumeau NXDOC-1871: update Nuxeo sources retrieval
3 years ago Manon Lumeau 13
3 years ago Solen Guitter 12 | Update section Using a Custom Update Site to use update-site-url instead of org.nuxeo.drive.update.site.url
3 years ago Manon Lumeau 11
4 years ago Solen Guitter 10
4 years ago Solen Guitter 9 | Format toc and update related pages
4 years ago Antoine Taillefer 8
5 years ago Solen Guitter 7
5 years ago Solen Guitter 6
5 years ago Antoine Taillefer 5
5 years ago Antoine Taillefer 4
5 years ago Antoine Taillefer 3
5 years ago Antoine Taillefer 2
5 years ago Antoine Taillefer 1
History: Created by Antoine Taillefer

We'd love to hear your thoughts!

All fields required