Repository navigation
Expand file tree
/
Copy pathProject1.dpr
More file actions
59 lines (47 loc) · 1.53 KB
/
Copy pathProject1.dpr
File metadata and controls
59 lines (47 loc) · 1.53 KB
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
{*******************************************************}
{ YAGE: Yet Another Global Encoder }
{ Unit: Project }
{ Copyright(c) 2021 Alexey Anisimov }
{ Contact email: softlight@ya.ru }
{*******************************************************}
program Project1;
{$MODE delphiunicode}
{$APPTYPE CONSOLE}
{$R *.res}
uses
Windows, SysUtils, DateUtils,
Main.Exec in 'Main.Exec.pas',
Main.Help in 'Main.Help.pas',
Helper.Console in 'Helper.Console.pas',
Helper.Singleton in 'Helper.Singleton.pas',
Common.ShellFileSupport in 'Common.ShellFileSupport.pas';
begin
{$IFDEF DEBUG}
ReportMemoryLeaksOnShutdown := True;
{$ENDIF}
try
App.Init;
App.StartTime := Now;
if App.CheckParams then
begin
if App.Log then
WriteAppStartTime(App.StartTime);
App.Execute;
App.StopTime := Now;
App.ElapsedTime := MilliSecondsBetween(App.StartTime, App.StopTime);
if App.Log then
WriteAppStopTime(App.StartTime, App.StopTime, App.ElapsedTime);
end;
except
on E: Exception do
begin
WriteAppLog(error, string(Format('%s: %s', [E.ClassName, E.Message])));
App.StopTime := Now;
App.ElapsedTime := MilliSecondsBetween(App.StartTime, App.StopTime);
if App.Log then
WriteAppStopTime(App.StartTime, App.StopTime, App.ElapsedTime);
end;
end;
App.Finish;
System.ExitCode := App.ExitCode;
end.