diff --git a/components/lazautoupdate/latest_stable/testapp/testapp.lpi b/components/lazautoupdate/latest_stable/testapp/testapp.lpi index 84889eac0..32e8a5f10 100644 --- a/components/lazautoupdate/latest_stable/testapp/testapp.lpi +++ b/components/lazautoupdate/latest_stable/testapp/testapp.lpi @@ -19,10 +19,7 @@ - - - @@ -154,6 +151,11 @@ + + + + + diff --git a/components/lazautoupdate/latest_stable/testapp/testapp.lps b/components/lazautoupdate/latest_stable/testapp/testapp.lps index 8c9fc9be1..475fb1965 100644 --- a/components/lazautoupdate/latest_stable/testapp/testapp.lps +++ b/components/lazautoupdate/latest_stable/testapp/testapp.lps @@ -3,14 +3,14 @@ - + - - + + @@ -20,9 +20,9 @@ - - - + + + @@ -33,7 +33,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -165,123 +165,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + diff --git a/components/lazautoupdate/latest_stable/testapp/testapp.res b/components/lazautoupdate/latest_stable/testapp/testapp.res index 1ef28c4df..2feb20d57 100644 Binary files a/components/lazautoupdate/latest_stable/testapp/testapp.res and b/components/lazautoupdate/latest_stable/testapp/testapp.res differ diff --git a/components/lazautoupdate/latest_stable/testapp/umainform.pas b/components/lazautoupdate/latest_stable/testapp/umainform.pas index 9803865ed..d54cea71b 100644 --- a/components/lazautoupdate/latest_stable/testapp/umainform.pas +++ b/components/lazautoupdate/latest_stable/testapp/umainform.pas @@ -71,6 +71,7 @@ type private Logger: TEventLog; procedure WriteAndLog(szText: string); + procedure CloseLog; public end; @@ -83,6 +84,15 @@ implementation {$R *.lfm} { Tmainform } +procedure Tmainform.CloseLog; +begin + If Assigned(Logger) then + begin + Logger.Info('End of Log'); + Logger.Active:=False; + end; +end; + procedure Tmainform.WriteAndLog(szText: string); begin Logger.Info(szText); @@ -98,7 +108,6 @@ begin LazAutoUpdate1.GitHubBranchOrTag:='updates'; LazAutoUpdate1.ShowUpdateInCaption:=TRUE; Caption:=Application.Title; - If Assigned(Logger) then FreeAndNil(Logger); if FileExistsUTF8(C_LogFileName) then DeleteFile(C_LogFileName); Application.Processmessages; @@ -120,8 +129,8 @@ end; procedure Tmainform.FormDestroy(Sender: TObject); begin - If Assigned(Logger) then Logger.Info('End of Log'); - FreeAndNil(Logger); + CloseLog; + If Assigned(Logger) then FreeAndNil(Logger); end; procedure Tmainform.cmd_NewVersionAvailableClick(Sender: TObject); @@ -139,6 +148,7 @@ begin {$IFDEF DEBUGMODE} ShowMessage('Please do not try updating in DEBUG mode'); {$ELSE} + CloseLog; LazAutoUpdate1.UpdateToNewVersion; {$ENDIF} end; @@ -158,6 +168,7 @@ begin {$IFDEF DEBUGMODE} ShowMessage('Please do not try updating in DEBUG mode'); {$ELSE} + CloseLog; LazAutoUpdate1.AutoUpdate; {$ENDIF} end;