You've already forked lazarus-ccr
Added loacal logfile logging
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5663 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4,13 +4,13 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="10"/>
|
<Version Value="10"/>
|
||||||
<BuildModes Active="Win32"/>
|
<BuildModes Active="Win32"/>
|
||||||
<Units Count="16">
|
<Units Count="17">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="testapp.lpr"/>
|
<Filename Value="testapp.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<CursorPos X="33" Y="27"/>
|
<CursorPos X="33" Y="27"/>
|
||||||
<UsageCount Value="43"/>
|
<UsageCount Value="44"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -20,40 +20,40 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="32"/>
|
<TopLine Value="64"/>
|
||||||
<CursorPos X="103" Y="53"/>
|
<CursorPos X="19" Y="103"/>
|
||||||
<UsageCount Value="43"/>
|
<UsageCount Value="44"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="2"/>
|
||||||
<WindowIndex Value="1"/>
|
<WindowIndex Value="1"/>
|
||||||
<TopLine Value="3"/>
|
<TopLine Value="3"/>
|
||||||
<CursorPos X="76" Y="8"/>
|
<CursorPos X="76" Y="8"/>
|
||||||
<UsageCount Value="26"/>
|
<UsageCount Value="27"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="..\lazautoupdate_httpclient.pas"/>
|
<Filename Value="..\lazautoupdate_httpclient.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<CursorPos X="97" Y="12"/>
|
<CursorPos X="97" Y="12"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<WindowIndex Value="1"/>
|
<WindowIndex Value="1"/>
|
||||||
<TopLine Value="349"/>
|
<TopLine Value="352"/>
|
||||||
<CursorPos X="21" Y="364"/>
|
<CursorPos X="46" Y="373"/>
|
||||||
<ExtraEditorCount Value="2"/>
|
<ExtraEditorCount Value="2"/>
|
||||||
<ExtraEditor1>
|
<ExtraEditor1>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<TopLine Value="1141"/>
|
<TopLine Value="1145"/>
|
||||||
<CursorPos X="11" Y="1231"/>
|
<CursorPos X="11" Y="1235"/>
|
||||||
</ExtraEditor1>
|
</ExtraEditor1>
|
||||||
<ExtraEditor2>
|
<ExtraEditor2>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<TopLine Value="-1"/>
|
<TopLine Value="-1"/>
|
||||||
<CursorPos X="-1" Y="-1"/>
|
<CursorPos X="-1" Y="-1"/>
|
||||||
</ExtraEditor2>
|
</ExtraEditor2>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
@ -105,7 +105,7 @@
|
|||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="25"/>
|
<TopLine Value="25"/>
|
||||||
<CursorPos X="25" Y="55"/>
|
<CursorPos X="25" Y="55"/>
|
||||||
<UsageCount Value="18"/>
|
<UsageCount Value="19"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
@ -120,7 +120,7 @@
|
|||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<TopLine Value="25"/>
|
<TopLine Value="25"/>
|
||||||
<CursorPos X="71" Y="44"/>
|
<CursorPos X="71" Y="44"/>
|
||||||
<UsageCount Value="15"/>
|
<UsageCount Value="16"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
@ -144,6 +144,15 @@
|
|||||||
<TopLine Value="372"/>
|
<TopLine Value="372"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit15>
|
</Unit15>
|
||||||
|
<Unit16>
|
||||||
|
<Filename Value="..\updatehmsource\updatehm.lpr"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<WindowIndex Value="1"/>
|
||||||
|
<TopLine Value="35"/>
|
||||||
|
<CursorPos X="40" Y="51"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit16>
|
||||||
</Units>
|
</Units>
|
||||||
<General>
|
<General>
|
||||||
<ActiveWindowIndexAtStart Value="1"/>
|
<ActiveWindowIndexAtStart Value="1"/>
|
||||||
@ -151,87 +160,87 @@
|
|||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="51" Column="20" TopLine="35"/>
|
<Caret Line="56" Column="27" TopLine="28"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="914" TopLine="893"/>
|
<Caret Line="533" Column="45" TopLine="519"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="1076" TopLine="1039"/>
|
<Caret Line="16"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="180" Column="33" TopLine="157"/>
|
<Caret Line="13" Column="43" TopLine="12"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="76" Column="3" TopLine="74"/>
|
<Caret Line="14" TopLine="3"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="129" Column="3" TopLine="92"/>
|
<Caret Line="22" TopLine="3"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="122" Column="3" TopLine="92"/>
|
<Caret Line="20" Column="7" TopLine="7"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="56" Column="27" TopLine="28"/>
|
<Caret Line="25"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="533" Column="45" TopLine="519"/>
|
<Caret Line="24"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="16"/>
|
<Caret Line="25"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="13" Column="43" TopLine="12"/>
|
<Caret Line="26" Column="8" TopLine="2"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="14" TopLine="3"/>
|
<Caret Line="16" TopLine="3"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\open_ssl.pas"/>
|
||||||
<Caret Line="22" TopLine="3"/>
|
<Caret Line="26" Column="2" TopLine="5"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="20" Column="7" TopLine="7"/>
|
<Caret Line="56" Column="27" TopLine="28"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="25"/>
|
<Caret Line="52" Column="19" TopLine="28"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="24"/>
|
<Caret Line="56" Column="19" TopLine="28"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="25"/>
|
<Caret Line="926" Column="38" TopLine="889"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="26" Column="8" TopLine="2"/>
|
<Caret Line="55" Column="27" TopLine="29"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="16" TopLine="3"/>
|
<Caret Line="926" Column="38" TopLine="892"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="..\open_ssl.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="26" Column="2" TopLine="5"/>
|
<Caret Line="1083" Column="39" TopLine="1045"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="56" Column="27" TopLine="28"/>
|
<Caret Line="51" Column="22" TopLine="28"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
@ -239,35 +248,35 @@
|
|||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="56" Column="19" TopLine="28"/>
|
<Caret Line="55" Column="19" TopLine="28"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="926" Column="38" TopLine="889"/>
|
<Caret Line="53" Column="103" TopLine="32"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="55" Column="27" TopLine="29"/>
|
<Caret Line="82" Column="9" TopLine="47"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="926" Column="38" TopLine="892"/>
|
<Caret Line="89" Column="30" TopLine="58"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="1083" Column="39" TopLine="1045"/>
|
<Caret Line="15" Column="23"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="51" Column="22" TopLine="28"/>
|
<Caret Line="79" Column="26" TopLine="53"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="52" Column="19" TopLine="28"/>
|
<Caret Line="157" Column="94" TopLine="115"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="55" Column="19" TopLine="28"/>
|
<Caret Line="95" TopLine="64"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object mainform: Tmainform
|
object mainform: Tmainform
|
||||||
Left = 682
|
Left = 558
|
||||||
Height = 209
|
Height = 209
|
||||||
Top = 277
|
Top = 210
|
||||||
Width = 335
|
Width = 335
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = 'mainform'
|
Caption = 'mainform'
|
||||||
@ -9,6 +9,7 @@ object mainform: Tmainform
|
|||||||
ClientWidth = 335
|
ClientWidth = 335
|
||||||
OnActivate = FormActivate
|
OnActivate = FormActivate
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
Position = poDesktopCenter
|
Position = poDesktopCenter
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.7'
|
||||||
Visible = True
|
Visible = True
|
||||||
|
@ -6,26 +6,31 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, ComCtrls,
|
Classes, SysUtils, Forms, ComCtrls,
|
||||||
Buttons, StdCtrls,ulazautoupdate;
|
Buttons, StdCtrls,LazFileUtils,FileUtil,
|
||||||
|
ulazautoupdate,eventlog;
|
||||||
CONST
|
CONST
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
{$IFDEF CPU32}
|
{$IFDEF CPU32}
|
||||||
C_VERSIONSINNAME = 'testappwin32.ini';
|
C_VERSIONSINNAME = 'testappwin32.ini';
|
||||||
C_ZIPFILENAME = 'testappwin32.zip';
|
C_ZIPFILENAME = 'testappwin32.zip';
|
||||||
|
C_LogFileName = 'testappwin32log.txt';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF CPU64}
|
{$IFDEF CPU64}
|
||||||
C_VERSIONSINNAME = 'testappwin64.ini';
|
C_VERSIONSINNAME = 'testappwin64.ini';
|
||||||
C_ZIPFILENAME = 'testappwin64.zip';
|
C_ZIPFILENAME = 'testappwin64.zip';
|
||||||
|
C_LogFileName = 'testappwin64log.txt';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
{$IFDEF CPU32}
|
{$IFDEF CPU32}
|
||||||
C_VERSIONSINNAME = 'testapplinux32.ini';
|
C_VERSIONSINNAME = 'testapplinux32.ini';
|
||||||
C_ZIPFILENAME = 'testapplinux32.zip';
|
C_ZIPFILENAME = 'testapplinux32.zip';
|
||||||
|
C_LogFileName = 'testapplinux32log.txt';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF CPU64}
|
{$IFDEF CPU64}
|
||||||
C_VERSIONSINNAME = 'testapplinux64.ini';
|
C_VERSIONSINNAME = 'testapplinux64.ini';
|
||||||
C_ZIPFILENAME = 'testapplinux64.zip';
|
C_ZIPFILENAME = 'testapplinux64.zip';
|
||||||
|
C_LogFileName = 'testapplinux64log.txt';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -50,6 +55,7 @@ type
|
|||||||
procedure cmd_updateToNewVersionClick(Sender: TObject);
|
procedure cmd_updateToNewVersionClick(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure LazAutoUpdate1DebugEvent(Sender: TObject; lauMethodName,
|
procedure LazAutoUpdate1DebugEvent(Sender: TObject; lauMethodName,
|
||||||
lauMessage: string);
|
lauMessage: string);
|
||||||
procedure LazAutoUpdate1Downloaded(Sender: TObject; ResultCode,
|
procedure LazAutoUpdate1Downloaded(Sender: TObject; ResultCode,
|
||||||
@ -57,7 +63,8 @@ type
|
|||||||
procedure LazAutoUpdate1NewVersionAvailable(Sender: TObject;
|
procedure LazAutoUpdate1NewVersionAvailable(Sender: TObject;
|
||||||
Newer: boolean; OnlineVersion: string);
|
Newer: boolean; OnlineVersion: string);
|
||||||
private
|
private
|
||||||
|
Logger: TEventLog;
|
||||||
|
procedure WriteAndLog(szText: string);
|
||||||
public
|
public
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -70,6 +77,10 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
{ Tmainform }
|
{ Tmainform }
|
||||||
|
procedure Tmainform.WriteAndLog(szText: string);
|
||||||
|
begin
|
||||||
|
Logger.Info(szText);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainform.FormCreate(Sender: TObject);
|
procedure Tmainform.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@ -78,6 +89,19 @@ begin
|
|||||||
LazAutoUpdate1.ZipfileName:=C_ZIPFILENAME;
|
LazAutoUpdate1.ZipfileName:=C_ZIPFILENAME;
|
||||||
lbl_Version.Caption:='Version: ' + LazAutoUpdate1.AppVersion;
|
lbl_Version.Caption:='Version: ' + LazAutoUpdate1.AppVersion;
|
||||||
Caption:=Application.Title;
|
Caption:=Application.Title;
|
||||||
|
if FileExistsUTF8(C_LogFileName) then
|
||||||
|
DeleteFile(C_LogFileName);
|
||||||
|
Logger := TEventLog.Create(nil);
|
||||||
|
Logger.LogType := ltFile;
|
||||||
|
Logger.FileName := C_LogFileName;
|
||||||
|
Logger.Active := True;
|
||||||
|
Logger.Info('Start of Log');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Logger.Info('End of Log');
|
||||||
|
FreeAndNil(Logger);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.cmd_NewVersionAvailableClick(Sender: TObject);
|
procedure Tmainform.cmd_NewVersionAvailableClick(Sender: TObject);
|
||||||
@ -114,6 +138,7 @@ procedure Tmainform.LazAutoUpdate1DebugEvent(Sender: TObject; lauMethodName,
|
|||||||
lauMessage: string);
|
lauMessage: string);
|
||||||
begin
|
begin
|
||||||
StatusBar1.SimpleText:='Debug Message: (' + lauMethodName + ') ' + lauMessage;
|
StatusBar1.SimpleText:='Debug Message: (' + lauMethodName + ') ' + lauMessage;
|
||||||
|
WriteAndLog(StatusBar1.SimpleText);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.LazAutoUpdate1Downloaded(Sender: TObject; ResultCode,
|
procedure Tmainform.LazAutoUpdate1Downloaded(Sender: TObject; ResultCode,
|
||||||
@ -121,6 +146,7 @@ procedure Tmainform.LazAutoUpdate1Downloaded(Sender: TObject; ResultCode,
|
|||||||
begin
|
begin
|
||||||
StatusBar1.SimpleText:=Format('Downloaded. StatusCode=%d BytesDownloaded=%d',
|
StatusBar1.SimpleText:=Format('Downloaded. StatusCode=%d BytesDownloaded=%d',
|
||||||
[ResultCode,BytesDownloaded]);
|
[ResultCode,BytesDownloaded]);
|
||||||
|
WriteAndLog(StatusBar1.SimpleText);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.LazAutoUpdate1NewVersionAvailable(Sender: TObject;
|
procedure Tmainform.LazAutoUpdate1NewVersionAvailable(Sender: TObject;
|
||||||
@ -129,7 +155,9 @@ begin
|
|||||||
If Newer then
|
If Newer then
|
||||||
StatusBar1.SimpleText:='New version available. Online Version is ' + OnlineVersion
|
StatusBar1.SimpleText:='New version available. Online Version is ' + OnlineVersion
|
||||||
else
|
else
|
||||||
StatusBar1.SimpleText:='Online version is not newer. Online Version is ' + OnlineVersion
|
StatusBar1.SimpleText:='Online version is not newer. Online Version is ' + OnlineVersion;
|
||||||
|
|
||||||
|
WriteAndLog(StatusBar1.SimpleText);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user