Docs: project build_lcl_docs:

1. Fix compilation under Windows
2. Create outputdirectory before trying to write to it (Part of Issue #0029876)

git-svn-id: trunk@52044 -
This commit is contained in:
bart 2016-03-24 14:36:05 +00:00
parent 65e40fa6a8
commit c6b63b7c3d

View File

@ -437,8 +437,6 @@ var
begin
if ord(Step)>=ord(frsOutDirCreated) then
raise Exception.Create('TFPDocRun.CreateOuputDir not again');
if ord(Step)<ord(frsFilesGathered) then
FindSourceFiles;
if Not DirectoryExistsUTF8(OutDir) then
begin
@ -447,6 +445,9 @@ begin
raise Exception.Create('unable to create directory "'+OutDir+'"');
end;
if ord(Step)<ord(frsFilesGathered) then
FindSourceFiles;
if (OutFormat='chm') and (CSSFile<>'') then
begin
TargetCSSFile:=AppendPathDelim(OutDir)+ExtractFileName(CSSFile);
@ -478,7 +479,7 @@ begin
writeln('Not executing, simulation ended. Stop');
Halt(0);
end;
{$IFDEF MSWINDOWS}fpdoc := ChangeFileExt(fpdoc,'.exe');{$ENDIF}
{$IFDEF MSWINDOWS}FPDocExe := ChangeFileExt(FPDocExe,'.exe');{$ENDIF}
if not FileInEnvPATH(FPDocExe) then
begin
WriteLn('Error: fpdoc ('+FPDocExe+') cannot be found. Please add its location to the PATH ',