Automatically add help index from /usr/share/doc/fpc/fpctoc.htx if it exists diff --git a/fpcbuild/fpcsrc/packages/ide/fpini.pas b/fpcbuild/fpcsrc/ide/fpini.pas index f911683..0449acc 100644 --- a/fpcbuild/fpcsrc/packages/ide/fpini.pas +++ b/fpcbuild/fpcsrc/packages/ide/fpini.pas @@ -455,6 +455,8 @@ begin end; { Help } S:=INIFile^.GetEntry(secHelp,ieHelpFiles,''); + if (S='') and (ExistsFile('/usr/share/doc/fpc/fpctoc.htx')) then + S:='/usr/share/doc/fpc/fpctoc.htx|Free Pascal Documentation'; repeat P:=Pos(';',S); if P=0 then P:=length(S)+1; PS:=copy(S,1,P-1); @@ -572,6 +574,11 @@ begin { Misc } ShowReadme:=INIFile^.GetIntEntry(secMisc,ieShowReadme,{integer(ShowReadme)}1)<>0; Dispose(INIFile, Done); + end + else + begin + if ExistsFile('/usr/share/doc/fpc/fpctoc.htx') then + HelpFiles^.Insert(NewStr('/usr/share/doc/fpc/fpctoc.htx|Free Pascal Documentation')); end; ReadINIFile:=OK; end;