lazarus/docs/html/build_html.sh
dsiders 2f59545512 Docs: build_lcl_docs. Fixes an incompatibility with FPDoc 3.3.x.
* FPDoc 3.3.X changed the syntax for the --footer argument. It uses an ''@' prefix for file names and treats anythine else as text for the footer..  build_lcl_docs did not handle that syntax.  Since we do not know which version of FPDoc will be used, we must handle both.
* Accepts --footer=filename.ext for 3.2.X.
* Accepts --footer=@filename.ext for 3.3.X.
* Accepts --footer="Your text here" for 3.3.X.
* File name expansion and validation occurs in the setter for TFPDocRun.FooterFilename.
* Modifies README.txt and all of the script files (.bat, .sh) to document requirements and usage.
2022-02-24 06:35:16 +00:00

31 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#
# Builds Lazarus documentaiton for LCL and LazUtils in HTML format.
# Requires a $(LazarusDir)/docs/chm directory which contains rtl.xct and fcl.xct.
# Process fails if either the directory or the files are missing.
# Process creates ./lcl and ./lazutils subdirectories for HTML output.
# Update the content in locallclfooter.xml if needed before starting the script.
#
# Path to the fpdoc program
# The trunk (main) version of fpdoc is recommended.
# CHANGE THIS TO A PATH VALID FOR YOUR SYSTEM AND FPDOC VERSION.
#fpdocpath="../../fpc/3.2.2/bin/x86_64-win64"
fpdocpath="../../../fpc331/fpc/bin/x86_64-win64"
# rebuild if needed
#../../lazbuild build_lcl_docs.lpi
# build html output without footers
./build_lcl_docs --outfmt=html --fpcdocs=../chm --fpdoc=$fpdocpath/fpdoc
# For FPDoc 3.2.X: build html output with footers in locallclfooter.xml
#./build_lcl_docs --outfmt=html --fpcdocs=../chm --fpdoc=$fpdocpath/fpdoc --footer=locallclfooter.xml
# For FPDoc 3.3.X: build html output with footers in locallclfooter.xml
#./build_lcl_docs --outfmt=html --fpcdocs=../chm --fpdoc=$fpdocpath/fpdoc --footer=@locallclfooter.xml
# For FPDoc 3.3.X: build html output with footer text
#./build_lcl_docs --outfmt=html --fpcdocs=../chm --fpdoc=$fpdocpath/fpdoc --footer="(c) Copyright 2022. All rights reserved."