This document describes how macOS software integrates with Chromium Updater for software updates.
macOS software updates are delivered as archives (often DMG or ZIP) that contain an .install
executable at the root of the archive. (Typically the archives also contain an app bundle, i.e. the new version of the app.)
The updater will execute all of the following executables in the archive, if they exist, in order:
.preinstall
.keystone_preinstall
.install
.keystone_install
.postinstall
.keystone_postinstall
If any fail (exit with a non-zero status), the remaining executables are not run and the installation fails.
If none exist, the installation fails.
Installer executables are executed in an environment with the following environment variables:
KS_TICKET_AP
: The ap value of the currently-installed version of the app. (Note: “ap” was called “tag” in Keystone.)KS_TICKET_SERVER_URL
: The URL used for update-checking with the server, regardless of what was in the Keystone ticket.KS_TICKET_XC_PATH
: The absolute path to the installation of the app, based on its existence-checker value.PATH
: ‘/bin:/usr/bin:/Path/To/ksadmin’.PREVIOUS_VERSION
: The version of the app before this update.SERVER_ARGS
: The arguments sent from the server, if any. Refer to the Omaha protocol's description of manifest
response objects.UPDATE_IS_MACHINE
: An indicator of the updater's scope.UNPACK_DIR
: The absolute path to the unpacked update archive (i.e. the parent directory of the install executable.)%COMPANY%_USAGE_STATS_ENABLED
: where %COMPANY% is the uppercase company short name from branding.gni.Installer executables are passed the following arguments, in this order:
New install executables should instead depend on environment variables rather than positional arguments.
If the install executables succeed, the updater will automatically record the new version of the application without any special action from the installers.
If the installers must also change other elements of the installation, such as the brand, path, ap, or similar, they may do so by executing ksadmin, for example by running ksadmin --register --product-id com.google.MyProductId --tag MyNewAp
.