-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathQuickFTP_Sync.dpr
64 lines (58 loc) · 1.24 KB
/
QuickFTP_Sync.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
program QuickFTP_Sync;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.DateUtils,
System.Classes,
System.SysUtils,
Quick.Commons,
Quick.Console,
Quick.Threads,
Quick.Logger,
Quick.Logger.Provider.Files,
uCore,
uModel,
uConfig,
uGlobal;
const
Version = '1.0';
CONSMailSubject = 'QuickFTPSync Resume';
var
finished : Boolean = False;
{ TEventHandlers }
begin
{ TODO -oUser -cConsole Main : Insert code here }
try
try
with GlobalLogFileProvider do
begin
AutoFileNameByProcess := True;
DailyRotate := True;
CompressRotatedFiles := True;
Enabled := True;
end;
Logger.Providers.Add(GlobalLogFileProvider);
Logger.Info('Program start.');
AppArguments := New(PAPPArguments);
if TArgCore.ProcessArguments(AppArguments) then
begin
TConfigCore.ValidateConfig;
TAnonymousThread.Execute(
procedure
begin
repeat
TAppCore.Updateconsole;
Sleep(260);
until (finished);
end
).Start;
TAppCore.Process;
finished := True
end;
except
on e : Exception do Cout(e.ToString, TLogEventType.etError);
end;
finally
Dispose(AppArguments);
end;
end.