-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExplodeUnit.dpr
More file actions
60 lines (47 loc) · 1000 Bytes
/
ExplodeUnit.dpr
File metadata and controls
60 lines (47 loc) · 1000 Bytes
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
program ExplodeUnit;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
UDmMain in 'UDmMain.pas' {DmMain: TDataModule},
UConsts in 'UConsts.pas';
var
GParamsOk: Boolean;
GSource: string;
GOutput: string;
procedure ShowHelp;
begin
end;
begin
try
{ TODO -oUser -cConsole Main : Insérer du code ici }
GParamsOk := True;
if not( FindCmdLineSwitch( 'SOURCE', GSource, True ) ) then
begin
GParamsOk := False;
Writeln( 'Paramètre SOURCE manquant' );
end;
if not( FindCmdLineSwitch( 'OUTPUT', GOutput, True ) ) then
begin
GParamsOk := False;
Writeln( 'Paramètre OUTPUT manquant' );
end;
if GParamsOk then
begin
DmMain := TDmMain.Create( nil );
try
DmMain.Execute( GSource, GOutput );
finally
FreeAndNil( DmMain );
end;
end
else
begin
ShowHelp;
end;
// Readln;
except
on E: Exception do
Writeln( E.ClassName, ': ', E.Message );
end;
end.