mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 01:49:35 +02:00
* generate fp.cfg help section.
This commit is contained in:
parent
048385fd7f
commit
d2ddf47d19
@ -90,6 +90,7 @@ Resourcestring
|
||||
Susage120 = ' -2 use built in fp.ini template';
|
||||
Susage130 = ' -3 use built in fppkg.cfg template';
|
||||
Susage140 = ' -4 use built in fppkg default compiler template';
|
||||
Susage150 = ' -g add help section to fp.ini';
|
||||
|
||||
SVersion = 'Version: %s';
|
||||
|
||||
@ -358,6 +359,7 @@ begin
|
||||
Writeln(SUsage120);
|
||||
Writeln(SUsage130);
|
||||
Writeln(SUsage140);
|
||||
Writeln(SUsage150);
|
||||
Halt(1);
|
||||
end;
|
||||
|
||||
@ -415,7 +417,7 @@ Var
|
||||
I : Integer;
|
||||
S : String;
|
||||
ShowBuiltinCommand : boolean;
|
||||
|
||||
AppendHelp : boolean;
|
||||
Function GetOptArg : String;
|
||||
|
||||
begin
|
||||
@ -449,6 +451,7 @@ begin
|
||||
ShowBuiltinCommand := False;
|
||||
SkipBackup := False;
|
||||
CreateDir := False;
|
||||
AppendHelp:=False;
|
||||
While( I<=ParamCount) do
|
||||
begin
|
||||
S:=Paramstr(i);
|
||||
@ -464,6 +467,7 @@ begin
|
||||
ShowBuiltinMacros;
|
||||
halt(0);
|
||||
end;
|
||||
'g' : AppendHelp:=True;
|
||||
't' : TemplateFileName:=GetOptArg;
|
||||
'd' : AddPair(GetOptArg);
|
||||
'u' : TemplateParser.Values[GetOptArg]:='';
|
||||
@ -505,6 +509,8 @@ begin
|
||||
|
||||
TemplateParser.Values['TEMPLATEFILE'] := 'builtin';
|
||||
end;
|
||||
If AppendHelp Then
|
||||
Cfg.Text:=Cfg.Text+'[Help]'+LineEnding+'Files="%basepath%/help/toc.chm;%basepath%/help/fcl.chm;%basepath%/help/ref.chm;%basepath%/help/rtl.chm;%basepath%/help/prog.chm;%basepath%/help/user.chm;%basepath%/help/fclres.chm"'+LineEnding;
|
||||
if ShowBuiltinCommand then
|
||||
begin
|
||||
ShowBuiltIn;
|
||||
|
Loading…
Reference in New Issue
Block a user