build_lcl_docs: copy css file to output directory

git-svn-id: trunk@50685 -
This commit is contained in:
mattias 2015-12-06 12:50:57 +00:00
parent 4146a5aea4
commit 14c2bd32b0

View File

@ -309,7 +309,7 @@ begin
Params+=' --output='+ ChangeFileExt(PackageName, '.chm')
+' --auto-toc --auto-index --make-searchable';
if CSSFile<>'' then
Params+=' --css-file='+CreateRelativePath(CSSFile,OutDir);
Params+=' --css-file='+ExtractFileName(CSSFile); // the css file is copied to the OutDir
end;
if EnvParams<>'' then
@ -398,6 +398,8 @@ begin
end;
procedure TFPDocRun.CreateOuputDir;
var
TargetCSSFile: String;
begin
if ord(Step)>=ord(frsOutDirCreated) then
raise Exception.Create('TFPDocRun.CreateOuputDir not again');
@ -411,6 +413,16 @@ begin
raise Exception.Create('unable to create directory "'+OutDir+'"');
end;
if (OutFormat='chm') and (CSSFile<>'') then
begin
TargetCSSFile:=AppendPathDelim(OutDir)+ExtractFileName(CSSFile);
if CompareFilenames(TargetCSSFile,CSSFile)<>0 then
begin
if not CopyFile(CSSFile,TargetCSSFile) then
raise Exception.Create('unable to copy css file: CSSfile="'+CSSFile+'" to "'+TargetCSSFile+'"');
end;
end;
FStep:=frsOutDirCreated;
end;