![]() |
![]() ![]() ![]() |
acAutoUpgrader component.
|
function CheckUpdate(JustCheckIsUpdateAvailable: Boolean = False): Boolean;
|
Call CheckUpdate method to check for the application updates and initiate the upgrade process (if newer version are really exists, and JustCheckIsUpdateAvailable parameter is False on function call).
|
|
In case if you just want to check whether update available, without any message boxes call this method as CheckUpdate(True), and check whether update are available in function result.
|
When you call CheckUpdate method, the AutoUpgrader will download the file which contains the upgrade information (Info-file) from the URL specified in InfoFileURL property. If AutoUpgrader can not read remote information file, the OnNoInfoFile event occurs (or OnHostUnreachable, in case if user currently disconnected from Internet).
|
|
If file which contains the upgrade information has successfully downloaded, AutoUpgrader parses it to check whether the newer version of application already available for download. If compares the #date variable in Info-file with VersionDate property, or #number variable with VersionNumber property (this depends on method which you using for VersionContorl).
|
|
If new version are really exists, it fires OnBeginUpgrade event, then initiate downloading of all updated files to replace them locally.
|
procedure TForm1.CheckUpdateBtnClick(Sender: TObject);
|
begin
|
acAutoUpgrader1.CheckUpdate;
|
end;
|
void __fastcall TForm1::CheckUpdateBtn1Click(TObject *Sender)
|
{
|
acAutoUpgrader1->CheckUpdate();
|
}
|
Abort methods; Info-file example;
|
AutoCheck, InfoFileURL and VersionControl properties;
|
OnBeginUpgrade, OnNoUpdateAvailable and OnNoInfoFile events.
|