Updating an installation

The zip produced by the build screen carries its own update tool. On the target machine, it replaces the installed application by the new version, keeping the data, the certificates, the parameters and the translations edited by the customer.

What the zip contains

  • The application folder, with the version's content package.
  • At the root: the updater folder, the launchers MISE-A-JOUR.cmd (French) and UPDATE.cmd (English), their macOS .command counterparts, and a LISEZ-MOI - READ ME file.
  • No parameter file and no certificate: those stay the machine's own.

The update tool that runs is the zip's, not the installed version's: a fix to the tool arrives with the version that brings it.

On Windows, step by step

  1. Double-click UPDATE.cmd directly inside the zip, from Explorer. The tool finds the zip, extracts itself to a temporary folder and starts.
  2. It identifies the installation to update (from the machine's registry of installations, otherwise it asks whether this is a first installation or an update).
  3. It checks the zip before touching anything: it refuses a zip without a version marker, without code or without a BWEB folder; it flags an older version; it asks for an explicit confirmation if the zip belongs to another product.
  4. It asks you to stop the application. It never kills it: while it runs, it waits for you to quit it (Enter to check again, or abandon). Nothing has been changed yet.
  5. It offers a data backup, then asks for confirmation.
  6. It renames the old folder to <name> <old version> <date time> and installs the new version under the original name: scheduled tasks, services and shortcuts stay valid. If the move fails, the old folder gets its name back.
  7. It takes over from the old installation the certificates (cert.pem, key.pem, dhparams.pem) and the APP_PARAMETERS and PREPROD_PARAMETERS files, writes a RETOUR-ARRIERE.txt file, then relaunches 4D.

The data file does not move: the old and the new version open the same data folder.

At the new version's first start

  • It finds the previous installation and takes over its parameters: the old file wins on the keys it has, the new one only brings the missing keys.
  • It merges the translations: labels corrected by the customer are kept, the version's new translations are added.
  • The version updates run, then the delivered content is applied. A conflict on a page opens the /bweb/reconcile arbitration screen (see Content reconciliation).

Rolling back

Rename the two folders the other way round. The data does not roll back: only the backup offered during the update protects it. The RETOUR-ARRIERE.txt file, in the installation, recalls the procedure.

On macOS

Double-click the zip to extract it, then UPDATE.command. If macOS refuses to open it, make it executable (chmod +x) or remove the quarantine (xattr -d -r com.apple.quarantine).

The macOS update tool has not been validated yet: test it before using it on a production server.

Good to know

  • The data backup is only offered when the tool knows the data folder; an installation started at least once with a recent BWEB version provides it.
  • In client/server, the whole server application folder is replaced.

See also