
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2802 8e941d3f-bd1b-0410-a28a-d453659cc2b4
30 lines
517 B
ObjectPascal
30 lines
517 B
ObjectPascal
program testcompconfread;
|
|
|
|
{$mode delphi}{$H+}
|
|
|
|
uses
|
|
SysUtils, Classes, cmdlinecfg, cmdlinecfgjson, cmdlinecfgutils
|
|
{ you can add units after this };
|
|
|
|
var
|
|
cfg : TCmdLineCfg;
|
|
begin
|
|
if Paramcount=0 then begin
|
|
writeln('please provide the configuration file name');
|
|
exit;
|
|
end;
|
|
try
|
|
cfg := TCmdLineCfg.Create;
|
|
try
|
|
CmdLineCfgJSONReadFile(ParamStr(1), cfg);
|
|
CmdLineDebug(cfg);
|
|
finally
|
|
cfg.Free;
|
|
end;
|
|
except
|
|
on e: Exception do
|
|
writeln(e.message);
|
|
end;
|
|
end.
|
|
|