|
@@ -12,8 +12,8 @@ uses
|
|
Pas2JSCompilerCfg, ssockets;
|
|
Pas2JSCompilerCfg, ssockets;
|
|
|
|
|
|
Const
|
|
Const
|
|
|
|
+ HTTPCompilerVersion = '1.0';
|
|
nErrTooManyThreads = -1;
|
|
nErrTooManyThreads = -1;
|
|
-
|
|
|
|
nExitCodeSocketError = 1;
|
|
nExitCodeSocketError = 1;
|
|
|
|
|
|
Type
|
|
Type
|
|
@@ -53,7 +53,6 @@ Type
|
|
Property Compiles[AIndex : Integer] : TCompileItem Read GetC; default;
|
|
Property Compiles[AIndex : Integer] : TCompileItem Read GetC; default;
|
|
end;
|
|
end;
|
|
|
|
|
|
-
|
|
|
|
{ TCompileThread }
|
|
{ TCompileThread }
|
|
|
|
|
|
TCompileThread = class(TThread)
|
|
TCompileThread = class(TThread)
|
|
@@ -277,6 +276,7 @@ begin
|
|
{AllowWriteln}
|
|
{AllowWriteln}
|
|
if (Msg<>'') then
|
|
if (Msg<>'') then
|
|
Writeln('Error: ',Msg);
|
|
Writeln('Error: ',Msg);
|
|
|
|
+ Writeln('Version ',HTTPCompilerVersion);
|
|
Writeln('Usage ',ExtractFileName(ParamStr(0)),' [options] ');
|
|
Writeln('Usage ',ExtractFileName(ParamStr(0)),' [options] ');
|
|
Writeln('Where options is one or more of : ');
|
|
Writeln('Where options is one or more of : ');
|
|
Writeln('-A --api=location,secret Enable location management API.');
|
|
Writeln('-A --api=location,secret Enable location management API.');
|
|
@@ -768,9 +768,15 @@ Var
|
|
S : String;
|
|
S : String;
|
|
|
|
|
|
begin
|
|
begin
|
|
- S:=Checkoptions('shqd:ni:p:wP::cm:A:I:',['help','quiet','noindexpage','directory:','port:','indexpage:','watch','project::','config:','simpleserver','mimetypes:','api:','interface:']);
|
|
|
|
|
|
+ S:=Checkoptions('shqVd:ni:p:wP::cm:A:I:',['help','quiet','version','noindexpage','directory:','port:','indexpage:','watch','project::','config:','simpleserver','mimetypes:','api:','interface:']);
|
|
if (S<>'') or HasOption('h','help') then
|
|
if (S<>'') or HasOption('h','help') then
|
|
- usage(S);
|
|
|
|
|
|
+ Usage(S);
|
|
|
|
+ if HasOption('V','version') then
|
|
|
|
+ begin
|
|
|
|
+ writeln(HTTPCompilerVersion);
|
|
|
|
+ Terminate;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
if HasOption('c','config') then
|
|
if HasOption('c','config') then
|
|
ConfigFile:=GetOptionValue('c','config')
|
|
ConfigFile:=GetOptionValue('c','config')
|
|
else
|
|
else
|