Table of Contents

TMS FNC App Update — Guides

Control file and remote version

The component reads a remote control file referenced by URL. The file contains the new version string and a list of files to download. AppInfo exposes the parsed metadata (version, what's-new text, EULA URL) after a successful check.

Checking and applying updates

Call NewVersionAvailable to compare the remote version against the running version, then call StartUpdate to download and apply the update payload:

{ Check on startup: }
if AppUpdate1.NewVersionAvailable then
begin
  ShowMessage('Version ' + AppUpdate1.AppInfo.URL + ' is available.');
  AppUpdate1.StartUpdate;
end;

Elevation for system-level installs

Set Elevate to True when the update files need to be written to a location that requires administrative rights. The component spawns an elevated helper process on Windows automatically.

Custom version comparison

Handle OnVersionComparison to override the default string-based version comparison with your own logic:

procedure TForm1.AppUpdate1OnVersionComparison(Sender: TObject;
  const ALocalVersion, ARemoteVersion: string; var AIsNew: Boolean);
begin
  { Compare using your own semantic-version library }
  AIsNew := MySemVer.IsNewerThan(ALocalVersion, ARemoteVersion);
end;

Logging

Enable Logging.Enabled and set Logging.FileName to write a detailed update log for diagnostics:

AppUpdate1.Logging.Enabled := True;
AppUpdate1.Logging.FileName := ChangeFileExt(Application.ExeName, '.update.log');

See also