Skip to main content

Module old_versions

Module old_versions 

Source
Expand description

The old versions’ files in a setup.exe install’s runtime\ folder.

Each version’s setup puts agentmux-<ver>.exe, agentmux-<ver>.dll and agentmux-srv-<ver>-windows.<arch>.exe beside the others (a running old version’s files are never overwritten), and nothing took the old ones away: about 95 MB a version. Once this version has run for a while, the launcher removes all but the one previous version, which stays as the way back.

Only those three names, only older than the running version (compared as numbers, so 0.60.9 is older than 0.60.10), and only in an install with Inno Setup’s uninstaller: a portable folder is a single version by design, and the CEF runtime files and the portable marker are never named here. A file still in use (an older srv that agents are still on) cannot be deleted while it runs; it is skipped and the next start tries again.

Structs§

InstallersRemoved
What removing the installers did.
Pruned
What a prune did.

Constants§

HEALTHY_AFTER
How long the launcher must have been up before it prunes: a version that came up and stayed up is the one to keep.
KEEP_PREVIOUS
Versions older than the running one that stay.

Functions§

parse_version 🔒
major.minor.patch and nothing else (no prerelease or build suffix).
prune
Remove stale_files of runtime_dir.
prune_installers
Remove the installer that upgraded to running, wherever an older version’s data folder holds it. The folders themselves are left to the guarded oldversions cleanup (srv-core), which has the process scan, idle window and the user’s oldversions:clean opt-in; this only takes the installer, now that the new version is up.
prune_when_healthy
Prune the install’s runtime\ and remove the installer of the upgrade, once this launcher has been up for HEALTHY_AFTER, on its own thread. The runtime files are only an install made by setup.exe; the installer is removed wherever the version layout is the real one.
remove_installer 🔒
Remove the installer file that upgraded to running from version_dir’s data/updates/<running>/, never the whole folder: before the download layout was fixed, an upgrade unpacked the new app inside that folder, so the running install can live there. Returns the bytes removed.
stale_files
The files to remove from runtime_dir: those of every version older than running except the newest keep of them.
version_in_name 🔒
The version in one of the three versioned file names, None for any other name.

Type Aliases§

Version 🔒